Default to static linking of libcudart#1627
Open
bdice wants to merge 24 commits intorapidsai:mainfrom
Open
Conversation
14 tasks
- Remove CUDA_STATIC_RUNTIME option from cpp/CMakeLists.txt - Always use static CUDA runtime in rapids_cuda_init_runtime - Update get_cutlass.cmake and get_faiss.cmake to always use static - Remove CUDA_STATIC_RUNTIME from python/libcuvs/CMakeLists.txt - Remove CUDA_STATIC_RUNTIME from docs - Remove cuda-cudart from run requirements in conda recipes
93486fc to
c94e7e6
Compare
robertmaynard
requested changes
Dec 9, 2025
Contributor
robertmaynard
left a comment
There was a problem hiding this comment.
- Missing changes to
ci/build_go.shanddocs/source/build.rstto remove-lcudart - Missing changes to
rust/cuvs-sys/build.rsto dropcargo:rustc-link-lib=dylib=cudart examples/go/README.mdNeeds updating
bdice
commented
Mar 11, 2026
bdice
commented
Mar 11, 2026
KyleFromNVIDIA
approved these changes
Mar 11, 2026
robertmaynard
approved these changes
Mar 12, 2026
KyleFromNVIDIA
requested changes
Mar 12, 2026
This reverts commit ed1c778.
Member
|
# Create imported target rmm::rmm
add_library(rmm::rmm SHARED IMPORTED)
set_target_properties(rmm::rmm PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
INTERFACE_LINK_LIBRARIES "CUDA::cudart;CCCL::CCCL;dl;nvtx3::nvtx3-cpp;rapids_logger::rapids_logger"
INTERFACE_POSITION_INDEPENDENT_CODE "ON"
) |
benfred
reviewed
Mar 12, 2026
benfred
approved these changes
Mar 12, 2026
| GTest::gtest_main | ||
| $<IF:$<BOOL:${CUVSC_STATIC_CUVS_LIBRARY}>,$<COMPILE_ONLY:cuvs::cuvs_static>,cuvs::cuvs> | ||
| $<TARGET_NAME_IF_EXISTS:conda_env> | ||
| rmm::rmm |
Member
There was a problem hiding this comment.
It's not entirely clear to me why this is needed now. AFAICT, we've always been building with CUVSC_STATIC_CUVS_LIBRARY=ON, so the link error should have been triggered before this PR.
Member
There was a problem hiding this comment.
And now we're getting runtime link errors due to missing librmm.so: https://github.com/rapidsai/cuvs/actions/runs/23055523149/job/66970964103?pr=1627
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 ONconda/recipes/cuvs/recipe.yaml: Removecuda-cudartfrom run depsconda/recipes/libcuvs/recipe.yaml: Removecuda-cudartfrom run deps (4 outputs)Note: Python builds already use
CUDA_STATIC_RUNTIME=ON(set inpython/libcuvs/CMakeLists.txt).