Repository navigation
HIP/CUDA: enable sparse attn on CDNA - #31259
Merged
Merged
Conversation
Contributor
|
You need to do higher depth, also why not enable it for RDNA? |
Contributor
Sorry I didn't read the whole thing |
am17an
approved these changes
Oct 27, 2026
CISC
reviewed
Oct 27, 2026
Contributor
Author
|
will followup with the __ballot_sync use in the other file, there the mask is actively used on warp 64 devices. so this makes it incorrect for wave64 on rocm == 6.3-6.4 |
1 task
dzannotti
added a commit
to halo-box/strix-llama.cpp
that referenced
this pull request
Nov 15, 2026
…sparse D256 kernel Restore the master FA budgets and symbol names (the renamed baseline is not needed after the signature fix), keep the diagmask unit removed, and add a budget for the sparse-gather D256 8x8 kernel that upstream enabled on HIP (ggml-org#31259). Master has no such kernel. Assisted-by: Claude Opus 5.5 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01YKmjzcT1LTvKtbw9EzBVGE
dzannotti
added a commit
to halo-box/strix-llama.cpp
that referenced
this pull request
Nov 15, 2026
Upstream builds the sparse MMA flash-attention kernels on HIP since ggml-org#31259, but ggml_cuda_flash_attn_ext_mma_f16_shall_use_sparse selects them only on NVIDIA (Turing and newer) and CDNA, so gfx1151 never runs them. Skip them in the gfx1151 device code like D40 / D72 / D192; the D256 8x8 one had 26 SGPR spills. Assisted-by: Claude Opus 5.5 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01YKmjzcT1LTvKtbw9EzBVGE
amangupta-tether
added a commit
to tetherto/qvac-fabric-llm.cpp
that referenced
this pull request
Nov 18, 2026
…end-ops The radix top-k (ggml-org#31084) and the QSA row lists (ggml-org#32247) use __ballot_sync, which the HIP headers do not provide before 7.0 with HIP_DISABLE_WARP_SYNC_BUILTINS: the hip CI job failed to compile top-k-mask.cu and top-k.cu. Take the mapping upstream added in ggml-org#31259. Compiled on ROCm 7.2 with and without the mapping (gfx1151, gfx90a). test-backend-ops uses std::iota for the row-list indexer cases, which needs <numeric> on MSVC (windows / x64-cpu-static). Assisted-by: Claude Opus 5.5
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 enables the sparse fattn path on cdna
Additional information
This is perf postive in synthetics and with an additional patch to enable sparse fattn for qwen4exp i get these nummbers:
The numbers are pretty noisy (the above is with -r 50) but there is a definite improvement. Note that this is with the model loaded on 2x mi100s 1x r9700 and 1x rx7900xtx so this undersells i since half the model is not on architectures affected.
The other arches will get a followup.
Requirements