Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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 Oct 26, 2025
543488a
use raft helper function to convert from csr to coo and enable double…
jnke2016 Nov 3, 2025
ce452d6
update conda env
jnke2016 Nov 3, 2025
47ccca1
fix style
jnke2016 Nov 3, 2025
32d01b0
fix style
jnke2016 Nov 3, 2025
e6c7d4b
fix style
jnke2016 Nov 3, 2025
7654c7e
Merge remote-tracking branch 'upstream/main' into branch-25.12_update…
jnke2016 Nov 3, 2025
7b4cd2a
fix typo
jnke2016 Nov 3, 2025
ee89faa
add cuvs to our dependency list
jnke2016 Nov 3, 2025
38e9220
Add libcuvs as a dependency for spectral clustering support
jnke2016 Nov 4, 2025
6c6fc9b
fix style
jnke2016 Nov 4, 2025
a89de7b
Add libcuvs to CI scripts
jnke2016 Nov 4, 2025
638a2f6
Integrate libcuvs for spectral clustering with static linking
jnke2016 Nov 4, 2025
a056532
Disable cuVS multi-GPU algorithms to fix NCCL overlinking error
jnke2016 Nov 4, 2025
583c7d2
Add retry strategy to modularity clustering tests
jnke2016 Nov 4, 2025
0773191
Fix wheel size by preventing cuVS library installation
jnke2016 Nov 7, 2025
9413395
Merge remote-tracking branch 'upstream/main' into branch-25.12_update…
jnke2016 Nov 7, 2025
bb44d6f
updadte seed
jnke2016 Nov 11, 2025
e2a6c65
Merge remote-tracking branch 'upstream/main' into branch-25.12_update…
jnke2016 Nov 11, 2025
b76c82c
fix style
jnke2016 Nov 11, 2025
440a90b
relax the eigen solvers parameters
jnke2016 Nov 12, 2025
5760b2b
Fix spectral clustering eigensolver tolerance and relax test parameters
jnke2016 Nov 12, 2025
ecd873e
Deprecate balanced cut clustering API and consolidate tests
jnke2016 Nov 13, 2025
28db516
Merge remote-tracking branch 'upstream/main' into branch-25.12_update…
jnke2016 Nov 13, 2025
701633b
Fix cuVS static library integration by making CUGRAPH_USE_CUVS_STATIC…
jnke2016 Nov 14, 2025
f8b935a
Merge remote-tracking branch 'upstream/main' into branch-25.12_update…
jnke2016 Nov 14, 2025
c9fdd32
Enable developers to use prebuilt libcuvs packages by defaulting CUGR…
jnke2016 Nov 14, 2025
fed3f33
Simplify CUVS_LIB logic to fix conda overlinking error
jnke2016 Nov 15, 2025
d8f2df6
Fix overlinking by removing COMPONENTS logic for cuVS
jnke2016 Nov 15, 2025
b4117ba
Pass EXTRA_CMAKE_ARGS to libcugraph CMake configuration
jnke2016 Nov 15, 2025
2e677c8
Update spectral clustering doctests to use non-deprecated API
jnke2016 Nov 16, 2025
c27afb2
Configure cuGraph wheels to statically link cuVS and remove libcuvs d…
jnke2016 Nov 17, 2025
0adde0d
update branch
jnke2016 Nov 17, 2025
db3dbea
fix style
jnke2016 Nov 17, 2025
fbe6dce
Remove devcontainers section and restrict depends_on_libcuvs to conda…
jnke2016 Nov 19, 2025
20dfd1d
Merge remote-tracking branch 'upstream/release/25.12' into branch-25.…
jnke2016 Nov 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,8 @@ if buildDefault || hasArg libcugraph || hasArg all; then
-DBUILD_CUGRAPH_MG_TESTS=${BUILD_CPP_MG_TESTS} \
-DBUILD_CUGRAPH_MTMG_TESTS=${BUILD_CPP_MTMG_TESTS} \
"${CMAKE_GENERATOR_OPTION[@]}" \
"${CMAKE_VERBOSE_OPTION[@]}"
"${CMAKE_VERBOSE_OPTION[@]}" \
${EXTRA_CMAKE_ARGS}

