fix: duplicate pad_between_seqs skips and wrong architecture direction - #3390
Conversation
Greptile SummaryThe PR corrects and consolidates 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 (2): Last reviewed commit: "fix: duplicate pad_between_seqs skips an..." | 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 |
This PR addresses the following issue in
tests/pytorch/attention/test_attention_with_cp.py: duplicate pad_between_seqs skips and wrong architecture direction.Changes
tests/pytorch/attention/test_attention_with_cp.py: duplicate pad_between_seqs skips and wrong architecture direction.Details
Tests
tests/pytorch/attention/test_attention_with_cp.pyGreptile feedback addressed
< (9, 0)to!= (9, 0), so only exact sm90 (Hopper) devices fall through to thepad_between_seqspath and post-Hopper GPUs get the correct skip message.Local verification:
python3 -m py_compile tests/pytorch/attention/test_attention_with_cp.pypassed. Full pytest execution was not feasible becausetransformer-engineis not installed in this environment.