[Build] Disable SM120 TMA kernels with MSVC and CUDA 13 - #31615
Merged
Conversation
baijumeswani
approved these changes
Aug 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
The build completed and produced onnxruntime_providers_cuda.dll without compiling the SM120 TMA object target.