SIGN IN SIGN UP

FlashInfer: Kernel Library for LLM Serving

0 0 188 Python

Fix/3170 dense blockscaled sm12x (#3180)

## ๐Ÿ“Œ Description

  After #3113 extended the b12x decorator to SM121, calling `mm_fp4(...,
  backend="b12x")` on sm_121 still trips the dispatch-side check in
  `dense_blockscaled_gemm_sm120_b12x.py:1591`:

  ```
  ValueError: dense_gemm launch only supports sm_120, got sm_121
  ```

SM120 and SM121 share the same 12.x spec (MMA atoms, SMEM), so the same
kernel applies. Allow sm_121 through the check. The error message is
updated to match.

  Other call sites in this file (`sm_version="sm_120"` at line 1875,
`get_smem_capacity_in_bytes("sm_120")` at lines 122/1461) are left alone
โ€” they work for both arches.

  ## ๐Ÿ” Related Issues

  Refs #3170 (Action Item 4). Follows up on #3113.

  ## ๐Ÿš€ 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.
  - [ ] All tests are passing (`unittest`, etc.).

No new tests; no SM121 hardware locally. Existing sm_120 path unchanged.

  ## Reviewer Notes

Same audit cleanup batch as #3173 / #3174 / #3175.

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

## Summary by CodeRabbit

* **Improvements**
* Expanded GPU architecture support to include additional SM12x devices
(sm_120 and sm_121).

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
L
leonardHONG committed
9a463df0d2643a43fc70c0da01e63fa3238aa320
Parent: 34fe1ff
Committed by GitHub <noreply@github.com> on 5/18/2026, 9:21:04 PM