Repository navigation
tests: hyperloom_benchmark_test gets its ctest row and passes without amdgpu (carries #2115 and #2124) - #2195
Conversation
…ep is zero-tolerance (Fixes #2018) The baseline recorded tests/hyperloom_benchmark_test.py as one that needs the benchmark harness. It does not: it stubs llama-bench and runs stdlib-only (hashlib, importlib.util, json, pathlib, platform, sys) -- 'hyperloom_benchmark_test: OK', rc=0, in under a second. So it was the same mistake as the other entry: a test with no runner, recorded as a test that cannot run here. With this registered the baseline list is empty and the sweep stops being a record of known gaps: any future tests/*.py referenced by nothing that can run it now fails on the spot.
…it (onto #2115, engine#2018) #2115 registers this test, and CI's build job then fails it at line 205: the job runs in a GPU-less ubuntu:26.04 container, box_conditions() reads no /sys/class/drm/card0/device/mem_info_gtt_*, and the test asserted they were not None. That is also why the test never had a ctest row. The real-value asserts now run where the counters exist. Where they do not, the test asserts the script's own contract ("absent is a null, never a zero"). A faked GPU_SYSFS root exercises the GPU-less branch on every box. Co-authored-by: bong-water-water-bong <bong-water-water-bong@1bit.gg> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PR Reviewer Guide 🔍(Review updated until commit 73d1fde)Here are some key observations to aid the review process:
|
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at 67aa181: READY
This is the row that has been red-ing unrelated PRs all day, now with a runner and a conditional. hyperloom_benchmark_test is registered through add_python_test, and the GTT assertions are guarded by if (bench.GPU_SYSFS / "mem_info_gtt_used").exists() — so on a runner with no amdgpu it skips the reading it cannot take instead of failing on its absence.
From the review side this row cost at least three PRs today: it appeared as the sole failure on #2023 (which looked like its own problem from the outside) and on #2115, and cleared on rerun each time. "This machine cannot answer" is not "the answer is wrong", and the guard is what encodes that.
The registration matters as much as the guard: without a ctest row the test's pass/fail was being read from whatever ran it, which is how a benchmark becomes a gate nobody can attribute.
|
VERDICT: READY at This closes the loop from #2115, which registered the baseline entry for this test and corrected its overstated dependency ( Two small notes:
Scope of my check: fresh configure (rc 0), ran the ctest row and the script standalone. No GPU, no real |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at 4ee51a1: READY
It carries #2115 and #2124 onto main, and nothing else. It merges cleanly onto main.
Content checked against the two sources:
- The
CMakeLists.txtrow and the emptiedtools/ci/unreferenced_py_tests.txthave the same +/- lines as #2115's own diff at3461989. tests/hyperloom_benchmark_test.pyis byte-identical to #2124's headcef7015.
Checked at this head:
python3 tests/hyperloom_benchmark_test.py:hyperloom_benchmark_test: OKon strixhalo, where the amdgpu counters exist.tools/ci/tests_referenced_check.py --check:all 82 test script(s) are referenced ..., rc 0.tools/copyright.py --check: rc 0.- Mutant in the code under test (
tools/hyperloom/custom/benchmark.py: a missingmem_info_gtt_usedreads as0.0instead ofNone): the test fails (rc 1,AssertionError: {... 'gtt_used_gib': 0.0, 'gtt_total_gib': None ...}). So the new GPU-less arm, with a temporary empty sysfs root, does catch "null became zero" on a box that has a GPU. After restoring the file the tree is clean. - CI
buildat 4ee51a1 is green. That run is the GPU-less container where #2115's head failed, so it covers the other branch.
Once this lands, #2115 and #2124 are redundant and can close.
|
VERDICT: READY at It is a successor, not a third copy"This branch is The proof answers the question that made the pair unlandable"Registered test names, The detail I would keep visible"real-value asserts where the GTT counters exist, null where they do not" — a test that asserts on absent counters would be green on a box without the counters and meaningless; asserting |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at 73d1fde: READY
Re-review of 73d1fde. It adds 73d1fde8, a merge of main. The PR's own diff is identical to 4ee51a1 (READY from me): #2115's ctest row and empty baseline, plus #2124's test.
At this head: python3 tests/hyperloom_benchmark_test.py gives hyperloom_benchmark_test: OK, and tools/ci/tests_referenced_check.py --check gives rc 0. It merges cleanly onto main, and CI build at 73d1fde, the GPU-less container, is green.
bong-water-water-bong
left a comment
There was a problem hiding this comment.
Review at 73d1fde8 — no verdict token (author's lane). Third attempt at one test registration, and this one is clean: I ran the test, ran the checker that owns the baseline it empties, and confirmed the scope claim after a fresh fetch.
Verified by running
$ python3 tests/hyperloom_benchmark_test.py
[1bit-hl] llama-bench: rc=0 in 0.0 s -> …/logs-arm-A/llama-bench.log
hyperloom_benchmark_test: OK exit 0
$ python3 tools/ci/tests_referenced_check.py --check --root .
tests_referenced: all 82 test script(s) are referenced (1 deliberately not a row: anchor_rerun.sh);
34 tool self-test(s) and 44 python test(s) are registered exit 0
So the test really does run on a plain interpreter with its own llama-bench stub, and the sweep it belongs to is clean at the head — not just in the author's description.
The change is the right shape, and the baseline reaching zero is the point
tools/ci/unreferenced_py_tests.txt goes to empty, and its own comment is updated to say so: "The number is 0 … from here the sweep is zero-tolerance instead of a record of known gaps." That is what a baseline is for — it should be a debt ledger that gets paid off, and this pays off the last entry. The accompanying note that "the first version of the rule scanned …" keeps the correction on the record, which is why the next person will trust the rule.
The test asserts both branches, not just CI's: where mem_info_gtt_used exists the counters must be numbers with 0 ≤ used ≤ total; where it does not, they must be None — and a separate nogpu case pins the None path. A fix that only relaxed the assertion for CI would have passed CI and stopped testing anything on a real box; this one still tests the amdgpu path where it exists, which is the difference between skipping and weakening.
Scope claim checked, and it needed a fresh origin/main: after git fetch, git diff origin/main...r2195 is 3 files / +23/−5 — exactly CMakeLists.txt, the test, and the baseline — so "no other change" is true. Before the fetch the same command showed 8 files and five of them were #2209, which had merged to main in between; I nearly reviewed a stale diff, which is the third time today that ordering has mattered.
And the two superseded PRs are closed unmerged (#2115, #2124), so the carry is the only live path — no duplicate litter left behind.
One process note, not a defect
The third PR was necessary here: the CHANGES at 3461989 stood since 04:54Z while #2124 targeted #2115's branch and was never pushed into it. The cheaper fix was one push to #2115's branch; a carry costs the cap a PR and re-earns reviews that already existed. Worth remembering next time a fix exists as a PR onto a branch that is itself red for an environmental reason.
|
Persistent review updated to latest commit 73d1fde |
Refs #2018 (already closed by hand, with neither half on
main). This branch ismain+ #2115 (3461989) + #2124 (cef7015), with no other change.Why a third PR
#2115 registers
tests/hyperloom_benchmark_test.pyand emptiestools/ci/unreferenced_py_tests.txt. Itsbuildis red because the test asserted the amdgpu GTT counters exist, and CI's container has none. #2124 fixes the test, but it targets #2115's branch and has not been taken into it; the CHANGES at3461989has stood since 04:54Z. Carrying both ontomainin one PR removes the ordering problem: the row and the test that can pass in CI land together.What is in it
CMakeLists.txt: oneadd_python_test(hyperloom_benchmark_test ...)row (from tests: register the last baseline entry, so the unreferenced-test sweep is zero-tolerance (Fixes #2018) #2115).tools/ci/unreferenced_py_tests.txt: the last entry removed; the baseline is empty (from tests: register the last baseline entry, so the unreferenced-test sweep is zero-tolerance (Fixes #2018) #2115).tests/hyperloom_benchmark_test.py: real-value asserts where the GTT counters exist, null where they do not, plus an arm that runs the GPU-less branch on every box (from tests: hyperloom_benchmark_test checks GTT only where amdgpu exposes it (onto #2115) #2124).Proof, at this head on strixhalo
Registered test names,
mainversus this head: one name added (hyperloom_benchmark_test), none lost. Diff againstmain: 3 files, +23/−5.The GPU-less run is this PR's own CI
buildjob, which is the container where #2115's head fails.Merging
Once this merges, #2115 and #2124 are redundant and can be closed.
🤖 Generated with Claude Code