Repository navigation
feat(attention): enable SM121 (GB10/DGX Spark) for NVFP4 attention #3897
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -32,14 +32,15 @@ def _patch_cutlass_dsl_operand_major_mode(): | |||||||||||||||||||||||||||||||||||||||||
| _patch_cutlass_dsl_operand_major_mode() | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| import flashinfer | ||||||||||||||||||||||||||||||||||||||||||
| from flashinfer.utils import is_sm120a_supported | ||||||||||||||||||||||||||||||||||||||||||
| from flashinfer.utils import is_sm120a_supported, is_sm121a_supported | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| def _require_sm120(): | ||||||||||||||||||||||||||||||||||||||||||
| if not torch.cuda.is_available(): | ||||||||||||||||||||||||||||||||||||||||||
| pytest.skip("CUDA is required") | ||||||||||||||||||||||||||||||||||||||||||
| if not is_sm120a_supported(torch.device("cuda")): | ||||||||||||||||||||||||||||||||||||||||||
| pytest.skip("SM120 GPU is required") | ||||||||||||||||||||||||||||||||||||||||||
| device = torch.device("cuda") | ||||||||||||||||||||||||||||||||||||||||||
| if not (is_sm120a_supported(device) or is_sm121a_supported(device)): | ||||||||||||||||||||||||||||||||||||||||||
| pytest.skip("SM120 or SM121 GPU is required") | ||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+37
to
+45
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instead of importing and checking individual SM120 and SM121 support functions, we can use the existing
Suggested change
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Current change is not too messy so this should be fine. |
||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| def _pad_seq_len_to_128(x): | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change causes sm120 to no longer be supported on CUDA 12.8, as
_normalize_cuda_archenforces >= 12.9. Is this intended?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right thanks @saltyminty, this was unintended. Fixed in the latest commit with a gated compilation-context path