Repository navigation
Select FA4 varlen attention on Blackwell - #4012
Merged
Merged
Conversation
[ghstack-poisoned]
[ghstack-poisoned]
Contributor
Author
|
flagging this will need numerics upgrade |
Contributor
Author
|
in fact it's a master problem |
…eat future archs as FA4 Rework `get_cuda_flash_attention_impl()` to build on the existing `has_cuda_capability()` helper rather than reimplementing the CUDA/HIP availability and device-capability checks inline. `has_cuda_capability` already handles the "no CUDA / ROCm build" cases, so the explicit `torch.cuda.is_available()` and `torch.version.hip` guards are dropped. This also changes the selection logic from exact major-version matches to lower-bound checks: SM 10.0+ (Blackwell and newer) now maps to FA4, and SM 9.0 (Hopper) maps to FA3. As a result, hypothetical future architectures (SM 11.0+) fall through to the newest known implementation (FA4) instead of returning None. The unit test is updated accordingly so that the (11, 0) case now expects "FA4". [ghstack-poisoned]
Contributor
Author
|
@pytorchbot merge |
|
Mergebot is not configured for this repository. Please use the merge button provided by GitHub. |
saforem2
added a commit
to saforem2/torchtitan
that referenced
this pull request
Jul 29, 2026
pytorch#4008 float8 filter_fqns -> replayed onto ezpz/moe (2db11d1). pytorch#4012 FA4 Blackwell varlen -> CUDA-gated, XPU-inert, no replay.
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.
Stack from ghstack (oldest at bottom):