Skip to content

[CUDA] Fix Windows DeepGEMM build errors and warnings - #32485

Merged
Tianlei Wu (tianleiwu) merged 2 commits into
mainfrom
copilot/windows-cuda-build-fix-main
Sep 9, 2026
Merged

Tianlei Wu (tianleiwu) merged 2 commits into
mainfrom
copilot/windows-cuda-build-fix-main

Conversation

@tianleiwu

Copy link
Copy Markdown
Contributor

Summary

  • disable the DeepGEMM path on Windows, where the pinned upstream headers require GNU __int128_t and inline asm
  • gate DeepGEMM includes and call sites with USE_DEEP_GEMM for the in-tree and plugin CUDA providers
  • fix the Windows strerror C4996 warning and MLAS MASM A4032 unwind-offset warning

Testing

  • onnxruntime_providers_cuda_sm90_tma
  • onnxruntime_providers_cuda_llm
  • model_package
  • onnxruntime_mlas

Validated on Windows with CUDA 13.0 and CMAKE_CUDA_ARCHITECTURES=86-real;120-real. The reported DeepGEMM errors, A4032, and C4996 were absent.

Copilot AI balanced review requested due to automatic review settings September 8, 2026 22:29

Copilot AI left a comment

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.

🟡 Changes recommended

QMoE can still select DeepGEMM on Windows even though its runner implementation is compiled out.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Disables unsupported DeepGEMM compilation on Windows and resolves Windows build warnings.

Changes:

  • Gates DeepGEMM sources and call sites.
  • Reorders MASM blocks to avoid unwind warnings.
  • Replaces deprecated strerror usage.
File summaries
File Description
QgemmU8X8KernelAvx2.asm Moves processing blocks before the epilogue.
moe_kernels.cu Gates DeepGEMM usage.
manifest_parser.cc Uses std::error_code for messages.
onnxruntime_providers_cuda.cmake Disables in-tree DeepGEMM on Windows.
onnxruntime_providers_cuda_plugin.cmake Disables plugin DeepGEMM on Windows.
onnxruntime_cuda_source_filters.cmake Excludes the implementation source on Windows.
Review details
  • Files reviewed: 6/6 changed files
  • Comments generated: 2
  • Review effort level: Balanced

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread cmake/onnxruntime_providers_cuda.cmake
Comment thread cmake/onnxruntime_providers_cuda_plugin.cmake

Copilot AI left a comment

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.

🟢 Approval recommended

The feature gates are consistent across source selection, compilation, preprocessing, and runtime dispatch, with no unresolved issues found.

Review details
  • Files reviewed: 7/7 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

@tianleiwu
Tianlei Wu (tianleiwu) enabled auto-merge (squash) September 9, 2026 00:21
@tianleiwu
Tianlei Wu (tianleiwu) merged commit 8c3988c into main Sep 9, 2026
153 of 159 checks passed
@tianleiwu
Tianlei Wu (tianleiwu) deleted the copilot/windows-cuda-build-fix-main branch September 9, 2026 02:49
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.

3 participants