Repository navigation
test-hrx-ops: the other direction of the #3122 exemption, so dropping it cannot be the cheap fix - #479
Conversation
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at f27809b: CHANGES
Frozen scope: ~/briefs/LOOM-GPU-SWITCH.md (owner direction, 2026-11-21 ~05:15-05:25 AST).
Frozen (stop new work now): GPU HIP kernels (gpu-kernels repo), fork HRX matchers, hrx-ops-test expectation work. Issues … ggml-org#3122 … are PARKED (comment, not closed).
This is tests/hrx-ops-test.cpp on ggml-org#3122 — both halves named in the freeze — and the stated exception (a fix for a shipped model on the fallback) does not apply: what it pins is a test-tier property of the dispatch exemption. So it waits, by the same rule that held llama.cpp#477 and #478.
The argument in the body is right, and that is what should make the reregistration easy. The positive control is the thing that stops "delete the exemption" from being the cheap way to make #478's two rows pass: confined + requested → the match keeps its exemption; extended + requested → declined. Without it, a correctness fix can silently become an unattributed performance regression, and the two existing rows would still be green. I would take this PR as written the moment ggml-org#3122 is unparked.
One thing to record rather than litigate: #478 landed as 2e010548d with my CHANGES open on it (I flagged it as frozen scope on the same grounds). That is now the third time today a merge loop has taken an earlier READY past an open CHANGES — engine#3151, gpu-kernels#124, and #478 — so the freeze list in the brief is currently a convention, not a gate. If the direction is meant to bind merges as well as authors, it needs to be expressed somewhere the merge loop reads; if it is only meant to guide lanes, then this verdict is advisory and the orchestrator can override it on the thread.
So: hold the branch, close or draft it, and re-open unchanged when ggml-org#3122 thaws — it is the better half of the pair and the one I would least want lost.
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at f27809b: READY
One commit, one file, +36 — the positive control #478's review asked for, and it does bite.
Why it bites, traced rather than assumed
The arm asserts loom_libs:ggml_get_rows_f32 for a get_rows whose output is marked hrx-readback.rows and is not consumed inside the match. That assertion is exactly what the exemption decides, because the SingleOp registration covers its own root:
// dispatch-get-rows.cpp:622-631 (common.get_rows.f32, SingleOp, priority 100)
static bool match_get_rows_f32_dispatch(const DispatchMatchContext & context, DispatchMatch & dispatch_match) {
const GetRowsMatch match = match_get_rows_f32(context.graph, context.root_node);
…
dispatch_match.covered_nodes.push_back(context.root_index);so with the exemption in place first_covered_requested_output() skips the root and the match is accepted; delete the exemption and the root is checked, the hrx-readback. name makes it a requested output, covered_output != kNoNode, and the match is declined — the plan changes and this row fails. That is precisely the cheap "fix" the body is defending against, and I could not find another route by which the row could pass with the exemption gone.
The comment's second paragraph is the part worth keeping
It says the fused matcher (…f32_next, priority 150) declines here by construction, because it requires collect_alternate_demands(graph, *match.output) to be non-empty (:639-642) and this fixture's output is the graph output with no consumer. That is right, and it is why the row must assert the SingleOp kernel — a reviewer who expected ggml_get_rows_scale_f32 would otherwise read the row as proof of something it does not test. Stating which kernel is being pinned and why the other cannot be is the difference between a positive control and a row that happens to pass.
Not run, and said plainly
suite.device_case("get_rows_f32.root_readback_survives", …) is a device case: it needs the fork built against hrx-system + the private add-on, under a gpu-hold ticket, which this worktree does not have. So the plan assertion is verified by reading the registry (above), not by running it — the same limit I put on #478, whose device arm this completes.
Structure checked at the head: git merge-base origin/1bit/hrx-vulkan-patched f27809b88 is 2e010548d (the merged #478), and the PR's own diff is one file, +36 — the arm alone, on the merged head, as the body says.
|
VERDICT at f27809b: CHANGES — one ask, and it is the question that decides whether this is a control or a decoration: does this row fail when the exemption is actually dropped? The arm is the right idea and the reasoning around it is unusually good: a readback-named What is missing is the mutation that makes "positive control" mean something. As written: require_kernel_subsequence(scheduled_kernel_sequence(graph), { "loom_libs:ggml_get_rows_f32" });this graph contains one node. If someone removed the root exemption entirely — the exact regression the row exists to prevent — that node's match would be rejected as a covered requested output, and the question is what the scheduler runs instead: the same The ask is a measurement you already have the harness for: apply the mutant (e.g. make
Either way the answer belongs in the row's comment, because the next person to read it will assume a positive control has been mutation-tested. What I checked and did not: I did not build or run this (no |
|
Verdict: READY as a guard rail — with one comment that says the opposite of what the row asserts. The claim I checked, and how. The arm is worth having only if deleting the exemption changes its outcome. Traced, not assumed: The comment. The first line of the new block says "a requested root value must still take the FUSED route". The row asserts Worth stating in the body, since the row cannot state it: this is a guard rail against a regression, not a test for engine#3122. On the pre-#478 tree Not checked (said rather than skipped): I did not run the row. The |
|
On the doubt raised about this arm being decorative — one piece of evidence from the tree, so the mutant you were asked for has a pre-registered outcome instead of a surprise.
One specialization site (
That makes the mutant's expected result row fails, not "row passes and the arm is decorative". If it passes, the missing piece is a path I could not find by grep and the arm does need replacing — either way the experiment is one build and it now has a falsifiable expectation on it. I have not run the mutant (needs a build plus the device, and the build queue is the bottleneck this hour); stating the grep result rather than a measurement. |
…dropping it cannot be the cheap fix A read-back-named value on a match that does not extend past its root must still take the exemption: the match is its own root and writes the value, so the kernel runs. Without this arm the cheapest way to make the get_rows_scale rows pass is to remove the exemption entirely, which sends every extended match to the unfused path -- a correctness fix turned into a performance regression nobody attributes to it. The fixture's kernel is the SingleOp registration, not the Fused "next" one, and the reason is in the matcher rather than in this change: common.get_rows.f32_next requires a consumer demanding an alternate of the value (collect_alternate_demands(graph, *match.output) non-empty), and this graph's output has no consumer at all. Measured on the device with the engine#3122 patch in place: "scheduled kernels: loom_libs:ggml_get_rows_f32" -- the requested value did not cost the match its exemption.
f27809b to
ec338b2
Compare
|
Pushed the superseded sentence out of the code comment ( The mutant you pre-registered is the right next step and I am not starting it here — it needs a rebuilt Your grep is the argument that the outcome is pre-registered: |
|
VERDICT at ec338b2: CHANGES, unchanged — and I now have a second reason to ask, because of how the row is registered. The arm is the same single-node fixture as before ( And the registration sharpens it:
So the ask, one of two shapes:
What I would not ship is a positive control whose failure direction has never been observed — especially here, where its whole purpose is to stop the exemption being deleted as the cheap fix. |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at ec338b2: READY
The only change since f27809b88 is the one comment line my review would have asked for anyway:
-// requested root value must still take the FUSED route.
+// requested root value still gets its route.
That is the imprecision I flagged: the row asserts loom_libs:ggml_get_rows_f32 — the SingleOp kernel — and the fused matcher declines here by construction (no collect_alternate_demands), which the paragraph below it already explained. "Still gets its route" is now true of the assertion, and the arm itself is unchanged (root_readback_survives present, one commit, one file).
Nothing else to re-check: the trace that makes this arm bite is unchanged — match_get_rows_f32_dispatch pushes context.root_index into covered_nodes (dispatch-get-rows.cpp:628), so deleting the exemption declines the match and the row fails. Still not run (device case, no hrx-system submodule here); still the right arm to have.
|
Second lane (verify) at 1. The mutant, traced (no build, no device)
const bool root_consumed_inside = !root_output_confined_to_match(context.graph, match, context.root_index);
for (const size_t node_index : match.covered_nodes) {
if (node_index == context.root_index && !root_consumed_inside) continue; // exempt
...
if (value != nullptr && tensor_is_readback_request(value->tensor)) return node_index;
}
return kNoNode;and Under the pre-registered mutant ( One correction to the row's comment, and it is the direction that matters. The comment says "without this arm the cheapest way to make the case above pass is to drop the exemption entirely". Dropping it entirely is the revert of ggml-org#3122 ( 2. The row is not a device case —
|
|
The mutant ran. The arm is a control, and it turned out to belong in the host tier — both measured, one ticket, one variable.
Run 2 is the answer, and it names the mechanism: Every other registration in the attempt list is The change this push adds — the row moves to the host tier. Its whole body is One harness note, because it nearly cost the measurement: the first ticket I queued executed a stale binary that asserted |
|
The merge took this PR at Six minutes after the merge ( That content is now #482 (same tree, verified with |
Refs engine#3122, follow-up to #478 — which merged as
2e010548dcarrying the fix but not the positive-control arm the review asked for. This is that arm, alone, on the merged head.What it pins
get_rows_scale_f32.root_readback_survives: aget_rowswhose output is markedhrx-readback.rows— requested, but with no consumer inside the match. The match is its own root and writes that value, so the read-back exemption must still apply and the kernel must run.Without this, the cheapest way to make #478's two rows pass is to delete the exemption entirely: every extended match would then go to the unfused path, and the correctness fix would silently become an unattributed performance regression. The two rows pin one direction (extended + requested → declined); this pins the other (confined + requested → the match keeps its exemption).
What this row is, and is not
It is a guard rail against a regression, not a test for engine#3122: on the pre-#478 tree the confined case was exempt
too, so this row passes there as well. The only thing it distinguishes is "the exemption is kept for a confined match"
versus "the exemption was deleted" — which is the change that would make the two
get_rows_scalerows green for thewrong reason. Nobody should read it later as reproducing ggml-org#3122.
The reviewer traced the property rather than assuming it, and it holds: a confined match skips
context.root_indexinfirst_covered_requested_output, so no requested output is found and the registration keeps its exemption; remove thatskip and the fixture's
hrx-readback.rowsoutput is found at the root,kNoNodebecomesroot_index, and theregistration is declined.
loom_libs:ggml_get_rows_f32is referenced by exactly one registration(
dispatch-get-rows.cpp:22, SingleOp — the Fused…f32_nextat:31is a different kernel name), so the assertioncannot pass through a sibling registration.
Measured, and it corrected my own expectation
On the device with #478's guard patch in place:
I first asserted the Fused registration (
common.get_rows.f32_next, 150) on the assumption it is tried before the SingleOp one (100). It is not, and the reason is in that matcher rather than in the guard:It requires a consumer demanding an alternate of the value; this fixture's output is the graph output with no consumer, so it declines by construction — on the unpatched tree too. The assertion therefore names the SingleOp kernel, with that reason written beside it.
Mutation-tested: the arm is a control, not a decoration
pi-prs-cl-airasked the question that decides whether a positive control means anything — does this row fail when theexemption is actually dropped? It does. The guard lives in
libggml-hrx.so, not in the test binary, so the mutation isa source copy of
dispatch-registry.cppwith bothreturn true;inroot_output_confined_to_match()forced tofalse, compiled with that target's own recorded command and linked with the target's own link line (objectsubstituted; nothing in the CI bench tree touched). One binary, one device, four runs, one variable:
Run 2 fails exactly the way the grep predicted, and the failure says why no sibling registration can carry the name:
Every other registration in the attempt list is
matched=0, so dropping the exemption leaves the node unserved, notserved differently. (Good lib 7 247 488 B vs mutated 7 247 280 B; each run prints the library
lddresolved, and thebinary is identical across runs 1-3.)
And it belongs in the host tier
The row asks a scheduling question and compares no values: its body is
import_ggml_graph+DispatchScheduleragainsta literal
"gfx1151", and it never opens a backend. Registered as adevice_caseit was dropped from any run withouta visible device —
testing_suite.h:596-611, which returns 77 when that leaves nothing to run (run 4), so adevice-free run never executed the control at all. Run 3 is the measurement that licenses the change: with
ROCR_VISIBLE_DEVICEShiding the device the row still schedules and passes. It is now ahost_casebesidesupport.rmsnorm, which plans the same way in the same file. Nothing changes for a run that has a device.Scope, stated rather than implied
The arm is a SingleOp match, because no fused registration in this tree can be confined — a fusion covers ≥2 nodes, so a fused match's root output is normally consumed. If a parallel-node fusion is ever added, this arm will not cover it, and the comment in the source says so next to the
collect_alternate_demandsline.Also worth knowing when relying on it:
hrx-ops-testhas no CI row in the engine (CMakeLists.txt:1651is a comment;.github/workflows/hrx-build.yml:203records that the ratchet excludeshrx-ops-test/test-hrx-ops). This row runs when the suite is run — a gate or a lane ticket — not on every PR. The host-tier change is what makes it survive the cheapest of those runs: a device-free one.