Fix Windows CUDA 12.9 SM120 compilation - #32114
Merged
Hariharan Seshadri (hariharans29) merged 2 commits intoAug 24, 2026
Merged
Hariharan Seshadri (hariharans29) merged 2 commits into
Hariharan Seshadri (hariharans29) merged 2 commits into
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Co-authored-by: tianleiwu <30328909+tianleiwu@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix build failure of ONNX Runtime 1.26.0 on Windows with CUDA 12.9
Fix Windows CUDA 12.9 SM120 compilation
Aug 16, 2026
Tianlei Wu (tianleiwu)
marked this pull request as ready for review
August 23, 2026 04:36
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes Windows CUDA 12.9 compilation for SM120 by shadowing the faulty toolkit header with a generated corrected copy.
Changes:
- Adds a CMake helper replacing invalid
long2PTX operand casts withlonglong2. - Applies the workaround only for MSVC and CUDA 12.9.x.
- Removes stale shadow headers when the installed toolkit no longer needs correction.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
cmake/external/cuda_configuration.cmake |
Adds the header-patching helper. |
cmake/CMakeLists.txt |
Activates and prioritizes the CUDA 12.9 workaround on MSVC. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Tianlei Wu (tianleiwu)
approved these changes
Aug 24, 2026
Hariharan Seshadri (hariharans29)
approved these changes
Aug 24, 2026
Hariharan Seshadri (hariharans29)
deleted the
copilot/build-issue-fix-windows-cuda
branch
August 24, 2026 21:20
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
clusterlaunchcontrol.hfor MSVC builds.long2PTX operands with upstream-correctlonglong2.Motivation and Context
CUDA 12.9’s
clusterlaunchcontrol.huses Windows’ 32-bitlongfor PTX operands requiring 64 bits. This causes widespread.cucompilation failures when targeting SM120 on Windows, while Linux builds succeed.