Repository navigation
[TRITON][GLUON] Add Triton and Gluon kernels for DSv4 compressed sparse attention - #3456
Closed
leonling-ll wants to merge 12 commits into
Closed
leonling-ll wants to merge 12 commits into
leonling-ll wants to merge 12 commits into
Conversation
Contributor
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
|
leonling-ll
force-pushed
the
liyang/dsv4_dsa_tt_gl
branch
from
June 3, 2026 02:41
e7dd650 to
bc2127f
Compare
leonling-ll
force-pushed
the
liyang/dsv4_dsa_tt_gl
branch
from
June 16, 2026 07:10
8e731a4 to
24aef76
Compare
Adopt autotune to prefill/decode triton kernels
Enable double buffering Add test file BH32, kernel persistance, stage 3 -> bad perf ~100T update update decode Remove autotune Adopt num_warps=8 for decode Align interface Remove buffer store mask if not needed Remove unnecessary score mask in main loop, 420 TF Prefill cleanup Prefill Adopt BK64 and only cache KV in LDS 480TF Prefill Cancel persistent 500TF Reorder instructions 517 TF Handle prefill num_iter < 2 case
leonling-ll
force-pushed
the
liyang/dsv4_dsa_tt_gl
branch
from
June 19, 2026 09:27
d3ee729 to
06ff289
Compare
wangye805
added a commit
that referenced
this pull request
Jun 22, 2026
Gluon forward for V4 sparse MLA, opt-in via sparse_mla_fwd_v4(..., backend="gluon"). Based on Leon's (leonling-ll) V3.2 gluon forward from leonling-ll/aiter branch liyang/dsa (cf. his DSA PR #3456); adds the V4 attention-sink epilogue (sink-inclusive LSE) to match sparse_mla_fwd_v4. Default stays Triton. Forward speedup vs Triton on MI355X (with sink): Flash CSA T=4K 1.09x, T=8K 1.28x, Pro CSA T=4K 1.37x. Validated vs the Triton forward (O + LSE; sink in {None,+1,-1,-1e3}). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
1 task
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.
This PR aims to add triton and gluon implementation for deepseek v4 compressed sparse attention, targeting to gfx950.
The triton kernels are adapted from vLLM mla_sparse_dsv4 with enabling triton autotune.
The optimization on gluon impl is in progress.
Current status of prefill kernel is
The shapes come from deepseek v4 original paper: https://huggingface.co/deepseek-ai/DeepSeek-V4-Pro/blob/main/DeepSeek_V4.pdf
cc: @Dewei-Wang-sh