Repository navigation
qwen: make rmsnorm q8 publication consumer-driven again (engine #449) - #108
Merged
bong-water-water-bong merged 2 commits intoOct 18, 2026
Merged
Conversation
bong-water-water-bong
force-pushed
the
1bit/t449-qwen-rmsnorm-qual
branch
from
October 18, 2026 18:20
7dc31a1 to
fbffcbb
Compare
bong-water-water-bong
changed the base branch from
1bit/t449-qwen-q8
to
1bit/hrx-vulkan-patched
October 18, 2026 18:22
bong-water-water-bong
force-pushed
the
1bit/t449-qwen-rmsnorm-qual
branch
from
October 18, 2026 18:23
fbffcbb to
204bc5b
Compare
has_decode_q8_consumer() accepted any MUL_MAT or MUL_MAT_ID consumer, so the decode rmsnorm+quantize kernel published a q8_1 x4 alternate for a BF16 projection and for a 63-output projection, i.e. it quantized a value nobody reads. That is the part of the f2099e9 publication loss that survived as a behaviour change rather than a rename. The check is now the shared consumer qualification from #107: a qualified dense q8 projection (decode Q4_K, or Q6_K with a live output; prefill Q5_K / IQ4_XS), directly or through a full-range layout alias, or the fused routed-MoE chain where the same route ids feed the down projection through the GLU with the profile geometry. Anything else keeps the f32 path and does no quantization. Host suite, stacked on #107 (CPU, ryzen): before: 45 passed, 13 failed, 7 known-fail, 1 unexpected-pass, 66 total now: 46 passed, 12 failed, 6 known-fail, 2 unexpected-pass, 66 total The second unexpected pass is qwen_decode_publication_consumer_qualification. One real failure also went green: schedule_qwen_terminal_q6k_q8_command.tokens1, whose decode graph was seeing the unqualified publication. Both #449 markers are retired after the device gate for this PR, not before. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… (device gate passed) Same gate as the parent commit: test-backend-ops -b HRX0 1141/1141 passed, tok/s level on the MoE and dense arms, needle 7341 @4732 3/3. Co-Authored-By: Claude Opus 5.5 <[email protected]>
bong-water-water-bong
force-pushed
the
1bit/t449-qwen-rmsnorm-qual
branch
from
October 18, 2026 18:42
204bc5b to
b3f70ee
Compare
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.
Engine #449 item 2. Stacked on #107 (base
1bit/t449-qwen-q8); merge after it.The regression
has_decode_q8_consumer()indispatch-qwen-rmsnorm.cppaccepted any MUL_MAT or MUL_MAT_ID consumer, soqwen3_moe:qwen3_moe_rmsnorm_f32_quantize_q8_1_x4published a q8_1 x4 alternate for a BF16 projection, and for a 2048x63 projection, where no q8-consuming kernel exists. The quantize work and its buffer were done for a value nobody reads. This is the part of thef2099e9bpublication loss that came back as a behaviour change rather than a rename.The fix
The check is the shared consumer qualification introduced in #107:
Everything else keeps the f32 path and does no quantization, which is what the guard asserts per consumer case:
Direct,Alias,Routed,RoutedQ6,AliasedDensepublish;UnsupportedWeight,WrongOperand,IncompatibleGeometry,RoutedShape,RoutedRoutedo not.Device gate (HRX0, strixhalo)
HRX0 in use, not the CPU path: every CSV row carries
devices=HRX0andgpu_info=AMD Radeon 8060S Graphics (Node 1) (gfx1151), andtest-backend-opsreportsTesting 2 devices / Backend 1/2: HRX0. HRX attaches only withIREE_HAL_AMDGPU_LIBHSA_PATHpointing at TheRock's libhsa (~/therock100/.../_rocm_sdk_core/lib/libhsa-runtime64.so.1); with the distro lib it registers no device and everything silently runs on CPU. Every run through~/lb/thermal-run.sh, one process at a time, cooling below 70 C between runs, Tctl <= 65 C.test-backend-ops -b HRX0:Backend 1/2: HRX0, 1141/1141 tests passed.llama-bench -p 512 -n 128 -r 2 -dev HRX0 -ngl 99 -t 4, arm A =953b639, arm B = this branch (items 1+2):needle 7341 @4732 (Qwen3-8B, arm B): 3/3 OK, answer
7341, prompt 4732 tokens, identical sha on all three reps.Dispatches per token: not counted. The backend has no per-graph dispatch counter and I did not add instrumentation for this run. Structurally this change removes work rather than adding it: for an unqualified consumer the q8 quantize and its alternate disappear and the f32 path runs, which is the pre-regression behaviour for those shapes.
Host suite, stacked on #107 (CPU, ryzen)
qwen_decode_publication_consumer_qualificationpasses (marker retired in this PR), and one real failure went green as well:schedule_qwen_terminal_q6k_q8_command.tokens1, whose decode graph was seeing the unqualified publication. The remaining 12 real failures are the unchanged class A/B rows plusqwen_router_top8_dispatch.Refs engine #449, engine #445.
🤖 Generated with Claude Code