Repository navigation
tools: count a comparison binary's faults from its post-load prompt - #729
Conversation
There was a problem hiding this comment.
Verdict: CLEAN: The runner excludes load faults from supported binaries' timed windows and preserves labelled whole-process fallbacks.
Checked
Duplicates: 0 new functions, types or constants. Grepped the new input-state array and fixture controls; no duplicate owner. Existing marker, counter and capture owners are reused.
Complexity: no Rust functions changed; no crapper results. The added branches select the input flag, wrap the command and select the fault window. This is tool code, outside the inference hot path.
Silent failure: 3 paths followed: failed support probe, failed output filter and missing prompt marker. The caller observes a labelled whole-process count or a failed arm.
Tests: shell syntax checks passed. Fixture assertions cover load-only faults, timed faults, unsupported binaries, missing markers, probe exit codes and both capped arms. The support probe requires exit code 1 at tools/ref/depth-qwen3moe.sh:2135.
Mutation checks: the updated majflt assertion and load/timed cases protect the command and marker selection at tools/ref/depth-qwen3moe.sh:2426: reverting to --tokens turns them red. Forcing --arm on unsupported binaries turns both legacy cases red. Replacing a missing mark with timed zero at tools/ref/depth-qwen3moe.sh:2446 turns the missing-marker case red.
Gates: cold thresholds and retry/drop rules are unchanged. FAIL-first evidence covers the new accounting and probe checks.
Escape catalog: no matching C1–C4 pattern in the added code. Probe and run exit codes are captured directly; command arguments stay in arrays.
Notes
Dryer and crapper did not run because no Rust file changed.
The PR reports 95 fixture checks passing; the validator did not rerun the fixture suite. No GPU gate run is supplied.
🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)
|
The review is done and the contribution check passed, so I'm merging this. |
비교 도구가 binary 비교 arm의 모델 적재 중 page fault를 추론 구간 fault로 세어 정상 binary를 cold로 거부하던 문제를 고칩니다.
Part of #565. Tracked in #699.
What and why
tools/ref/depth-qwen3moe.shcounts a row's major page faults over the row's timed window and tags the row[cold]when the count crosses a threshold. Abin:arm (a second binary) and an arm undermem=rangenerate_qwen3moe --tokens, which printsprompt_idsbefore it loads the model. The runner had no marker for the end of the load, so it charged the whole process, load included, to the timed window. The row showed this astimed ? (a one-arm run prints its prompt ids before its load: the whole process).A binary that faulted only while loading was therefore tagged cold. Under
BLOOMERY_WARM_ROWS=1it was retried and then dropped asFAIL ... rc=cold, so a binary with a healthy timed window could be rejected from a comparison. The whole-process fallback came in witheb7f26d07, and the warm retry and drop policy withb37c3f73b.The runner now asks each
bin:or current-binary arm whether it supports--arm, by running it with a value-less--armandCUDA_VISIBLE_DEVICES=-1. The parser refuses that argument withgenerate_qwen3moe: --arm needs a valueand exit code 1, before it opens a file or a GPU. Only that exact message with exit code 1 counts as support. Supporting arms run with--arm, which printsprompt_idsafter the load, and the existingmajflt_mark,LG_FED_REandlease_filterstart the timed fault count there. The whole-process count is kept beside it. An arm whose binary does not answer the probe that way, or whose run prints no marker, keeps the whole-process count and the row saystimed ?. Thecold_checkthreshold, the retry and drop rules and the refusal ofmem=with warm rows are unchanged.tools/ref/depth-qwen3moe-stub.shgains afault-windowsgroup (--fault-windowsruns only it): load-only faults, timed faults, a binary without--arm, a missing marker, a probe that exits with another code, and the same cases undermem=for both the comparison binary and the current binary. The stub's two build trees are the same fixture, so its runs now declare the existingBLOOMERY_AB_AA=1. The existingmajfltcase now expectstimed 0for the comparison binary's row.Release notes: Fixed: a comparison binary's load-time page faults no longer count against its timed window, so it is no longer rejected as cold when only its load faulted.
Code shape
majflt_mark,LG_FED_REandlease_filter.bin:andmem=arms shareours_arm.timed ?and judged on the whole process.cargo fmtandcargo clippyare clean on what I touched; the lint count did not go up. No Rust file changed; I checked the two shell files withbash -nand the self-test below.Duplication found or removed (
path:line): none.What I ran
Self-test of the runner against fixture binaries, on Linux:
The four failures on the old runner were
bin-load-faults(the load-only run was rejected),bin-timed-faults(the timed count was not separated), andmem-faults-loadandmem-faults-timed(the same two cases undermem=).A second FAIL-first covers the probe's exit-code check, run against the change without that check:
Those were
bin-fallback-PROBE_RC-70(a probe that exits with code 70 was taken as support) andmem-faults-legacy(a capped current binary without--arm).With this change:
In that run the load-only
bin:row readsmajflt 100000 (timed 0;and keeps its mean, and the timed-fault row is tagged cold and rejected. The binary without--arm, the missing marker and the unrecognized probe results keeptimed ?and the whole-process count. Bothmem=arms follow the same pattern.Not run here: the repository's full check loop,
cargo clippyand a comparison on a real model. The self-test uses fixture binaries. Itsmem=cases cover how arguments reach the arm and where the fault window starts, not the kernel's memory limit.Reproduction
Point
DEPTH_QWEN3MOE_RUNNERat a copy of main's runner to see the first group fail.What I ran into
Rows from earlier comparison runs cannot be re-labelled: their
timed ?column shows they counted the whole process, so whether those binaries were warm during inference is unknown. This does not block this change.Hardware
A Linux container on a DGX Spark (GB10). The self-test opens no GPU.
AI help
AI 코딩 에이전트가 코드를 작성한 후 설명을 썼고, 테스트를 마쳤습니다. diff 리뷰와 PR 초안 리뷰는 제가 직접 했습니다.