Skip to content

[CUDA] Do not link nvrtc#29705

Merged
tianleiwu merged 2 commits into
mainfrom
tlwu/20260714/no_link_nvrtc
Jul 16, 2026
Merged

[CUDA] Do not link nvrtc#29705
tianleiwu merged 2 commits into
mainfrom
tlwu/20260714/no_link_nvrtc

Conversation

@tianleiwu

Copy link
Copy Markdown
Contributor

To avoid hard dependency on nvrtc dll even when it is not used for some models.

@Wayne-Ch Wayne-Ch left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Approving from the Foundry Local customer deployment perspective. Removing the hard nvrtc dependency helps reduce unnecessary CUDA runtime dependencies and aligns with the CUDA EP package-size reduction goal. This is not the primary fix for the HY GroupQueryAttention failure, but it is useful for the reduced package direction. Assuming CI completes successfully.

@baijumeswani
baijumeswani requested a review from Copilot July 14, 2026 22:18

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.

Pull request overview

This PR removes explicit linkage to the CUDA NVRTC library from ONNX Runtime’s CUDA provider and CUDA plugin EP build targets, avoiding a hard runtime dependency on the NVRTC shared library/DLL when it isn’t needed by the executed model.

Changes:

  • Drop CUDA::nvrtc from onnxruntime_providers_cuda link libraries.
  • Drop CUDA::nvrtc from onnxruntime_providers_cuda_plugin link libraries.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
cmake/onnxruntime_providers_cuda.cmake Removes CUDA::nvrtc from the main CUDA provider target’s link dependencies.
cmake/onnxruntime_providers_cuda_plugin.cmake Removes CUDA::nvrtc from the CUDA plugin EP target’s link dependencies.

@tianleiwu
tianleiwu enabled auto-merge (squash) July 16, 2026 16:11
@tianleiwu
tianleiwu merged commit 23a7e9d into main Jul 16, 2026
85 of 91 checks passed
@tianleiwu
tianleiwu deleted the tlwu/20260714/no_link_nvrtc branch July 16, 2026 18:20
tianleiwu added a commit that referenced this pull request Jul 18, 2026
This cherry-picks the following commits for the release:

| Commit ID | PR Number | Commit Title |
|-----------|-----------|-------------|
| dd32f35 | #29590 | Fix libcudart.so.13 hard dependency in pybind
module breaking import on CPU-only Linux |
| cc44a4d | #29706 | [CUDA] Fix XQA GroupQueryAttention
cudaErrorInvalidValue on Blackwell (sm_120) |
| 23a7e9d | #29705 | [CUDA] Do not link nvrtc |
| ee93f83 | #29711 | [CUDA] Update cuda arch list for packages of
cuda 12.8 |
| fea45a3 | #29620 | [CUDA] Add cuDNN-free ArgMax/ArgMin/ReduceSum
and fix LogSoftmax on plugin EP |
| f05b218 | #29624 | Enable Spectre-mitigated MSVC libs for BinSkim
builds |
| 1c89b86 | #29687 | [BUILD] CUDA_QUANT_PREPROCESS off by default and
Adjust CI |
| 41bd391 | #29658 | [CUDA] Fix null allocator passed to plugin EP
kernel PrePack |
| 405fbea | #28896 | Add Windows ARM64 CUDA plugin package and align
CUDA metadata/artifact naming |
| 308f24c | #29622 | Enable fpA_intB GEMM in CUDA builds and add
configurable options |
| 16ebc1d | #29731 | [Build] Use GPU pool to unblock CI temporarily |
|5911a3a263| #29748 | Add OrtErrorCode::ORT_DEVICE_RESET |
|6217f73ec5 | #29663 | Fix plugin EP allocator deleter lifetime |

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: GitHub Copilot <copilot@example.com>
Co-authored-by: Edward Chen <18449977+edgchen1@users.noreply.github.com>
Co-authored-by: Yen-Shi Wang <yenshiw@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants