Repository navigation
qwen4exp: route IQ2_S routed experts to HRX when the HIP add-on exports the kernels (Flash-Next UD-IQ3_XXS fully on HRX) - #144
Merged
bong-water-water-bong merged 1 commit intoOct 25, 2026
Conversation
…IQ2_S MUL_MAT_ID GEMM mul_mat_id_requires_cpu keeps IQ2_S MUL_MAT_ID on the CPU only for K not a multiple of 256, below GGML_HRX_HIP_IQ2S_MIN_TOKENS (default 1), or when the embedded hrx_prefill_gemm code object lacks hrx_prefill_mmid_iq2_s_m64_w4 / hrx_prefill_mmid_swiglu_iq2_s_m64_w4 (looked up by export name, independent of when the dispatch registry is built). Decode runs there too: the loader probes support with a 512-token MUL_MAT_ID and then keeps the IQ2_S experts in HRX memory, where the CPU decode measured 0.64 tok/s. Qwen3.8-Flash-Next UD-IQ3_XXS (gfx1151, performance mode): PPL 1.9514 (was 1.9634 with IQ2_S on CPU), pp512 85.4 -> 297.3, tg128 12.82 -> 25.16 tok/s; UD-IQ4_XS PPL 1.8090 unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
|
Kernel side (private add-on): gpu-kernels #38. |
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.
qwen4exp-hrx-support.h: the routed-expert MUL_MAT_ID guard from #142 sends IQ2_S to HRX when the embeddedhrx_prefill_gemmcode object exports the IQ2_S kernels (both names looked up in the code object, so the answer does not depend on when the dispatch registry is built); otherwise IQ2_S stays on the CPU as before. HonoursGGML_HRX_HIP_IQ2S_MIN_TOKENS(default 1) with the add-on's matcher: every IQ2_S batch goes to HRX, one token included, because the loader's 512-token support check moves the experts into HRX memory and a CPU decode reading them from there collapsed to 0.64 tok/s.With the private add-on's IQ2_S kernels (gpu-kernels PR, GEAK-authored): Qwen3.8-Flash-Next UD-IQ3_XXS on HRX0 PPL 1.9514 +- 0.0597 (was 1.9634 with IQ2_S on CPU), pp512 85.4 -> 297.3 tok/s, tg128 12.82 -> 25.16; UD-IQ4_XS unchanged (PPL 1.8090, 282.6 / 23.84). One commit on 9705173; loom agent TNVFP4Q20, 2026-10-25.
🤖 Generated with Claude Code