Repository navigation
hrx: MoE decode GEMV without runtime divisors - #38
Merged
bong-water-water-bong merged 1 commit intoSep 29, 2026
Merged
bong-water-water-bong merged 1 commit into
bong-water-water-bong merged 1 commit into
Conversation
Newer Loom (hrx-system 244cd38) lowers integer division only for constant divisors on AMDGPU. ops/mul_mat_id_decode_f32.loom split its flat row index with index.div / index.rem by the runtime slot count and took the input row as slot % input_rows, which would stop compiling at the next HRX bump (the engine's pinned Loom still accepts it). The launch grid is now (row pairs, slot_count, token_count), so the slot and token come from the workgroup ids, and the input row is a select: slot when each slot has its own activation, 0 when they share one. The matcher now admits only those two input layouts (input_rows == 1 or == slot_count), the ones llama.cpp's MUL_MAT_ID produces. ZAYA1-8B HRX0 (gate/up read a shared input, down one per slot): greedy 6 prompts x 48 tokens identical, max |dlogprob| 0; decode unchanged (66.5 tok/s before and after, 3 interleaved rounds). GLM-4.7-Flash HRX0 still answers " Paris." through the kernel. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
|
Merging over the |
bong-water-water-bong
merged commit Sep 29, 2026
1174e7b
into
1bit/hrx-vulkan-patched
10 of 26 checks passed
bong-water-water-bong
added a commit
that referenced
this pull request
Oct 25, 2026
…ts the kernels (#144) The #142 guard sends IQ2_S MUL_MAT_ID to HRX when the embedded hrx_prefill_gemm code object exports the IQ2_S kernels (names looked up in the code object), every batch incl. one token (GGML_HRX_HIP_IQ2S_MIN_TOKENS, default 1): a CPU decode reading experts the loader had moved into HRX memory collapsed to 0.64 tok/s. Flash-Next UD-IQ3_XXS on HRX0 with gpu-kernels #38: PPL 1.9514, pp512 297, tg128 25.2. Co-Authored-By: Claude Fable 5.1 <[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.
Same issue as #37, this time in #32's MoE decode kernel. Newer Loom (hrx-system 244cd38) lowers integer division only for constant divisors on AMDGPU. The kernel divided its flat row index by the runtime slot count, and took the input row as
slot % input_rows. That would stop compiling at the next HRX bump; the engine's pinned Loom still accepts it.What changed:
slot_count,token_count), so slot and token come from the workgroup ids.input_rows1 orslot_count), which are the ones llama.cpp's MUL_MAT_ID produces.Checked on strixhalo, HRX0:
Not covered: a
check.casefor this kernel. The corpus's shared decode library files (AMD's) don't parse under 244cd38 yet, so a Loom-level test waits for AMD's corpus migration.🤖 Generated with Claude Code