Repository navigation
hrx: the IQ3_XXS table decode binds the six buffers its kernel launches with (engine#679) - #487
Merged
bong-water-water-bong merged 1 commit intoNov 22, 2026
Conversation
…es with (engine#679) ggml_mul_mat_id_swiglu_f32_f32_wmma_iq3s_table (ours, #216) builds the IQ3_XXS grid in workgroup memory and launches with six buffers. The #327 AMD-pin merge added a seventh codebook binding for AMD's tiled/skinny kernels and applied it to every IQ3_XXS dispatch, so with the table decode on by default the first Flash-Next UD-IQ3_XXS graph fails: command 169 kernel loom_libs:ggml_mul_mat_id_swiglu_f32_f32_wmma_iq3s_table has 7 bindings but its ABI requires 6 (rc-2026-11-22-c35 package on strixhalo, every request HTTP 500). The codebook binding now goes only to the kernels that take it; GGML_HRX_IQ3S_TABLE_DECODE=0 was the workaround. Co-Authored-By: Claude Opus 5.5 <[email protected]>
bong-water-water-bong
left a comment
Author
There was a problem hiding this comment.
Verdict: APPROVE (review by lane cl-kernel; comment-only because this is the same account).
- Correctness: checked against the base
7737fa364. The table kernel is chosen only when the gate or up weight is IQ3_XXS, and in that case the old code always appended the codebook, giving 7 bindings. The manifest entryggml_mul_mat_id_swiglu_f32_f32_wmma_iq3s_tablelists 6 (input, expert_table, partition_table, gate_weight, up_weight, output), and the.loombody declares the same 6 buffers and builds the grid in workgroup memory. With this change the table kernel gets exactly 6. The selector kernels keep the 7th slot: the grid for IQ3_XXS, a dummyinputotherwise. No other dispatch selects the table kernel. - Measurements: they support the change.
MUL_MAT_VEC_FUSIONIQ3_XXS cases fail on the pin and pass with the fix, both with table decode on and with=0. Flash-Next serves on the default path again. The PR correctly does not claim a speed-up (table vs chain: 18.97-19.00 vs 19.01-19.26 at 211 tokens). - Duplicate: #485 has the same code hunk, and the two conflict. Keep this one and close #485 (see the review there).
- Merge order: first. #486's three
routed_pair.iq3_xxs.*rows pass only with this fix.
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.
Overview
ggml_mul_mat_id_swiglu_f32_f32_wmma_iq3s_table(ours, #216, on by default for IQ3_XXS routed gate/up since #281) builds the IQ3_XXS grid in workgroup memory and launches with six buffers. The #327 AMD-pin merge added a seventh codebook binding for AMD's tiled/skinny kernels and applied it to every IQ3_XXS dispatch, including the table kernel. The first graph then fails the program's ABI check:On the rc-2026-11-22-c35 package this makes every Flash-Next UD-IQ3_XXS request return HTTP 500 on HRX (engine#679). The codebook binding now goes only to the kernels that take it.
GGML_HRX_IQ3S_TABLE_DECODE=0was the workaround.Measured (strixhalo, gfx1151,
box-hold gpu, MES failures 0 -> 0, amdgpu error lines 0 -> 0)test-backend-ops -b HRX0 -o MUL_MAT_VEC_FUSION, IQ3_XXS routed cases (m=80 and m=512, n=640, k=2560, 16 experts, 10 used):1/2 backends passedGGML_HRX_IQ3S_TABLE_DECODE=0: OK, 2 runsllama-server(engine main b262ae18 + this branch, plus fork qwen4exp: the fused top-k mask's zero base row is one host input, not a FILL per QSA layer (engine#679) #483's libllama),-c 32768 -np 1 -ub 2048, interleaved chain/table/table/chain, 512 greedy tokens, 4 runs per arm, decode tok/s:=0)The table decode serves again but is not faster than the chain on this model. Greedy text differs between the two decode paths (first differing token 64 at 211 tokens, 10 at 18,781), each path repeat-identical, both coherent; the op-level comparison above against the CPU reference passes for both. Whether the table decode should stay the default is a separate question; this PR only makes the default work.
No new test: the existing MUL_MAT_VEC_FUSION cases catch it (fail before, pass after).
Requirements
🤖 Generated with Claude Code