Link libcugraph dynamically against libcuvs - #5499
Merged
Merged
Conversation
Remove the cuVS static-link configuration path and make libcugraph depend on libcuvs as a shared library for both conda and wheel builds. This moves the cudaLibrary* runtime requirement out of libcugraph, restores the older CUDA CI matrix entries, and keeps libcuvs ownership in the libcuvs package/wheel instead of bundling it into libcugraph.
divyegala
approved these changes
Apr 23, 2026
libcugraph now depends on shared libcuvs at runtime. Load libcuvs after libraft and before libcugraph so wheel imports resolve the new dependency chain consistently.
KyleFromNVIDIA
approved these changes
May 11, 2026
jakirkham
approved these changes
May 12, 2026
Comment on lines
38
to
46
| # their symbols | ||
| import librmm | ||
| import libraft | ||
| import libcuvs | ||
|
|
||
| librmm.load_library() | ||
| libraft.load_library() | ||
| libcuvs.load_library() | ||
| except ModuleNotFoundError: |
Member
There was a problem hiding this comment.
This is the Python change for context
rlratzel
approved these changes
May 12, 2026
rlratzel
left a comment
Contributor
There was a problem hiding this comment.
LGTM from the Python perspective.
Contributor
|
/merge |
rapids-bot Bot
pushed a commit
to rapidsai/cugraph-gnn
that referenced
this pull request
May 14, 2026
## Summary - restore CUDA 12.2 test matrix coverage removed in #454 - restore Python 3.14 CI coverage removed in #433 - keep the existing arm64 CUDA 12.2 exclusion - follows the CUDA 12.2 runtime fix from rapidsai/cugraph#5499 Authors: - Bradley Dice (https://github.com/bdice) Approvers: - Alex Barghi (https://github.com/alexbarghi-nv) - https://github.com/jakirkham URL: #457
rapids-bot Bot
pushed a commit
that referenced
this pull request
Sep 9, 2026
## Summary - add libcuvs to the libcugraph wheel build requirements - discover only the libcuvs CMake package prefix exported by the installed wheel during direct C++ builds, so pip devcontainers use the installed libcuvs wheel instead of cloning cuVS - remove direct NVRTC and nvJitLink dependencies that were added for the old source-built/static cuVS integration; libcuvs now owns those requirements Part of rapidsai/build-planning#325. ## Root causes There were two independent gaps after #5499 switched libcugraph to dynamic libcuvs linkage: 1. The libcugraph wheel job installs only the py_build_libcugraph and py_rapids_build_libcugraph dependency sets before running pip wheel --no-deps. libcuvs was a runtime dependency but not a build requirement, so it was absent and rapids_cpm_find fell back to a source build. 2. Pip devcontainers already installed libcuvs-cu12/libcuvs-cu13, but build.sh invokes CMake directly. Unlike scikit-build-core, direct CMake did not consume the wheel cmake.prefix entry point, so it still cloned cuVS into _deps/cuvs-src. The second gap is fixed with the RAPIDS CMake wheel-prefix discovery helper, filtered to libcuvs. RMM and RAFT must remain source-backed in this direct C++ build so the generated cugraph build-tree package carries complete transitive dependency targets for downstream pylibcugraph configuration. ## Dependency audit - #5483 added cuda-nvrtc-dev because source-built cuVS compiled a file including nvrtc.h. - #5479 and #5457 added explicit nvJitLink build/runtime requirements for source-built/static cuVS. - Those direct requirements are no longer needed with dynamic linkage to the prebuilt libcuvs package. The release/26.10 libcuvs conda and wheel metadata already owns NVRTC and nvJitLink. - The cutile additions proposed in #5646 are not needed by cuGraph once it stops building cuVS. I also verified NVIDIA/cuML has the same pip-devcontainer issue: its current CUDA 13.3 pip job installs libcuvs-cu13, then logs CPM: Adding package cuvs and uses _deps/cuvs-src. cuML needs the analogous CMake prefix-discovery change and can then remove its direct cutile workaround separately. ## Validation Using rapidsai/ci-wheel:26.10-cuda13.3.0-rockylinux8-py3.14: - reproduced the original failure at e6cb493: CMake cloned cuVS and failed under _deps/cuvs-src because cuda.tile was unavailable - after this change, CMake reports CPM: Using local package cuvs@26.10.0 and cuvs_DIR points into site-packages/libcuvs - no _deps/cuvs-src directory is created and CMake configuration completes - generated CUDA 13.3 pip-devcontainer requirements contain libcuvs-cu13 and no direct cuda-tile, NVRTC, or nvJitLink requirements - generated CUDA 12 requirements select libcuvs-cu12 - strict RAPIDS dependency generation passes - pre-commit passes on all changed files Using ghcr.io/rapidsai/cugraph/devcontainer:26.10-cuda13.3-pip with libcuvs, libraft, and librmm wheels installed: - reproduced the CI regression caused by exposing every wheel prefix: downstream pylibcugraph generation could not resolve nvtx3::nvtx3-cpp or rapids_logger::rapids_logger from wheel-backed RMM/RAFT exports - verified the filtered prefix discovery selects source RMM/RAFT and wheel libcuvs - verified both libcugraph and downstream pylibcugraph CMake configure/generate successfully with all three wheel prefixes present Authors: - Bradley Dice (https://github.com/bdice) Approvers: - James Lamb (https://github.com/jameslamb) - Chuck Hastings (https://github.com/ChuckHastings) URL: #5654
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
libcugraphagainst sharedlibcuvslibcuvsas a runtime dependency for conda and wheel builds, and excludelibcuvs.sofrom wheel bundlinglibcugraph.sono longer carries the cuVS JIT LTOcudaLibrary*symbolsValidation
build-cugraph -j0ldd cpp/build/conda/cuda-13.1/release/libcugraph.soshowslibcuvs.sonm -D --undefined-only cpp/build/conda/cuda-13.1/release/libcugraph.so | rg cudaLibraryreturns no matches