cmake --build "${LIBCUGRAPH_BUILD_DIR}" "-j${PARALLEL_LEVEL}" "${INSTALL_TARGET[@]}" "${VERBOSE_FLAG}"
fi
Expand Down
1 change: 1 addition & 0 deletions ci/release/update-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ DEPENDENCIES=(
libcugraph
libcugraph_etl
libcugraph-tests
libcuvs
libraft
librmm
pylibcudf
Expand Down
1 change: 1 addition & 0 deletions conda/environments/all_cuda-129_arch-aarch64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ dependencies:
- libcurand-dev
- libcusolver-dev
- libcusparse-dev
- libcuvs==25.12.*,>=0.0.0a0
- libraft==25.12.*,>=0.0.0a0
- librmm==25.12.*,>=0.0.0a0
- nbsphinx
Expand Down
1 change: 1 addition & 0 deletions conda/environments/all_cuda-129_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ dependencies:
- libcurand-dev
- libcusolver-dev
- libcusparse-dev
- libcuvs==25.12.*,>=0.0.0a0
- libraft==25.12.*,>=0.0.0a0
- librmm==25.12.*,>=0.0.0a0
- nbsphinx
Expand Down
1 change: 1 addition & 0 deletions conda/environments/all_cuda-130_arch-aarch64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ dependencies:
- libcurand-dev
- libcusolver-dev
- libcusparse-dev
- libcuvs==25.12.*,>=0.0.0a0
- libraft==25.12.*,>=0.0.0a0
- librmm==25.12.*,>=0.0.0a0
- nbsphinx
Expand Down
1 change: 1 addition & 0 deletions conda/environments/all_cuda-130_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ dependencies:
- libcurand-dev
- libcusolver-dev
- libcusparse-dev
- libcuvs==25.12.*,>=0.0.0a0
- libraft==25.12.*,>=0.0.0a0
- librmm==25.12.*,>=0.0.0a0
- nbsphinx
Expand Down
1 change: 1 addition & 0 deletions conda/recipes/libcugraph/recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ cache:
CMAKE_CUDA_COMPILER_LAUNCHER: ${{ env.get("CMAKE_CUDA_COMPILER_LAUNCHER") }}
CMAKE_CXX_COMPILER_LAUNCHER: ${{ env.get("CMAKE_CXX_COMPILER_LAUNCHER") }}
CMAKE_GENERATOR: ${{ env.get("CMAKE_GENERATOR") }}
EXTRA_CMAKE_ARGS: "-DCUGRAPH_COMPILE_CUVS=ON"
PARALLEL_LEVEL: ${{ env.get("PARALLEL_LEVEL") }}
SCCACHE_BUCKET: ${{ env.get("SCCACHE_BUCKET") }}
SCCACHE_IDLE_TIMEOUT: ${{ env.get("SCCACHE_IDLE_TIMEOUT") }}
Expand Down
18 changes: 18 additions & 0 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#=============================================================================
# cmake-format: off
# SPDX-FileCopyrightText: Copyright (c) 2018-2025, NVIDIA CORPORATION.
# SPDX-License-Identifier: Apache-2.0
# cmake-format: on
#=============================================================================

cmake_minimum_required(VERSION 3.30.4 FATAL_ERROR)
Expand All @@ -11,6 +13,7 @@ include(rapids-cpm)
include(rapids-cuda)
include(rapids-export)
include(rapids-find)
include(CMakeDependentOption)

rapids_cuda_init_architectures(CUGRAPH)

Expand Down Expand Up @@ -41,8 +44,14 @@ option(BUILD_TESTS "Configure CMake to build tests" ON)
option(USE_RAFT_STATIC "Build raft as a static library" OFF)
option(CUGRAPH_COMPILE_RAFT_LIB "Compile the raft library instead of using it header-only" ON)
option(CUDA_STATIC_RUNTIME "Statically link the CUDA toolkit runtime and libraries" OFF)
option(CUGRAPH_COMPILE_CUVS "Always compile cuVS from source" OFF)
cmake_dependent_option(CUGRAPH_USE_CUVS_STATIC
"Build and statically link the cuVS library" ON
"CUGRAPH_COMPILE_CUVS" OFF)

message(VERBOSE "CUGRAPH: CUDA_STATIC_RUNTIME=${CUDA_STATIC_RUNTIME}")
message(VERBOSE "CUGRAPH: CUGRAPH_COMPILE_CUVS=${CUGRAPH_COMPILE_CUVS}")
message(VERBOSE "CUGRAPH: CUGRAPH_USE_CUVS_STATIC=${CUGRAPH_USE_CUVS_STATIC}")

################################################################################
# - compiler options -----------------------------------------------------------
Expand Down Expand Up @@ -112,6 +121,9 @@ include(${rapids-cmake-dir}/cpm/cuco.cmake)
rapids_cpm_cuco(BUILD_EXPORT_SET cugraph-exports INSTALL_EXPORT_SET cugraph-exports)
include(cmake/thirdparty/get_raft.cmake)

# Always include cuVS for spectral clustering enhancements
include(cmake/thirdparty/get_cuvs.cmake)

if (BUILD_CUGRAPH_MTMG_TESTS)
if(NOT TARGET ucx::ucp)
find_package(ucx REQUIRED)
Expand Down Expand Up @@ -474,6 +486,11 @@ if(CUGRAPH_COMPILE_RAFT_LIB)
endif()
endif()

set(CUVS_LIB cuvs::cuvs)
if(CUGRAPH_USE_CUVS_STATIC)
set(CUVS_LIB cuvs::cuvs_static)
endif()

################################################################################
# - link libraries -------------------------------------------------------------
target_link_libraries(cugraph
Expand All @@ -483,6 +500,7 @@ target_link_libraries(cugraph
$<BUILD_LOCAL_INTERFACE:CUDA::toolkit>
PRIVATE
${COMPILED_RAFT_LIB}
${CUVS_LIB}
cuco::cuco
)

Expand Down
61 changes: 61 additions & 0 deletions cpp/cmake/thirdparty/get_cuvs.cmake
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
)
2 changes: 2 additions & 0 deletions cpp/include/cugraph/algorithms.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -873,6 +873,8 @@ std::unique_ptr<legacy::GraphCOO<VT, ET, WT>> extract_subgraph_vertex(
* @ingroup community_cpp
* @brief Wrapper function for Nvgraph balanced cut clustering
*
* @deprecated This API will be deprecated. Use spectralModularityMaximization instead.
*
* @throws cugraph::logic_error when an error occurs.
*
* @tparam VT Type of vertex identifiers. Supported value : int (signed,
Expand Down
3 changes: 3 additions & 0 deletions cpp/include/cugraph_c/community_algorithms.h
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,9 @@ typedef struct {
/**
* @brief Balanced cut clustering
*
* @deprecated This function is deprecated and will be removed in a future release.
* Use cugraph_spectral_clustering (spectral modularity maximization) instead.
*
* NOTE: This currently wraps the legacy balanced cut clustering implementation and is only
* available in Single GPU implementation.
*
Expand Down
Loading
Loading