Repository navigation
hrx: the fused GDN selected-snapshot programme keeps its gate producer before the kernel (engine #533) [verify pending] - #133
Conversation
…-only value (engine ggml-org#533 verify) The fused postops export declares its bias and residual bindings with read access whether or not the kernel uses them, and the kernel only loads them when has_bias / has_residual is set. For an absent slot the dispatcher bound the command's own output transient, which the command-program verifier rejects: VERIFY-ERROR: command 2 kind=Kernel bindings=10 deps=1 binding bias value=5 origin=Transient access=Read range=[0, 16384) reads transient value 5 before write Bind a value the programme already reads instead - the weight - for those placeholder slots. The kernel never loads it (has_bias / has_residual guard the read), so nothing changes numerically. before: [KNOWN-FAIL ggml-org#533] common_mul_mat_id_postops_dispatch VERIFY-ERROR: command 2 ... binding bias value=5 ... reads transient value 5 before write after: [PASS] common_mul_mat_id_postops_dispatch (tag retired in tests/hrx-backend-test.cpp) Model check (Qwen3-Coder-30B-A3B Q4_K_M, the postops+next_rmsnorm user): the family enabled vs GGML_HRX_DISABLE_DISPATCH=common.mul_mat_id_postops.f32_f32_wmma gives identical greedy text and identical per-token top-5 logprobs on three prompts (128/126/29 tokens, max |dlogprob| = 0), and an identical second pass on the same server (cold vs warm). 90 W cap, PCM pad (23 Oct). Co-Authored-By: Claude Fable 5.1 <[email protected]>
…r before the kernel (engine ggml-org#533) match_gated_delta_net_rmsnorm_q8 replaces the last dispatch of the matched programme with the fused selected_snapshot_projection_rms_gate_q8 kernel, then cleared the whole dispatch list and pushed that one back. For a one-token graph the programme has two dispatches, so clearing dropped the first (the projections / gate producer) even though its nodes stay in covered_nodes - the fused kernel then reads raw_gate from a command that is emitted later, and the command-program verifier rejects the plan: VERIFY-ERROR: command 6 kind=Kernel bindings=5 deps=1 binding raw_gate value=33 origin=Transient access=Read range=[0, 24576) reads transient value 33 before write by command 7 Replace only the dispatch the fused kernel supersedes (back()) instead of clearing the list, so the producer stays ahead of its consumer in the programme. The planner orders commands by append position and gives each a linear dependency (dispatch/command-program.cpp), which is what makes the reversal fatal rather than merely untidy. Model check (Qwen3.8-27B UD-Q4_K_XL --mtp, the GDN selected-snapshot user): the family enabled vs GGML_HRX_DISABLE_DISPATCH=llm.gated_delta_net.selected_snapshot gives identical greedy text and identical per-token top-5 logprobs on three prompts (128/128/26 tokens, max |dlogprob| = 0), and an identical second pass on the same server (cold vs warm). 90 W cap, PCM pad (23 Oct). Co-Authored-By: Claude Fable 5.1 <[email protected]>
|
Review (orchestrator): the GDN change is the right fix - replacing only the superseded dispatch keeps the gate producer ahead of the fused kernel instead of dropping it with the whole list; the postops hunk is #131 again (already on the base, merges as a no-op) and the test table drops the ggml-org#533 tag for the case #131 fixed. Merge waits for the device verify (hrx-backend-test run from the already-built ~/wt/t533 binary, ~1 min in a claim) once the leaderboard releases the lane; then I merge and the engine pin follows. |
|
Reviewed and run at this tip (
and Command 4 is the snapshot So: this PR closes one of ggml-org#533's two rows and corrects the ordering bug behind the other, but it does not close One test note for whoever takes that: |
…(engine ggml-org#533, ggml-org#570) (#150) Registry-level fusion-order guard (dispatch-fusion-order.{h,cpp}): a match whose non-write-only binding reads transient data that no earlier dispatch (in the plan or in the match) wrote is refused and falls through to the next registration; GGML_HRX_FUSION_ORDER_GUARD=0 disables, GGML_HRX_LOG_FUSION_ORDER=1 logs. Also: routed-ffn gate_up_swiglu_f16_wmma only when every GLU consumer is a Q4_K/Q6_K routed down projection (a real defect: other down weights read an unwritten f32 value). hrx-backend-test host 60/0/6 -> 63/0/3, device 11/11, test-backend-ops 314/314, KLD identical on Qwen3.5-4B / ZAYA1-8B / Qwen3.8-27B with 0 refusals, 27B draft-mtp completions identical, hw-gate PASS. Supersedes #133 and #146. Co-Authored-By: Claude Fable 5.1 <[email protected]>
|
Superseded by #150 (merged): a registry-level read-before-write guard closes engine ggml-org#533 / ggml-org#570 for all matchers; #133's kept copy read a value nothing writes in the fused programme (the 'value 10' error), and #146's consumers_covered_by is covered by the guard's checks 1 and 3. |
What
match_gated_delta_net_rmsnorm_q8replaces the last dispatch of the matched programme with the fused..._selected_snapshot_projection_rms_gate_q8kernel, and then cleared the whole dispatch list beforepushing that one back:
A one-token graph's programme has two dispatches, so that dropped the first — the projections / gate
producer — even though its nodes stay in
selected.covered_nodes. The fused kernel therefore readsraw_gatefrom a command that is emitted after it, and the command-program verifier rejects the plan(engine ggml-org#533):
Replace only the dispatch the fused kernel supersedes (
back()), so the producer stays ahead of itsconsumer. The planner orders commands by append position and gives each a linear dependency on the
previous one (
dispatch/command-program.cpp: "TODO: replace this linear ordinal dependency with realgraph/resource dependency analysis"), which is what makes the reversal fatal rather than merely untidy.
Before (at the pin, llama.cpp
7ca8ba5a+ hrx-system82804197)Dumped programmes show the same case's passing shapes are 7 commands with
gdn@4readingraw_gate = value 7written by command 3 — the normal order — while the failing shapes are exactly the ones that takethis branch.
After — pending, and why
The verifier re-run for this branch has not been made: the owner handed the GPU lane to the 27B
leaderboard ("no new gpu-hold claims until 'leaderboard done'") in the middle of this change, and I
cancelled my queued claim rather than sit on the lane. The command is ready to run:
I am not claiming PR-READY for this one until that output exists.
Model check (unchanged either way)
Qwen3.8-27B UD-Q4_K_XL
--mtp, family enabled vsGGML_HRX_DISABLE_DISPATCH=llm.gated_delta_net.selected_snapshot, per-token top-5 logprobs:Cold-vs-warm identical.
90 W cap, PCM pad (23 Oct). So the fix is plan-order only; it cannot movenumbers, and the A/B above is the evidence for that.
Risk
One branch of one matcher, no kernel change, no binding-count change: the programme keeps one more
dispatch, which was already being covered by this match before it was dropped. If the verifier still
complains after the re-run, the remaining candidate is the planner's linear dependency model (the TODO
above), not this matcher.