ggml-cuda: smaller MMQ tile for RDNA3/RDNA4 spec-decode batches (+6–8%)#18
Merged
davide221 merged 1 commit intoJun 25, 2026
Merged
Conversation
This was referenced Jun 23, 2026
Closed
DFlash verify batches are small (ne[1] ~= ddtree_budget+1, ~23 at the default budget=22); the stock 128x128 / 8-warp MMQ tile under-occupies on consumer RDNA. A 48x64 / 4-warp tile is faster there, output bit-identical. Qwen3.6-27B Q4_K_M, --ddtree-budget=22: gfx1100 (RX 7900 XTX): 56.78 -> 60.18 tok/s (+6.0%) gfx1201 (R9700): 54.65 -> 59.37 tok/s (+8.3%) Gated on RDNA3_0 + RDNA4; gfx1151/RDNA3.5 left on the default (not benchmarked). Opt out with -DLUCEBOX_RDNA_MMQ_TILE_OVERRIDE=0. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
c5c9989 to
0154551
Compare
DeanoC
added a commit
to GeometricAGI/lucebox-hub
that referenced
this pull request
Jun 25, 2026
Bumps server/deps/llama.cpp (luce-dflash) to pick up the smaller 48x64/4-warp MMQ tile for DFlash spec-decode verify batches on consumer RDNA. Output is bit-identical; decode at --ddtree-budget=22, Qwen3.6-27B Q4_K_M: gfx1201 (R9700): 54.65 -> 59.37 tok/s (+8.3%) gfx1100 (RX 7900 XTX): 56.78 -> 60.18 tok/s (+6.0%) Depends on Luce-Org/lucebox-ggml#18; the submodule SHA should be repointed to the luce-dflash merge commit before this lands. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
lgtm |
davide221
pushed a commit
to Luce-Org/lucebox-hub
that referenced
this pull request
Jun 25, 2026
Bumps server/deps/llama.cpp (luce-dflash) to pick up the smaller 48x64/4-warp MMQ tile for DFlash spec-decode verify batches on consumer RDNA. Output is bit-identical; decode at --ddtree-budget=22, Qwen3.6-27B Q4_K_M: gfx1201 (R9700): 54.65 -> 59.37 tok/s (+8.3%) gfx1100 (RX 7900 XTX): 56.78 -> 60.18 tok/s (+6.0%) Depends on Luce-Org/lucebox-ggml#18; the submodule SHA should be repointed to the luce-dflash merge commit before this lands. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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.
Smaller MMQ tile for consumer RDNA3/RDNA4 during DFlash speculative decode.
Why
DFlash issues many small
mul_mat_qverify batches —ne[1] ≈ ddtree_budget+1, ~23 at the default--ddtree-budget=22. The stock tile (mmq_x_max=128, mmq_y=128, nwarps=8) is tuned for large GEMMs and under-occupies at that batch. A48×64tile with 4 warps runs the same q4_K matmul (~35% of decode time) faster, with bit-identical output (acceptance length unchanged).Numbers (Qwen3.6-27B Q4_K_M,
--ddtree-budget=22, 10-prompt HumanEval mean, n_gen=256)(mmq_y, nwarps)is the active lever (thenwarps*16 == mmq_ystatic_assert makes64/4the valid optimum);mmq_x_maxin 32–64 is within noise. This is the48/64/4shape originally proposed upstream for gfx1151 in ggml-org#21344, here measured to help gfx1100/gfx1201 at budget=22 (where the earlier gfx1100-only testing at budget=8 saw only ~+2%).Scope / safety
RDNA3_0(gfx1100) +RDNA4(gfx1201) only. gfx1151/RDNA3.5 is deliberately left on the default — not benchmarked here.LUCEBOX_RDNA_MMQ_TILE_OVERRIDE(default on); set=0to revert.Draft — happy to flip the default to opt-in if you'd prefer. Benchmarks measured on the two GPUs above; developed with AI assistance (Claude Code).