fix: duplicate pad_between_seqs skips and wrong architecture direction - #3390
Conversation
Greptile SummaryThe PR corrects and deduplicates the eligibility checks for context-parallel attention tests using padding between sequences.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Important Files Changed
Reviews (3): Last reviewed commit: "Merge branch 'main' into bugfix/test-att..." | Re-trigger Greptile |
- Deduplicate the pad_between_seqs eligibility checks in test_cp_with_flash_attention. - Restrict the FlashAttention v3 guard to exactly Hopper (sm90) so post-Hopper architectures are skipped with the correct diagnostic message. Signed-off-by: Andrew White <andrewwhitecdw@users.noreply.github.com>
3c53dde to
d6893e9
Compare
|
@greptile-apps thanks for the review. I tightened the guard as suggested:
The branch has been amended to a single signed-off commit (d6893e9) and force-pushed. |
|
The
If the intent is strictly "sm90 only, forever" (e.g., there's a known microarchitectural reason post-Hopper can't support this code path), then Could you clarify which scenario applies? If it's the latter, I'd recommend keeping |
…between-seqs-skips-and
|
@greptile-apps The |
|
That makes sense — |
This PR cleans up the duplicate
pad_between_seqsskip logic intests/pytorch/attention/test_attention_with_cp.pyand tightens the architecture guard.Changes
tests/pytorch/attention/test_attention_with_cp.py:pad_between_seqsskip blocks into one.get_device_compute_capability() != (9, 0).Details
The guard uses
!= (9, 0)because the production backend selection for this code path currently supports FlashAttention v3 only on sm90. Post-Hopper architectures are skipped early with a clear diagnostic instead of falling through to a generic "No attention backend available" skip later in the pipeline.Tests
test_attention_with_cp.pyparametrized suite.python3 -m py_compile tests/pytorch/attention/test_attention_with_cp.pypassed.Contributor guidelines