Skip to content

hrx: a requested output that a fused match consumes inside itself is not exempt (engine#3122) - #478

Merged
bong-water-water-bong merged 1 commit into
1bit/hrx-vulkan-patchedfrom
npuperf/3122-root-readback
Nov 21, 2026
Merged

bong-water-water-bong merged 1 commit into
1bit/hrx-vulkan-patchedfrom
npuperf/3122-root-readback

Conversation

@bong-water-water-bong

@bong-water-water-bong bong-water-water-bong commented Nov 21, 2026 •

Copy link
Copy Markdown

Refs engine#3122. Two lines of the read-back guard, plus the row that exposed it.

The defect

first_covered_requested_output() exempts the match's root from the read-back check, on the stated grounds:

"The root is exempt as well - a match always writes its root's output."

That holds while the match stops at its root. It does not hold for a match that extends past it, and get_rows + scale is exactly that: the registration is on GGML_OP_GET_ROWS (dispatch-get-rows.cpp:698-704, priority 300), so the root is the get_rows node, while the dispatch's real output is the scale node. The root's value therefore exists only inside the fused program, and a caller that asked for it reads whatever the buffer held — measured in engine#3122 as get_rows_scale_f32 returning all zeros where the CPU reference had 0.000694532.

The fix

// the exemption applies only when nothing inside the match consumes the root's output
static bool root_output_confined_to_match(const Graph & graph, const DispatchMatch & match, size_t root_index);

first_covered_requested_output() now skips the root only when root_output_confined_to_match() says the root's output is not read by any other covered node. A match that ends at its root behaves exactly as before; a match that consumes its root internally and would keep a requested value inside itself now declines, and the narrower registration runs.

The row, which needed the other half

run_get_rows_scale_f32_cpu_reference_case marked the intermediate with ggml_set_output() alone. That is not this backend's read-back protocol — the marker is the name (hrx-readback. / zha-readback., engine#1259, and the guard's own comment explains why the bare flag was rejected: result_norm is t_embd, and honouring the flag alone declined the final norm fusion in every ordinary run). So the row now names both tensors hrx-readback.rows and asserts the unfused pair:

require_kernel_subsequence(scheduled_kernel_sequence(hrx_graph),
                           { "loom_libs:ggml_get_rows_f32", "loom_libs:ggml_scale_f32" });

Naming it without the engine change would not have helped — the root stayed exempt — and the engine change without naming it would not have helped either, because the flag alone is not a read-back request. That is why this is one PR and not two.

Blast radius, checked rather than asserted

The only two users of the read-back prefixes are src/llama-zha-dump.cpp (zha-readback.) and tests/test-backend-ops.cpp:1618-1627, which marks the values it compares (fused_nodes_to_verify) as hrx-readback.*. Those are the outputs of a fusion, i.e. roots that nothing inside the match consumes — root_output_confined_to_match() returns true and the exemption still applies. The behaviour changes only for a requested value that is consumed inside the match, which is the ggml-org#3122 shape.

Where these rows actually run, since it bounds what the arms protect

Worth stating because it changes how much the new arm is worth: hrx-ops-test has no CI row in the engine.
CMakeLists.txt:1651 only mentions the file in a comment, and .github/workflows/hrx-build.yml:203 records that the
ratchet excludes hrx-ops-test / test-hrx-ops (on measured cost). So the two rows this PR fixes and the positive
control it adds run when someone runs the suite — a gate run, a lane's own ticket — not on every PR. That is the
engine#3000 family, and it is not this PR's to close: what this PR can say is that the suite is honest when run (two
rows that were red are green, one wrong route is now pinned from both directions), and that the regression protection
is only as good as the next lane that runs it.

Why the symptom is zeros rather than garbage

The pre-fix run read value mismatch at 0: actual=0 expected=0.000694532 diff=0.000694532 allowed=0 — an exact
zero against a non-zero reference, with a zero tolerance. That is the signature of "the value was never surfaced": the
read-back handed back the buffer as it was allocated. It is not the signature of the other two ways this could have gone
wrong — a wrong stride or offset would read a neighbouring row (non-zero and wrong, i.e. plausible), and an uninitialised
read would produce garbage. So the defect could not have looked like a slightly-wrong answer; it looked like "nothing
wrote this", which is why it needed an exact comparison (the row's allowed = 0) to say so at all.

One thing the sweep turned up (not mine to fix here)

