Repository navigation
[SM120] Restore MQA logits support on SM120 GPUs - #109
Merged
Merged
Conversation
sgl-project#103 removed the SM120 dense and paged MQA logits kernels, which served the old attention API. This restores them on the new API from deepseek-ai/DeepGEMM nv_dev at b64107f, which carries fixes made after sgl-project#103's copy: the next Q tile follows the scheduler's actual next task, a shared-memory fence orders reads before a stage is reused, and paged KV accepts 32-, 128- and 256-token pages. On SM120 logits are FP32 and dense logits compressed and uncleaned; FP8 keeps one float scale per KV token and FP4 uses MX scales; paged requests may be varlen or fixed next_n. test_attention.py covers SM120. Co-authored-by: Yuanhang Sun <yuasun@nvidia.com> Co-authored-by: Gabriel Wu <13583761+lucifer1004@users.noreply.github.com> Co-authored-by: Barry Kang <43644113+Barry-Delaney@users.noreply.github.com>
Collaborator
|
Tested on B200 (SM100, CUDA 13.0) to check that SM90/SM100 are unaffected. SM120 itself is not tested here. Setup: this PR's head
🤖 Generated with Claude Code |
4 of 5 tasks
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.
Motivation
#103 removed the SM120 dense and paged MQA logits kernels, which served the old attention API. Since then,
fp8_fp4_mqa_logitsandfp8_fp4_paged_mqa_logitshave no SM120 path ondev.Modifications
nv_devatb64107f2, which has fixes made after Merge upstream main (26/09/30 release + #471) into dev #103's copy:next_n.schedule_meta;test_attention.pycovers SM120:next_n1-5, all four page sizes, with empty contexts and a batch whose contexts are all empty.Validation
On four RTX PRO 6000 Blackwell (SM120, CUDA 13.0):
tests/test_attention.pypasses: 96 dense, 36 short-query and 1,680 paged cases (480 varlen), plus the all-empty paged case.cbe1727e) at 2K/8K queries x 8K/64K keys and 32/64 heads, timed with CUDA events (median of 15 per shape, two runs):Developed with AI assistance.