Repository navigation
qwen_moe: declare the q8 next-RMSNorm producer's writes in the manifest (engine #449) - #110
Merged
bong-water-water-bong merged 1 commit intoOct 19, 2026
Conversation
…st (engine #449) qwen3_moe_routed_down_weighted_reduce_next_rmsnorm_q8_1_x4 stores the updated residual into hidden_state and the Q8_1 x4 row into next_projection_input, but its manifest entry declared all five bindings "read". The command program therefore saw no writer for the q8 transient and rejected every graph that selects this kernel: command 16 ... binding next_projection_input value=3723 origin=Transient access=Read range=[0, 4608) reads transient value 3723 before write The matcher selects the q8 form only when a q8-reading projection consumes the normalized row, which on Qwen3-Coder-30B-A3B / Qwen3-30B-A3B Q4_K_M happens at 2..5-token batches (cached prefix + short tail, 4 concurrent requests, the 2-token load warmup). Declare hidden_state read_write and next_projection_input write, as in the f32 variant. hrx-backend-test now checks both accesses; with the old manifest that check fails. Measured on strixhalo (gfx1151, performance mode), Qwen3-Coder-30B-A3B Q4_K_M, before = 0d3ed9e, after = this commit, same build config: - llama-perplexity -c 128 one chunk, ub 2/3/4/5: before decode fails, after PPL 6.1303; ub 1/8/16 unchanged (6.2033 / 6.0813 / 6.0670) - server cached tails of 0..12 tokens, --parallel 1 and 4: before 4/13 HTTP 500 (2..5 tokens), after 0/13; 4 concurrent requests --parallel 4: before 4/4 HTTP 500, after 4/4 200 - tools/kat.py --repeat 3: PASS at --parallel 1 and 4 - -c 512 10 chunks, -b 512: PPL 10.6893 both, KLD 0.000000, top-1 100%; -b 4 -ub 4 after: KLD 0.001954 (two runs identical), -b 1 reference 0.002129 - llama-bench -fa 1, 3 interleaved rounds, medians: pp512 2081.15 -> 2084.97, tg128 91.60 -> 91.58; pp4 fails warmup before, 115.73 t/s after - test-backend-ops -b HRX0 MUL_MAT_ID 132/132, RMS_NORM 6/6, ADD 22/22, MUL_MAT 350/350 (x2; the f32 m=1 n=1 k=2048 case fails 1 in 7 runs on both builds) - Qwen3-30B-A3B-Instruct-2507 Q4_K_M: tails 2..5 HTTP 500 before, 0/13 failures after at --parallel 1 and 4 Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
qwen3_moe_routed_down_weighted_reduce_next_rmsnorm_q8_1_x4stores the updated residual intohidden_stateand the Q8_1 x4 row intonext_projection_input. Its manifest entry, though, declared all five bindingsread.The command program learns who writes a transient only from the manifest. It therefore saw no writer for the q8 transient and rejected every graph that selects this kernel:
The matcher picks the q8 form only when a q8-reading projection consumes the normalized row. On Qwen3-Coder-30B-A3B and Qwen3-30B-A3B Q4_K_M that happens at 2–5-token batches: a cached prefix with a short tail, concurrent requests, and the 2-token load warmup. That is why llama-bench and test-backend-ops never reached it, and why it blocks moving the engine's coder service to HRX.
The fix declares
hidden_stateasread_writeandnext_projection_inputaswrite, matching the f32 variant.hrx-backend-testnow checks both accesses; with the old manifest that check fails.Measured on Strix Halo (gfx1151), Qwen3-Coder-30B-A3B Q4_K_M, before = 0d3ed9e and after = this commit, same build with the private HIP kernels:
--parallel 1and4--parallel 4-c 128, ub 2/3/4/5-c 512× 10 chunks,-b 512tools/kat.py --repeat 3passes at--parallel 1and4.🤖 Generated with Claude Code