Skip to content

[Build] Disable SM120 TMA kernels with MSVC and CUDA 13 - #31615

Merged
tianleiwu merged 1 commit into
mainfrom
tlwu/20260803/disable_sm120_tma_msvc_cuda13
Aug 4, 2026
Merged

[Build] Disable SM120 TMA kernels with MSVC and CUDA 13#31615
tianleiwu merged 1 commit into
mainfrom
tlwu/20260803/disable_sm120_tma_msvc_cuda13

Conversation

@tianleiwu

Copy link
Copy Markdown
Contributor

Description

CUDA 13 generates host stubs with 128-byte aligned by-value CUTLASS parameters for the native SM120 TMA kernels. MSVC rejects those stubs with C2719.

Skip the SM120 TMA object libraries only for MSVC builds using CUDA 13 or newer. Non-MSVC builds and MSVC builds with older CUDA versions retain native SM120 support.

The MatMulBlockQuantizedFp4Weight native calls are guarded by ORT_ENABLE_BLOCKQUANT_SM120, which is defined only when the object library is created. Windows SM120 therefore uses the existing fused GEMV or dequantize-plus-cuBLAS fallback rather than referencing missing kernels. SM120 grouped MoE dispatch separately checks whether its TMA implementation was compiled.

Validation

Built the CUDA plugin target on Windows with MSVC 14.44 and CUDA 13.0:

cmake --build build_plugin/Release --config Release --target onnxruntime_providers_cuda_plugin --parallel 4

The build completed and produced onnxruntime_providers_cuda.dll without compiling the SM120 TMA object target.

@tianleiwu tianleiwu changed the title Disable SM120 TMA kernels with MSVC and CUDA 13 [Build] Disable SM120 TMA kernels with MSVC and CUDA 13 Aug 4, 2026
@tianleiwu
tianleiwu merged commit 4cf0af6 into main Aug 4, 2026
91 checks passed
@tianleiwu
tianleiwu deleted the tlwu/20260803/disable_sm120_tma_msvc_cuda13 branch August 4, 2026 03:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants