[CUDA] Do not link nvrtc#29705
Conversation
Wayne-Ch
left a comment
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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::nvrtcfromonnxruntime_providers_cudalink libraries. - Drop
CUDA::nvrtcfromonnxruntime_providers_cuda_pluginlink 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. |
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>
To avoid hard dependency on nvrtc dll even when it is not used for some models.