Skip to content

[PyTorch] Report the fused MLA Q up-proj kernel as unsupported on SM 12.x - #3932

Closed
rlaope wants to merge 1 commit into
NVIDIA:mainfrom
rlaope:sm12x-fused-mla-q-uproj-supported
Closed

rlaope wants to merge 1 commit into
NVIDIA:mainfrom
rlaope:sm12x-fused-mla-q-uproj-supported

Conversation

@rlaope

@rlaope rlaope commented Nov 24, 2026

Copy link
Copy Markdown

Description

FusedMLAQUpProjRopeQuant.is_supported() only checks get_device_compute_capability()[0] < 10, so it returns True on SM 12.0 (RTX PRO 6000 / RTX 50xx Blackwell). The cuDNN frontend kernel it wraps (gemm_proj_rope_mxfp8_wrapper_sm100) uses tcgen05, which SM 12.x does not have, so the first call to run() raises:

RuntimeError: GemmProjRopeMxfp8 requires SM100+ compute capability with tcgen05 (not cc 12.x), but found SM120 on the current device

A caller that uses is_supported() to choose between the fused and unfused MLA Q up-proj crashes on SM 12.x instead of falling back. The cuDNN frontend uses the same rule in has_tcgen05() (major >= 10 and major != 12). The other cuDNN FE fused ops in TE are already gated on major == 10 (for example GroupedMLP_CuTeGEMMGLU.is_supported()).

Type of change

  • Documentation change (change only to the documentation, either a fix or a new content)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Infra/Build change
  • Code refactoring

Changes

  • FusedMLAQUpProjRopeQuant.is_supported() returns False for compute capability major 12, as well as below 10.

Validation

Hardware: RTX PRO 6000 Blackwell Max-Q (SM 12.0), driver 590.48.01, CUDA 13.0.88, PyTorch 2.14.1+cu130, nvidia-cudnn-frontend 1.33.0, TE source build at a6393d0.

python -m pytest tests/pytorch/attention/test_fused_mla.py:

main this PR
test_fused_mla_q_uproj[fp8-256], [bf16-256], test_fused_mla_q_uproj_autograd 3 failed (RuntimeError above) 3 skipped (the existing fused_supported skip)
whole file 3 failed, 16 skipped 19 skipped

The other 16 tests skip on SM 12.x for an unrelated, already-handled reason (MXFP8 is not available on 12.0+). Nothing changes on SM 10.x: the check is the same there.

Checklist:

  • I have read and followed the contributing guidelines
  • The functionality is complete
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

…12.x

FusedMLAQUpProjRopeQuant.is_supported() only checks for compute
capability major >= 10, so it returns True on SM 12.0. The cuDNN
frontend gemm_proj_rope_mxfp8 kernel needs tcgen05, which SM 12.x does
not have, and run() then raises "GemmProjRopeMxfp8 requires SM100+
compute capability with tcgen05 (not cc 12.x)". Callers that use
is_supported() to choose the fused path crash instead of falling back.

Return False for major == 12, matching the cuDNN frontend has_tcgen05()
check.

Signed-off-by: rlaope <105429536+rlaope@users.noreply.github.com>
@rlaope
rlaope requested a review from cyanguwa as a code owner November 24, 2026 13:12
@github-actions github-actions Bot added the community-contribution PRs from external contributor outside the core maintainers, representing community-driven work. label Nov 24, 2026
@greptile-apps

greptile-apps Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The change affects hardware selection for one fused MLA Q up-projection workflow.

The PR appears safe to merge, with a non-blocking request for a focused test.

Findings

  1. P2 SM12 check lacks test coverage ▶

Summary

FusedMLAQUpProjRopeQuant.is_supported() now returns False on SM12.x.

  • The fused MLA path is marked unavailable on SM 12.x.

Reviews (1) · Last reviewed commit: "[PyTorch] Report the fused MLA Q up-proj..." · Reviewed by Greptile

if get_device_compute_capability()[0] < 10:
# The cuDNN FE kernel uses tcgen05, which SM 12.x (RTX/workstation Blackwell) does not have.
major = get_device_compute_capability()[0]
if major < 10 or major == 12:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 SM12 check lacks test coverage

The existing tests use is_supported() to skip kernel tests, but never assert its answer. They run on SM100 hardware, where removing major == 12 would go unnoticed and could bring back the reported crash.

Add a focused test that mocks the capability and other support checks. Clear the is_supported cache between cases, and check that SM12.0/12.1 return False while SM10.x remains supported.

@pggPL pggPL mentioned this pull request Nov 24, 2026
8 of 13 tasks
@pggPL

pggPL commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator

Thank you for the contribution! This fix has been included in #3935 (with original commit authorship preserved) so we can run CI and land several small community fixes together. Closing this PR in favor of #3935.

@pggPL pggPL closed this Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-contribution PRs from external contributor outside the core maintainers, representing community-driven work.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants