Repository navigation
hrx: the absent bias/residual slots of mul_mat_id_postops bind a read-only value (engine #533 verify) - #131
Merged
bong-water-water-bong merged 1 commit intoOct 23, 2026
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]>
This was referenced Oct 23, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The fused
mul_mat_id_postopsexport declares itsbiasandresidual_inputbindings with readaccess unconditionally, and the kernel only loads them when
has_bias/has_residualis set. For anabsent slot the dispatcher filled it with the command's own output transient, which the
command-program verifier rejects (engine ggml-org#533):
This binds a value the programme already reads (the expert weight) for those placeholder slots instead.
The kernel never loads it — the read is guarded by
has_bias/has_residual— so the change isnumerically inert by construction.
Before / after (
hrx-backend-testat the pin, llama.cpp7ca8ba5a+ hrx-system82804197)The
#533tag is retired intests/hrx-backend-test.cppin this PR, so the case prints[PASS]; the[UNEXPECTED-PASS]above is this harness's name for "a tagged known-fail started passing".The other three
#533rows are untouched by this patch and still fail (see "not in this PR" below).Model check — the fused path is numerically identical either way
Qwen3-Coder-30B-A3B Q4_K_M (the
postops + next_rmsnormuser), one server per arm, per-token top-5logprobs on the three bench prompts, plus a second pass on the same server (cold vs warm):
Arms: default vs
GGML_HRX_DISABLE_DISPATCH=common.mul_mat_id_postops.f32_f32_wmma. Cold-vs-warmidentical on all three.
90 W cap, PCM pad (23 Oct).So this is a plan-declaration defect with no model-visible effect — worth fixing because the verifier is
the backend's own correctness gate, not because it was changing numbers.
Not in this PR
qwen_attention_postprocess_dispatch,gdn_selected_rms_q8_dispatchandqwen_routed_gate_up_dispatchstill fail the same verifier for a different reason: their fused programmes emit a consumer command
before the command that writes a transient it binds, and the planner's dependency model is linear
(
dispatch/command-program.cpp: "TODO: replace this linear ordinal dependency with real graph/resourcedependency analysis" →
dependencies.push_back(command.ordinal - 1)), so the verifier sees a forwardedge (
reads transient value 33 before write by command 7). That needs the producer-before-consumerordering inside those matchers (or the resource-dependency analysis the TODO describes), and it is the
next change rather than this one. For the record, disabling the GDN family on
Qwen3.8-27B
--mtpalso changes nothing numerically (128/128/26 tokens, max |Δlogprob| = 0, cold vs warmidentical).
Risk
One dispatcher branch, no kernel change, no new binding count (the slot keeps its declared position and
access). The three untouched cases behave exactly as before.