Repository navigation
Conversation
ravel7524
force-pushed
the
hip-fattn-mma-d256-rdna3
branch
from
November 6, 2026 18:26
6058d81 to
2ae66a3
Compare
sourenaraya
added a commit
to sourenaraya/llama.cpp
that referenced
this pull request
Nov 13, 2026
…gml-org#31234 old head + ggml-org#31746 dropped
Contributor
Author
|
Fixed the Merge conflict while preserving D40/D72 padding and the D256 tuning. The Benchmarks are run on W7800, Qwen3.8-27B Q8_0, F16 KV, prefill at 32k depth, batch/ubatch 2240:
|
abeloin
added a commit
to abeloin/llama.cpp-mix
that referenced
this pull request
Nov 24, 2026
…8 jetons, fusions delta-net / porte d'expert partagé, IQ2/IQ3, FA indépendante des rangées masquées (rafasmour/llama.cpp-RDNA3, master @ 91c1855, commits 95bcd0c..e3a7e9c) Commits cherry-pickés (-x, auteur d'origine) sur import/rdna3-sel-r3 puis merge --no-ff. cefeb9b (ggml-org#43) vide ici (changement déjà présent). Ports de PR amont ouvertes : 0fffeee (ggml-org#61 ← ggml-org ggml-org#31746), 855e1bf (ggml-org#75 ← ggml-org ggml-org#31761). 7a0f09e et e3a7e9c : tests/test-backend-ops.cpp côté mix. ggml-org#108 écarté (dépend de ggml_cuda_mmvq_q8_1_args, plus loin dans la pile). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01QBjnvFeJ4P7Jp71oC6pzWf
This branch has not been deployed
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
This PR tunes D256 MMA FlashAttention on RDNA3 and RDNA3.5 for 64-column tiles with
ncols2of 2 or 4. It streams Q from shared memory, halves the KV block from 64 to 32, and adds WMMA scheduling barriers. The config lookup now takesncols2to distinguish tiles with the same total width.This revision restores master's single-batch K and V loads.
nbatch_K2andnbatch_V2are both 128 half2 elements, covering all 256 values. A ROCm 7.2.4 run suggested a slowdown with the previous revision's smaller K and V batches.Additional Information
Benchmark Summary
Radeon PRO W7800 (gfx1100), HIP, F16 K/V, 2,240 query tokens. Operator time relative to master
44f91a02bon the same toolchain (lower is faster). Geomean across 4,096, 32,768, and 131,072 KV positions, with three runs per build.GQA 6 matches the attention shape of Qwen3.5/3.6/3.8 27B, and GQA 2 represents Gemma 3-class models. The GQA 8 tile (
ncols2 = 8) uses master's configuration.On ROCm 7.2.4, the
<32,2>kernel went from 558 VGPR spills and 1,316 B of scratch per lane to zero for both. Some SGPR spills remain.Perplexity
On ROCm 10.1,
llama-perplexitywas run on the wikitext-2 test set with F16 KV cache and-c 8192 -b 2240 -ub 2240 -fa on -ngl 999. The-ub 2240setting makes every prompt batch use the changed kernel. KL divergence is measured against master at the same-ub 2240settings; the master-ub 512row shows the effect of changing ubatch size. Master compared with itself was bit-identical, and each result reproduced exactly in a second run.-ub 512-ub 2240-ub 512-ub 2240Requirements