Default to static linking of libcudart#2178
Merged
rapids-bot[bot] merged 5 commits intorapidsai:mainfrom Dec 11, 2025
Merged
Conversation
14 tasks
robertmaynard
requested changes
Dec 9, 2025
ttnghia
approved these changes
Dec 9, 2025
- Remove CUDA_STATIC_RUNTIME option from cpp/CMakeLists.txt - Always link against CUDA::cudart_static - Remove -s flag from build.sh - Remove CUDA_STATIC_RUNTIME from python/librmm/CMakeLists.txt - Remove cuda-cudart from run requirements in conda recipes
751ab73 to
69ae971
Compare
robertmaynard
approved these changes
Dec 9, 2025
robertmaynard
requested changes
Dec 9, 2025
Contributor
robertmaynard
left a comment
There was a problem hiding this comment.
The cpp/tests/CMakeLists.txt need updating:
if(_RMM_TEST_CUDART STREQUAL SHARED)
set(cudart_link_libs $<COMPILE_ONLY:rmm> CUDA::cudart)
elseif(_RMM_TEST_CUDART STREQUAL STATIC)
set(cudart_link_libs $<COMPILE_ONLY:rmm> CUDA::cudart_static)
else()…into static-cudart-default
robertmaynard
approved these changes
Dec 10, 2025
Collaborator
Author
|
Going to hold off on merging this until we have more clarity on rapidsai/cudf#20814 (comment). |
Collaborator
Author
|
We must wait to merge this until cuDF stream testing has some path forward. Otherwise we would lose validation that any allocation calls happening in RMM are properly being handed streams from cuDF. |
Collaborator
Author
|
We think maybe the cudf stream testing can proceed with this, so I'll merge it. |
Collaborator
Author
|
/merge |
rapids-bot bot
pushed a commit
that referenced
this pull request
Dec 12, 2025
Reverts #2178 These changes are currently breaking stream testing in cudf, see https://github.com/rapidsai/cudf/actions/runs/20147392038/job/57905334054?pr=20824#step:11:1782 for example. My guess is that while the changes in #2178 are fine for C++ consumers of rmm to continue hijacking CUDA symbols (like the libcudf tests do), there is a problem when rmm Python is also in the mix since now rmm Python will instantiate the rmm C++ templates and therefore embed cudart symbols due to the newly enforced static linkage. I'll reopen this PR once I can get #20814 resolved. Authors: - Vyas Ramasubramani (https://github.com/vyasr) Approvers: - Robert Maynard (https://github.com/robertmaynard) URL: #2182
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.
Summary
CUDA_STATIC_RUNTIME=ON)cuda-cudartfrom conda recipe run requirements (no longer needed when statically linked)This is part of a RAPIDS-wide effort to switch to static CUDA runtime linking. See rapidsai/build-planning#235 for tracking.
Changes
cpp/CMakeLists.txt: ChangeCUDA_STATIC_RUNTIMEdefault from OFF to ONbuild.sh: ChangeCUDA_STATIC_RUNTIMEdefault from OFF to ONconda/recipes/librmm/recipe.yaml: Removecuda-cudartfrom run deps (3 outputs)conda/recipes/rmm/recipe.yaml: Removecuda-cudartfrom run depsNote: Python builds already use
CUDA_STATIC_RUNTIME=ON(set inpython/librmm/CMakeLists.txt).