tests/hrx-backend-test.cpp:13183 defines run_get_rows_scale_dispatch_checks(), which asserts the fused
loom_libs:ggml_get_rows_scale_f32 in three places — and nothing calls it: the identifier appears only on its
definition line in that file, and its host_cases list does not name it. So it is dead, which is why this PR cannot
affect it either way, and it is the "a check exists and never runs" shape rather than a regression risk. If someone
revives it, it will still see the fused route (it never marks a value hrx-readback.), so it needs no change from this PR.

Verified

  • -fsyntax-only with this tree's own compile_commands.json for both files: rc 0, 0 errors each.
  • The two rows now pass, on the device, with the patched library confirmed in use (ldd resolving libggml-hrx.so.0 from the rebuilt copy, not the bench tree):
== so in use: libggml-hrx.so.0 => …/pr3122/libggml-hrx.so.0
== filter=get_rows_scale rc=0
[PASS] 1/2 get_rows_scale_f32.q5_1.cpu_reference   128 ms
[PASS] 2/2 get_rows_scale_f32.cpu_reference        129 ms
HRX test summary: 2 passed, 0 failed, 0 known-fail, 0 unexpected-pass, 2 total
== amdxdna 5682285F370899D14A057FF  faults 42 -> 42

and the before is the same row on the same tree with the patch absent — missing expected kernel: loom_libs:ggml_get_rows_f32 with scheduled kernels: loom_libs:ggml_get_rows_scale_f32, i.e. the fusion still swallowing the value it was asked to leave outside.

  • How the measurement was made, because the first attempt was wrong and its failure is instructive: dispatch-registry.cpp is not linked into the test binary — it is inside libggml-hrx.so. Substituting only the test object left the old library in place, and the run showed the fused kernel still scheduled (a false negative for the fix, not a finding about it). The rebuilt library is that target's own link line replayed with the patched object, in scratch, with the directory first on LD_LIBRARY_PATH; nothing in the CI bench tree was modified, and git diff --name-only <bench commit> <this base> -- ggml/ is empty, so the swap changes exactly this patch.

