-
Notifications
You must be signed in to change notification settings - Fork 341
Update API to leverage cuVS Spectral clustering #5326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
rapids-bot
merged 36 commits into
rapidsai:release/25.12
from
jnke2016:branch-25.12_update-spectral-clustering
Nov 19, 2025
Merged
Changes from 31 commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
0d0d6f5
update API to leverage cuvs Spectral clustering
jnke2016 543488a
use raft helper function to convert from csr to coo and enable double…
jnke2016 ce452d6
update conda env
jnke2016 47ccca1
fix style
jnke2016 32d01b0
fix style
jnke2016 e6c7d4b
fix style
jnke2016 7654c7e
Merge remote-tracking branch 'upstream/main' into branch-25.12_update…
jnke2016 7b4cd2a
fix typo
jnke2016 ee89faa
add cuvs to our dependency list
jnke2016 38e9220
Add libcuvs as a dependency for spectral clustering support
jnke2016 6c6fc9b
fix style
jnke2016 a89de7b
Add libcuvs to CI scripts
jnke2016 638a2f6
Integrate libcuvs for spectral clustering with static linking
jnke2016 a056532
Disable cuVS multi-GPU algorithms to fix NCCL overlinking error
jnke2016 583c7d2
Add retry strategy to modularity clustering tests
jnke2016 0773191
Fix wheel size by preventing cuVS library installation
jnke2016 9413395
Merge remote-tracking branch 'upstream/main' into branch-25.12_update…
jnke2016 bb44d6f
updadte seed
jnke2016 e2a6c65
Merge remote-tracking branch 'upstream/main' into branch-25.12_update…
jnke2016 b76c82c
fix style
jnke2016 440a90b
relax the eigen solvers parameters
jnke2016 5760b2b
Fix spectral clustering eigensolver tolerance and relax test parameters
jnke2016 ecd873e
Deprecate balanced cut clustering API and consolidate tests
jnke2016 28db516
Merge remote-tracking branch 'upstream/main' into branch-25.12_update…
jnke2016 701633b
Fix cuVS static library integration by making CUGRAPH_USE_CUVS_STATIC…
jnke2016 f8b935a
Merge remote-tracking branch 'upstream/main' into branch-25.12_update…
jnke2016 c9fdd32
Enable developers to use prebuilt libcuvs packages by defaulting CUGR…
jnke2016 fed3f33
Simplify CUVS_LIB logic to fix conda overlinking error
jnke2016 d8f2df6
Fix overlinking by removing COMPONENTS logic for cuVS
jnke2016 b4117ba
Pass EXTRA_CMAKE_ARGS to libcugraph CMake configuration
jnke2016 2e677c8
Update spectral clustering doctests to use non-deprecated API
jnke2016 c27afb2
Configure cuGraph wheels to statically link cuVS and remove libcuvs d…
jnke2016 0adde0d
update branch
jnke2016 db3dbea
fix style
jnke2016 fbe6dce
Remove devcontainers section and restrict depends_on_libcuvs to conda…
jnke2016 20dfd1d
Merge remote-tracking branch 'upstream/release/25.12' into branch-25.…
jnke2016 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -110,6 +110,7 @@ DEPENDENCIES=( | |
| libcugraph | ||
| libcugraph_etl | ||
| libcugraph-tests | ||
| libcuvs | ||
| libraft | ||
| librmm | ||
| pylibcudf | ||
|
|
||
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| #============================================================================= | ||
| # cmake-format: off | ||
| # SPDX-FileCopyrightText: Copyright (c) 2025, NVIDIA CORPORATION. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # cmake-format: on | ||
| #============================================================================= | ||
|
|
||
| set(CUGRAPH_MIN_VERSION_cuvs "${CUGRAPH_VERSION_MAJOR}.${CUGRAPH_VERSION_MINOR}.00") | ||
|
|
||
| function(find_and_configure_cuvs) | ||
| set(oneValueArgs VERSION FORK PINNED_TAG EXCLUDE_FROM_ALL USE_CUVS_STATIC CLONE_ON_PIN) | ||
| cmake_parse_arguments(PKG "${options}" "${oneValueArgs}" | ||
| "${multiValueArgs}" ${ARGN} ) | ||
|
|
||
| if(PKG_CLONE_ON_PIN AND NOT PKG_PINNED_TAG STREQUAL "${rapids-cmake-checkout-tag}") | ||
| message(STATUS "CUGRAPH: Pinned tag found: ${PKG_PINNED_TAG}. Cloning cuVS locally.") | ||
| set(CPM_DOWNLOAD_cuvs ON) | ||
| elseif(PKG_USE_CUVS_STATIC AND (NOT CPM_cuvs_SOURCE)) | ||
| message(STATUS "CUGRAPH: Cloning cuVS locally to build static libraries.") | ||
| set(CPM_DOWNLOAD_cuvs ON) | ||
| endif() | ||
|
|
||
| # Disable multi-GPU algorithms to avoid NCCL dependency | ||
| set(CUVS_BUILD_MG_ALGOS OFF) | ||
|
|
||
| rapids_cpm_find(cuvs ${PKG_VERSION} | ||
| GLOBAL_TARGETS cuvs::cuvs | ||
| CPM_ARGS | ||
| GIT_REPOSITORY https://github.com/${PKG_FORK}/cuvs.git | ||
| GIT_TAG ${PKG_PINNED_TAG} | ||
| SOURCE_SUBDIR cpp | ||
| EXCLUDE_FROM_ALL ${PKG_EXCLUDE_FROM_ALL} | ||
| OPTIONS | ||
| "BUILD_TESTS OFF" | ||
| "BUILD_CAGRA_HNSWLIB OFF" | ||
| "BUILD_CUVS_BENCH OFF" | ||
| "BUILD_MG_ALGOS ${CUVS_BUILD_MG_ALGOS}" | ||
| ) | ||
|
|
||
| if(cuvs_ADDED) | ||
| message(VERBOSE "CUGRAPH: Using cuVS located in ${cuvs_SOURCE_DIR}") | ||
| else() | ||
| message(VERBOSE "CUGRAPH: Using cuVS located in ${cuvs_DIR}") | ||
| endif() | ||
|
|
||
| endfunction() | ||
|
|
||
| # Change pinned tag and fork here to test a commit in CI | ||
| # To use a different cuVS locally, set the CMake variable | ||
| # CPM_cuvs_SOURCE=/path/to/local/cuvs | ||
| find_and_configure_cuvs(VERSION ${CUGRAPH_MIN_VERSION_cuvs} | ||
| FORK rapidsai | ||
| PINNED_TAG ${rapids-cmake-checkout-tag} | ||
|
|
||
| # When PINNED_TAG above doesn't match cugraph, | ||
| # force local cuVS clone in build directory | ||
| # even if it's already installed. | ||
| CLONE_ON_PIN ON | ||
| USE_CUVS_STATIC ${CUGRAPH_USE_CUVS_STATIC} | ||
| EXCLUDE_FROM_ALL ON | ||
| ) |
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't be needed. Wheels should always be statically linking, so shared libraries shouldn't be present in the first place. See cuML's wheel building script, which doesn't need this exclusion. cuGraph should be the same. https://github.com/rapidsai/cuml/blob/main/ci/build_wheel_libcuml.sh
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am confused. Aren't wheels using prebuilt packages and link dynamically (hence we have libcuvs.so in the build artifact). Am I missing something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that case, I should update the wheels to compile and build from source instead of using prebuilt packages?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it now after reviewing cuML. Thanks