Stabilize FlashAttention CI environments - #3341
Merged
sudhakarsingh27 merged 8 commits intoAug 13, 2026
Merged
Conversation
Contributor
Greptile SummaryThe PR stabilizes FlashAttention CI by assigning backend generations to specific suites and architectures, isolating conflicting distributions, and making optional FA4 loading resilient to incompatible CUTLASS installations.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
CI[Attention CI suite] --> L0[L0 PyTorch]
CI --> L1[L1 distributed]
CI --> L3[L3 FA versions]
L0 --> FA2[FlashAttention 2]
L1 --> CP[Context parallel tests]
CP --> FA23[FlashAttention 2 or 3]
L3 --> Arch{GPU architecture}
Arch -->|SM90| FA3[FlashAttention 3 + CP]
Arch -->|Above SM90| FA4[FlashAttention 4, non-CP]
FA4 --> Guard{FA4 interface and CUTLASS compatible?}
Guard -->|Yes| Enabled[Enable FA4 backend]
Guard -->|No| Fallback[Mark FA4 unavailable]
Reviews (9): Last reviewed commit: "Guard FA4 against incompatible CUTLASS i..." | Re-trigger Greptile |
cyanguwa
previously approved these changes
Aug 11, 2026
sudhakarsingh27
force-pushed
the
sudhakars/gate-fa4-sm8x-test-utils
branch
from
August 12, 2026 03:31
b4ba75d to
f0f4d3d
Compare
10 tasks
FA4 can be installed on SM8x even though its current implementation rejects those GPUs. Disable selection and skip dedicated FA4 tests there so A100 and L40 use supported attention backends. FA4 and CUTLASS can also expose a generic utils package on sys.path. Prepend the Transformer Engine test helper directory in the context-parallel test so collection resolves the intended utilities. Signed-off-by: Sudhakar Singh <sudhakars@nvidia.com>
Moving images can install FA4 alongside older FlashAttention generations, which mixes a shared Python namespace and can make context-parallel reference runs compile an unsupported backend. Isolate the L3 version matrix, keep current CP comparisons on FA2/FA3, and temporarily reject symmetric D512 FA4 on Blackwell until upstream kernel support is complete. Signed-off-by: Sudhakar Singh <sudhakars@nvidia.com>
for more information, see https://pre-commit.ci
FA4 and its CUTLASS dependency expose a top-level utils module after Transformer Engine imports. Appending the test root can therefore bind these late imports to the installed module and fail collection. Give the repository helper precedence in the four test files that exhibited this ordering. Signed-off-by: Sudhakar Singh <sudhakars@nvidia.com>
The all-gather and a2a guards use the FA2 package version check to recognize FlashAttention support, so an isolated FA3 run is rejected even though FA3 implements sliding-window attention. Accept the explicit FA3 backend in both guards. Signed-off-by: Sudhakar Singh <sudhakars@nvidia.com>
sudhakarsingh27
force-pushed
the
sudhakars/gate-fa4-sm8x-test-utils
branch
from
August 12, 2026 05:51
f0f4d3d to
c88114d
Compare
The CP runner must honor an explicit generation selected by its caller, particularly the existing B200 L3 FA4 lane. Remove its internal V4 override, restore the L3 SM100 selection changed in 0f6c71e, and disable V4 only for the L1 suite that still targets FA2/FA3. This keeps per-generation L3 isolation intact without making the shared runner silently override directed coverage. Signed-off-by: Sudhakar Singh <sudhakars@nvidia.com>
cyanguwa
reviewed
Aug 12, 2026
Keep L0 on the mature FA2 path while L3 owns newer-generation coverage. Restrict H100 L3 to FA3 and B200 L3 to non-CP FA4 so unsupported H100 FA4 kernels and mislabeled Blackwell CP results do not obscure the intended signal. Make FA4-specific tests honor backend enablement to prevent silent fallback under an FA4 label. Signed-off-by: Sudhakar Singh <sudhakars@nvidia.com>
Member
Author
|
/te-ci pytorch L3 |
Package metadata can report FA4 present even when a later dependency install leaves its transitive CUTLASS stack unusable. Reject the known b24/CUTLASS combination below the stable 4.6.2 release and treat a nested interface ImportError as an unavailable optional backend so unrelated Transformer Engine imports can continue. Signed-off-by: Sudhakar Singh <sudhakars@nvidia.com>
sudhakarsingh27
force-pushed
the
sudhakars/gate-fa4-sm8x-test-utils
branch
from
August 13, 2026 07:19
0ab272f to
c048682
Compare
cyanguwa
approved these changes
Aug 13, 2026
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.
Summary
Stabilize attention CI when moving PyTorch images install multiple FlashAttention generations and CUTLASS packages.
Changes
utilspackages.Why
The FlashAttention distributions share a Python namespace, and the moving image can make an unintended generation available to otherwise generic tests. Explicit suite ownership keeps L0 stable, makes L3 labels truthful, and prevents unsupported FA4 paths from obscuring other CI results.
An installed FA4 distribution is not necessarily usable when a later package installation changes its transitive CUTLASS stack. Checking the known b24 minimum and guarding the public FA4 interface import prevents that optional dependency failure from breaking unrelated test collection.
Validation
setuptools>=80; relevant syntax and behavior checks pass independently.