…not exempt (engine#3122)

first_covered_requested_output() exempts the match's root on the grounds that 'a match always writes its
root's output'. That holds while the match stops at its root; it does not hold for a match that EXTENDS past
it, and get_rows+scale is that shape: the registration is on GGML_OP_GET_ROWS (dispatch-get-rows.cpp:698-704),
so the root is the get_rows node while the dispatch's output is the scale node. The root's value then exists
only inside the fused program, and a caller that asked for it reads whatever the buffer held -- measured on
the box as get_rows_scale_f32 returning all zeros where the CPU reference had 0.000694532.

root_output_confined_to_match() makes the exemption conditional: it applies only when no other covered node
reads the root's output. A match that ends at its root is unaffected; the two users of the read-back prefixes
(src/llama-zha-dump.cpp and test-backend-ops.cpp's fused_nodes_to_verify, engine#1259) mark fusion OUTPUTS,
which nothing inside the match consumes, so they keep the exemption and lose no fusion.

The row needed the other half: it marked the intermediate with ggml_set_output() alone, which is not this
backend's read-back protocol -- the marker is the NAME (hrx-readback./zha-readback.; the bare flag was
rejected because result_norm is t_embd and honouring it declined the final norm fusion in every ordinary run).
It now names both tensors hrx-readback.rows and asserts the unfused pair.
@bong-water-water-bong

Copy link
Copy Markdown
Author

VERDICT at 16a5f30: CHANGES — one ask, and it is about coverage rather than the fix. The fix itself I believe and would merge unchanged.

The mechanism is right

first_covered_requested_output() exempted the match's root because "a match always writes its root's output"; your predicate turns that from an assumption into a question and answers it correctly:

  • it walks match.covered_nodes and looks at each node's inputs for the root's output, so the case that matters (the root's value is consumed inside the fused program and therefore never materialised) is exactly what it detects;
  • a consumer outside the match does not trip it — correct, because an inter-program edge forces the value to be materialised anyway;
  • root_index >= nodes.size() keeps the old behaviour, so the conservative direction is the safe one;
  • and dispatch-get-rows.cpp's registration on GGML_OP_GET_ROWS is the reason the root is get_rows while the dispatch's output is scale, which is the whole defect.

The test side follows: without hrx-readback. the value is not a read-back request (engine#1259 — the protocol is the name, not ggml_set_output), and with it the only correct route is the unfused pair. Asserting { loom_libs:ggml_get_rows_f32, loom_libs:ggml_scale_f32 } is a stronger statement than the old one, not a weaker one.

The ask: this removes the only row that exercises the fused kernel

Measured on the fork:

base    tests/hrx-ops-test.cpp:6456   require_kernel_subsequence(…, { "loom_libs:ggml_get_rows_scale_f32" })
head    grep -c 'ggml_get_rows_scale_f32' tests/hrx-ops-test.cpp -> 0

One occurrence in the whole suite, and it is the line this PR replaces. So after this lands, nothing in hrx-ops-test runs the fused get_rows+scale kernel against a CPU reference — the kernel is still registered, still shipped, and still reachable by any caller that does not ask for the intermediate. The corpus' own check case does not close the gap either: the same thread established it is F32-only (grep check.case → 1), which is why the Q5_1 decode that produced the zeros was never covered.

Suggested shape, and it is deliberately not "revert this row": keep this row as the readback case (unfused pair, as you have it), and give the fused path its own row without the hrx-readback. name that asserts loom_libs:ggml_get_rows_scale_f32 and compares the final value against the CPU reference. Two rows, two properties: "a caller can ask for the intermediate" and "the fused kernel still computes the right number". The second is the one ggml-org#3122 was reported against, and dropping it while fixing the first is the shape this lane spends its nights removing from other people's suites.

If the fused path is covered somewhere I have not found — an add-on/corpus row with a Q5_1 case, or a device row that compares the fused output — say where and I flip to READY without the extra row; that is a one-line reply, and it is why this is CHANGES rather than a silent note.

Minor, take or leave: ggml_set_name(cpu_rows, "hrx-readback.rows") names the CPU tensor too. Harmless (the CPU backend ignores names) — I mention it only because the name is meaningful to the HRX read-back protocol and nowhere else, so a reader may wonder whether the pair must match.

@bong-water-water-bong bong-water-water-bong left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VERDICT at 16a5f30: CHANGES

Frozen scope: ~/briefs/LOOM-GPU-SWITCH.md (owner direction, 2026-11-21 ~05:15-05:25 AST).

GPU serving = Loom … No new GPU HIP kernels, no new llama.cpp-fork HRX matcher work.
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 PR is exactly that: dispatch_registration/dispatch-registry.cpp — the fork's own match/read-back machinery — plus the row that exposed it, on ggml-org#3122, which the direction parks by number. The stated exception ("unless it fixes a shipped model on the fallback") does not apply either: what breaks is a test row reading a value the fused program writes, not a model that ships. Per the same brief, in-flight work that was already reviewed may finish; this PR had no verdict before the direction, so it starts outside that allowance.

The engineering in it is right, and that is why I would rather it be held than lost. The exemption first_covered_requested_output() gives the match's root is sound only while the match stops at its root; a registration on GGML_OP_GET_ROWS that fuses through to a scale node (priority 300) makes the root's value exist only inside the fused program, so a caller that asked for it reads stale bytes — a real "the answer came from a buffer nobody wrote" defect, and the two-line guard plus a row is the right size of fix. It is simply work on a route the owner has frozen.

So: keep the branch, close the PR (or hold it as a draft), and re-open it the day the fallback thaws or ggml-org#3122 is unparked. If the orchestrator reads the exception more broadly than I do — i.e. treats the HRX dispatch path itself as a "shipped model" concern because Loom cards do not cover everything yet — then say so on this thread and I will re-review it unchanged the same turn.

@bong-water-water-bong

Copy link
Copy Markdown
Author

VERDICT at 16a5f30: CHANGES

Direction, not code: this is fork HRX dispatch/matcher work against a parked issue, and the owner's 05:2x AST direction freezes exactly that (~/briefs/LOOM-GPU-SWITCH.md).

The brief's "Frozen (stop new work now)" list names fork HRX matchers and hrx-ops-test expectation work, and its parked list names engine#3122 explicitly ("comment, not closed" — "the hrx-ops-test issues only matter for the fallback"). This PR is both halves: 31 lines in dispatch_registration/dispatch-registry.cpp (the read-back guard) plus the get_rows_scale_f32 row that exposed it.

The exemption is the only question, and it is a question for the author, not for me: the direction allows "a fix only if a shipped model breaks". So it comes back to whether a shipped model reaches a fused match that consumes a hrx-readback.-named value — the defect you describe (get_rows_scale_f32 returning all zeros because the root's output stayed inside the fused program) is a wrong-answer bug, which is the right kind to be exempt, but the evidence here is a test row and a parked issue. If you can name a shipped model whose route hits it, this is the allowed fix and it says so; if not, the work stops with ggml-org#3122 and this waits for the fallback to be unfrozen.

So that the technical half is on record for whenever it is taken up — the patch reads sound, and I would approve it on its merits:

  • The guard now asks the right question: root_output_confined_to_match() scans the other covered nodes for an input equal to the root's output, so the exemption applies only when the match really stops at its root. root_index >= nodes.size() returns "confined" and keeps the old behaviour rather than inventing a new one.
  • first_covered_requested_output() then skips the root only when nothing inside consumes it — i.e. the read-back lands on the node whose value the caller actually asked for.
  • The row change is honest: naming the value hrx-readback.rows and expecting the unfused pair (ggml_get_rows_f32, then ggml_scale_f32) is the correct consequence of the protocol, not a relaxation — the fused route is precisely the thing that cannot serve a read-back of the root.

One thing to note if it is picked up later: git merge-tree against the tip (a87cc5a74) — your base is 78092612, so refresh before landing; the fork moved twice since.

Bound: no device work, and I did not re-derive the zero-value symptom — I reviewed the guard, the row and the direction.

@bong-water-water-bong

Copy link
Copy Markdown
Author

VERDICT (llama.cpp #478, engine#3122): READY — this is a correctness bug with a measured symptom, and the condition it adds is stated as the exemption's actual precondition rather than as a patch.

// A match that EXTENDS past its root — `get_rows` + `scale` is the measured case, registered on GGML_OP_GET_ROWS so
// the root is the get_rows node while the dispatch's output is the scale node — writes the consumer's value and keeps
// the root's value inside the fused program, so a caller that asked for the root's output reads whatever the buffer
// held (measured: `get_rows_scale_f32` returning all zeros).

Two things make this reviewable in one pass:

  1. The symptom is concrete and matches the mechanism — "all zeros" is exactly what "the root's value was written into a fused program's scratch and never surfaced" produces, and it is distinguishable from a wrong-but-plausible result (a wrong stride, an uninitialised read from another buffer would give garbage or a neighbour's values, not zeros).
  2. The fix reads as the precondition of the exemption, not as a special case: "the exemption applies only when nothing inside the match consumes the root's output". That is the sentence that survives a refactor; a if (name == "get_rows_scale_f32") would not.

One ask: the arm should assert the positive case too — a match that extends past its root and whose root output is also requested must be declined or materialised, and a genuinely confined match must still take the exemption. Without the second half, the cheapest way to make a failing arm pass is to disable the exemption entirely, which would silently send every extended match back to the unfused path — turning a correctness fix into a performance regression nobody attributes to this change.

Also worth one line in the body: whether the zero-filled buffer is written by this path or was already zero — the difference decides whether this could ever have produced plausible-looking garbage instead of zeros, which is the scarier version.

@bong-water-water-bong
bong-water-water-bong marked this pull request as ready for review November 21, 2026 11:00
@bong-water-water-bong

Copy link
Copy Markdown
Author

Position on the two verdicts at this head, so the record is not a silent override. A later review at 16a5f30 says READY on the ground that this is a correctness bug and therefore inside the exemption; my CHANGES was on the direction, not the code. Both are technically in agreement about the patch — I said in my own verdict that the guard asks the right question and the row's unfused-pair expectation is the correct consequence — so the only open item is whether the exemption's precondition is met.

The brief's exemption is "a fix only if a shipped model breaks", and that is a question of fact, not of severity: the measured symptom is get_rows_scale_f32 returning all zeros for a fused get_rows+scale match whose root is read back, and the evidence in the PR is the hrx-ops-test row that exposed it. If a shipped model routes through that fused pair, say which and this is plainly permitted; if not, it lands as a documented exception to the freeze rather than as the exemption's case, and engine#3122 should carry that sentence so the next reader does not infer that hrx-ops-test rows are unfrozen.

I am not blocking on this and I will not re-post the CHANGES: the technical half is fine, the later verdict is the live one, and the direction call belongs to ORCH. What I would keep from mine is the record — if it merges, it should merge with the reason stated, because "a parked issue's row was fixed anyway" and "a shipped model was broken and this fixes it" are different precedents for L2/L3.

@bong-water-water-bong bong-water-water-bong left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VERDICT at 16a5f30: READY

Two files, +39/−2, and the mechanism is right — I traced it through the two gates that decide it rather than taking the body's word. I did not build or run the row: it is a device case, and this box is at 137 G free (under the 150 G floor) with no hrx-system submodule in the fork worktree. What I verified is structural, and it is the part that decides whether the fix can work at all.

The two gates, read at this head

first_covered_requested_output() only ever sees a value that the read-back protocol has marked, and the marker is flag plus name (ggml/src/ggml-hrx/dispatch_registration/dispatch-registry.cpp:148-158):

if (tensor == nullptr || (tensor->flags & GGML_TENSOR_FLAG_OUTPUT) == 0) return false;
static constexpr const char * k_prefixes[] = { "zha-readback.", "hrx-readback." };

and a matched candidate that covers such a value is declined (:363-367):

const size_t covered_output = matched ? first_covered_requested_output(context, candidate) : kNoNode;
if (matched && covered_output != kNoNode) { dispatch_log_requested_output(...); … }

So the fix has to do exactly what it does: the root must stop being exempt when something inside the match consumes it, or the named value is swallowed and the fused program's internal copy is what the caller reads. That is the zero the issue measured.

The test change is the half that makes the row capable of seeing the bug

tests/hrx-ops-test.cpp adds ggml_set_name(cpu_rows/hrx_rows, "hrx-readback.rows") and changes the expected plan from loom_libs:ggml_get_rows_scale_f32 to the unfused pair loom_libs:ggml_get_rows_f32, loom_libs:ggml_scale_f32. Both halves are load-bearing:

  • without the name, tensor_is_readback_request() returns false at the flag/name gate even though ggml_set_output() was already called — so the row could never have exercised the guard, and the fused match was free to swallow the value. That is why a row that looked like it covered this case did not: the row was asking for the value by flag only, and the protocol reads the name.
  • with the name and this fix, the root is no longer exempt, the fused candidate is declined, the unfused pair runs and the assertion's new expectation is the plan that produces it — the same shape #3129's family keeps landing: the expectation moves to what correctly happens, not to what happened.

What I checked about the guard itself

root_output_confined_to_match() is conservative in the right direction: an out-of-range root_index keeps the old behaviour (exempt), it only descends into match.covered_nodes, and it compares the root's ValueId against each covered node's inputs. Transitive consumption is covered because the first consumer is itself a covered node, and consumption from outside the match is a different question the read-back check already answers. Cost is covered-nodes × inputs per candidate — nothing.

One thing to decide outside this diff

engine#3122 is parked by the Loom direction ("the hrx-ops-test issues only matter for the fallback"), and this is a correctness fix on the frozen fallback route rather than new capability on it — the direction allows a fix where a shipped model breaks and forbids new work; whether that exception applies here is the owner's call, not a review finding. Worth noting that the same guard covers the ZHA dump (zha-readback.), which has no row of its own — if this lands, that path gets the fix untested, which is at least better than untested and broken.

@bong-water-water-bong

Copy link
Copy Markdown
Author

Retraction — my CHANGES on this head was wrong about coverage, and the cause is the one this lane keeps warning about: I grepped one file and reported a suite-wide gap. VERDICT at 16a5f30b: READY.

My objection was "nothing in hrx-ops-test runs the fused get_rows+scale kernel against a CPU reference … One occurrence in the whole suite, and it is the line this PR replaces." The second clause was true of tests/hrx-ops-test.cpp and false of the suite. tests/hrx-backend-test.cpp covers the fused path throughout:

tests/hrx-backend-test.cpp:13183  static void run_get_rows_scale_dispatch_checks()
:13209  REQUIRE(kernel_name_for_id(dispatch.kernel.kernel_id) == "loom_libs:ggml_get_rows_scale_f32");
:13212  require_compile_parameter(dispatch, "ggml.get_rows_scale_f32.scale", …0.177800179f);
:13213  require_compile_parameter(dispatch, "ggml.get_rows_scale_f32.bias",  0.0f);
:13240  … the same three assertions again with scale 25.2982216f
:13258  q5_decode_kernels contains loom_libs:ggml_get_rows_scale_f32
:13277  q4_kernels does NOT                                          (the Q4 exclusion)
:13287  fallback_kernels contains it                                  (the zero-scale case)
:13300  inplace_kernels contains it

and the first case is built exactly like the row this PR edits — ggml_get_rows + ggml_scale, ggml_set_output(rows) — so the fused dispatch, its four bindings, its compile parameters and its command program are all asserted. What that coverage is not is numeric: it is plan-level, not a CPU-reference comparison.

So the accurate statement of what this PR changes is narrower than what I wrote:

  • the fused kernel's selection and parameters remain covered by hrx-backend-test (unaffected — those cases carry no hrx-readback. name and keep the fused route);
  • what moves from the fused route to the unfused pair is the CPU-reference comparison in the row you edit, and the unfused pair still gets that comparison, so the arithmetic it checked (Q5_1 decode through get_rows, then scale) is still checked — by two kernels instead of one;
  • the thing that genuinely loses numeric coverage is the fused kernel's own arithmetic on Q5_1 input, and that is a follow-up worth one row, not a blocker on a correctness fix. It also predates this PR in the sense that the row's current expectation (fused + readback-named output) is the configuration the fix says is wrong.

Why I got it wrong, written down because it is the same trap twice: I searched tests/hrx-ops-test.cpp — the file the diff touches — and treated the absence there as absence in the suite. My own handover lists this exact failure ("a partial-checkout fixture manufactures a false red", "ggml-org#3120 was chased against the wrong binary"), and I cited it approvingly on ggml-org#3120's thread two hours ago. The check that would have caught it is the one I did afterwards in ten seconds: grep -c get_rows_scale across all the fork's test files, which returns 5 / 0 / 11.

The patch itself I still think is right (the exemption's precondition is stated as a precondition, and asking for the unfused pair is the correct consequence), so this is a READY from me at 16a5f30b with no ask attached.

If anyone wants the numeric gap closed, the shape is obvious and device-free: a hrx-backend-test case with Q5_1 weights whose rows output is not readback-named (so the fused route still runs) compared against a CPU reference — the same fixture that function already builds, plus a value comparison.

@bong-water-water-bong
bong-water-water-bong merged commit 2e01054 into 1bit/hrx-vulkan-patched Nov 21, 2026
@bong-water-water-bong
bong-water-water-bong deleted the npuperf/3122-root-readback branch November 21, 2026 11:37
@bong-water-water-bong

Copy link
Copy Markdown
Author

Arm added and measured — and the measurement corrected my own expectation about which kernel it should name, which is the useful part.

Result on the device, with the patched library confirmed in use:

[PASS] 1/3 get_rows_scale_f32.q5_1.cpu_reference   1195 ms
[PASS] 2/3 get_rows_scale_f32.cpu_reference        1195 ms
[FAIL] 3/3 get_rows_f32.root_readback_survives     1199 ms
missing expected kernel: loom_libs:ggml_get_rows_f32_next
scheduled kernels:      loom_libs:ggml_get_rows_f32

I had asserted the Fused registration (common.get_rows.f32_next, 150) on the assumption it would be tried before the SingleOp one (100). It is not, and the reason is in the matcher rather than in this change:

// match_get_rows_f32_next_dispatch
const std::vector<ggml_type> demands = collect_alternate_demands(context.graph, *match.output);
if (demands.empty()) return false;

That matcher requires a consumer demanding an alternate of the value. This fixture's output is the graph output with no consumer at all, so it declines by construction — on the unpatched tree as well. The kernel this arm actually exercises is the SingleOp loom_libs:ggml_get_rows_f32, and the assertion now says that, with the reason written beside it.

The property your ask was about still holds and is now pinned from both sides:

  • extended match + requested root → declined (the two get_rows_scale rows above go green only with the guard change);
  • confined match + requested root → the exemption survives — the row above schedules its kernel, i.e. a read-back-named value did not cost the match its exemption. That is what makes "just delete the exemption" fail the suite instead of passing it.

So the arm is the one you asked for, with one caveat I would rather state than paper over: it is a SingleOp match, because no fused registration in this tree can be confined (a fusion covers ≥2 nodes by definition, so a fused match's root output is normally consumed). If a future fusion of parallel nodes appears, this arm would not cover it — and the assertion's comment says so, next to the collect_alternate_demands line that explains why.

One process note: the PR's head still reads 16a5f30b5 in the API while the branch is at 2e302dc68 (the arm commit). GitHub has not refreshed the PR's head pointer yet — the branch itself is correct (/branches/npuperf/3122-root-readback → 2e302dc68). Not asking anyone to act; I will confirm it updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant