SIGN IN SIGN UP

FlashInfer: Kernel Library for LLM Serving

0 0 188 Python

test: align test_fmha_v2_prefill SM gating with is_sm12x_supported (#3182)

## ๐Ÿ“Œ Description

The function-level skip in `test_fmha_v2_prefill.py` checks
`is_sm120a_supported`, which only matches sm_120, but the actual FMHAv2
dispatch (`prefill.py:4498`, `:4540`) is gated on `is_sm12x_supported`
โ€”so SM121 ends up skipped from these tests even though the kernel path
supports it.

This swaps the test gates to `is_sm12x_supported`. The top-level skip
message already said `"SM12x"` (only the gate was lagging). The three
sub-skips (FP8 / SEPARATE_Q_K_V / SLIDING_WINDOW) previously said
`"SM120+"`; they're updated to `"SM12x"` to match what the gate actually
means.

`sm_120` behavior is unchanged: both helpers evaluate True for sm_120 on
CUDA โ‰ฅ 12.8 (`is_sm120a_supported`: `major == 12 and
minor==0`;`is_sm12x_supported`: `major == 12`, with a CUDA-version
branch that collapses to โ‰ฅ 12.8 on minor 0).

Verified on RTX Pro 6000 (sm_120, CUDA 12.9): 233 passed, 2112 skipped,0
failed.

  ## ๐Ÿ” Related Issues

  Refs #3170 (Action Item 1 / T1).

  ## ๐Ÿš€ Pull Request Checklist

  ### โœ… Pre-commit Checks

- [x] I have installed `pre-commit` by running `pip install pre-commit`
(or used your preferred method).
  - [x] I have installed the hooks with `pre-commit install`.
- [x] I have run the hooks manually with `pre-commit run --all-files`
and fixed any reported issues.

  ## ๐Ÿงช Tests

  - [ ] Tests have been added or updated as needed.
  - [x] All tests are passing (`unittest`, etc.).

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Tests**
* Updated GPU support detection logic in attention tests to use updated
SM version targeting for test gating and conditional skips.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
L
leonardHONG committed
b7181ce827541a31d773dc4a71b6e5e7a309ca02
Parent: ed2d443
Committed by GitHub <noreply@github.com> on 5/28/2026, 2:51:55 AM