Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
18 changes: 18 additions & 0 deletions c/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ target_link_libraries(
$<IF:$<BOOL:${CUVSC_STATIC_CUVS_LIBRARY}>,cuvs::cuvs_static,cuvs::cuvs> #
$<COMPILE_ONLY:raft::raft> # enforce we shouldn't use raft symbols
$<TARGET_NAME_IF_EXISTS:hnswlib::hnswlib>
$<BUILD_LOCAL_INTERFACE:$<TARGET_NAME_IF_EXISTS:kvikio::kvikio>>
)

# ##################################################################################################
Expand All @@ -190,6 +191,19 @@ if(PROJECT_IS_TOP_LEVEL)
COMPONENT c_api
EXPORT cuvs-c-exports
)
if(CUVSC_STATIC_CUVS_LIBRARY AND TARGET kvikio::kvikio)
get_target_property(_cuvs_kvikio_aliased_target kvikio::kvikio ALIASED_TARGET)
if(_cuvs_kvikio_aliased_target)
set(_cuvs_kvikio_runtime_target "${_cuvs_kvikio_aliased_target}")
else()
set(_cuvs_kvikio_runtime_target kvikio::kvikio)
endif()
install(
FILES "$<TARGET_FILE:${_cuvs_kvikio_runtime_target}>"
DESTINATION ${lib_dir}
COMPONENT c_api
)
endif()
install(
DIRECTORY include/cuvs
COMPONENT c_api
Expand All @@ -214,6 +228,10 @@ if(BUILD_TESTS)
enable_language(CUDA)
find_package(CUDAToolkit REQUIRED)

if(CUVSC_STATIC_CUVS_LIBRARY AND NOT TARGET kvikio::kvikio)
include(../cpp/cmake/thirdparty/get_kvikio.cmake)
endif()

enable_testing()
add_subdirectory(tests)
endif()
1 change: 1 addition & 0 deletions ci/build_wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ EXCLUDE_ARGS=(
--exclude "libcurand.so.*"
--exclude "libcusolver.so.*"
--exclude "libcusparse.so.*"
--exclude "libkvikio.so*"
--exclude "libnccl.so.*"
--exclude "libnvJitLink.so.*"
--exclude "libnvrtc.so.*"
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=(
cuvs-bench
libcuvs
libcuvs-tests
libkvikio
libraft
librmm
pylibraft
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 @@ -27,6 +27,7 @@ dependencies:
- libcurand-dev
- libcusolver-dev
- libcusparse-dev
- libkvikio==26.8.*,>=0.0.0a0
- libnvjitlink-dev
- libopenblas<=0.3.30
- librmm==26.8.*,>=0.0.0a0
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 @@ -27,6 +27,7 @@ dependencies:
- libcurand-dev
- libcusolver-dev
- libcusparse-dev
- libkvikio==26.8.*,>=0.0.0a0
- libnvjitlink-dev
- librmm==26.8.*,>=0.0.0a0
- make
Expand Down
1 change: 1 addition & 0 deletions conda/environments/all_cuda-133_arch-aarch64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ dependencies:
- libcurand-dev
- libcusolver-dev
- libcusparse-dev
- libkvikio==26.8.*,>=0.0.0a0
- libnvjitlink-dev
- libopenblas<=0.3.30
- librmm==26.8.*,>=0.0.0a0
Expand Down
1 change: 1 addition & 0 deletions conda/environments/all_cuda-133_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ dependencies:
- libcurand-dev
- libcusolver-dev
- libcusparse-dev
- libkvikio==26.8.*,>=0.0.0a0
- libnvjitlink-dev
- librmm==26.8.*,>=0.0.0a0
- make
Expand Down
5 changes: 5 additions & 0 deletions conda/recipes/libcuvs/recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ cache:
- libnvjitlink-dev
- librmm =${{ minor_version }}
- libraft-headers =${{ minor_version }}
- libkvikio =${{ minor_version }}
- nccl ${{ nccl_version }}
- cuda-version =${{ cuda_version }}
- cuda-cudart-dev
Expand Down Expand Up @@ -174,6 +175,7 @@ outputs:
- ${{ pin_subpackage("libcuvs-headers", exact=True) }}
- librmm =${{ minor_version }}
- libraft-headers =${{ minor_version }}
- libkvikio =${{ minor_version }}
- nccl ${{ nccl_version }}
- cuda-version =${{ cuda_version }}
- cuda-cudart-dev
Expand All @@ -189,6 +191,7 @@ outputs:
- ${{ pin_subpackage("libcuvs-headers", exact=True) }}
- libraft-headers =${{ minor_version }}
- librmm =${{ minor_version }}
- libkvikio =${{ minor_version }}
- cuda-nvrtc
- nccl
- libcublas
Expand Down Expand Up @@ -235,6 +238,7 @@ outputs:
- ${{ pin_subpackage("libcuvs-headers", exact=True) }}
- librmm =${{ minor_version }}
- libraft-headers =${{ minor_version }}
- libkvikio =${{ minor_version }}
- nccl ${{ nccl_version }}
- cuda-version =${{ cuda_version }}
- cuda-cudart-dev
Expand All @@ -250,6 +254,7 @@ outputs:
- ${{ pin_subpackage("libcuvs-headers", exact=True) }}
- libraft-headers =${{ minor_version }}
- librmm =${{ minor_version }}
- libkvikio =${{ minor_version }}
- cuda-nvrtc
- nccl
- libcublas
Expand Down
11 changes: 9 additions & 2 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ if(NOT BUILD_CPU_ONLY)
include(${rapids-cmake-dir}/cpm/cccl.cmake)
rapids_cpm_cccl()
include(cmake/thirdparty/get_raft.cmake)
include(cmake/thirdparty/get_kvikio.cmake)
include(cmake/thirdparty/get_cutlass.cmake)
include(${rapids-cmake-dir}/cpm/cuco.cmake)
rapids_cpm_cuco()
Expand Down Expand Up @@ -1463,6 +1464,7 @@ if(NOT BUILD_CPU_ONLY)
${CUVS_CTK_MATH_DEPENDENCIES}
$<TARGET_NAME_IF_EXISTS:OpenMP::OpenMP_CXX>
$<TARGET_NAME_IF_EXISTS:hnswlib::hnswlib>
kvikio::kvikio
)

target_include_directories(
Expand Down Expand Up @@ -1539,8 +1541,12 @@ if(NOT BUILD_CPU_ONLY)
$<BUILD_LOCAL_INTERFACE:$<TARGET_NAME_IF_EXISTS:NCCL::NCCL>>
$<BUILD_LOCAL_INTERFACE:$<TARGET_NAME_IF_EXISTS:hnswlib::hnswlib>>
$<$<BOOL:${CUVS_NVTX}>:CUDA::nvtx3>
PRIVATE $<TARGET_NAME_IF_EXISTS:OpenMP::OpenMP_CXX> $<COMPILE_ONLY:nvidia::cutlass::cutlass>
$<COMPILE_ONLY:cuco::cuco> CUDA::nvJitLink CUDA::nvrtc
PRIVATE $<TARGET_NAME_IF_EXISTS:OpenMP::OpenMP_CXX>
$<COMPILE_ONLY:nvidia::cutlass::cutlass>
$<COMPILE_ONLY:cuco::cuco>
CUDA::nvJitLink
CUDA::nvrtc
$<BUILD_LOCAL_INTERFACE:kvikio::kvikio>
)

# ensure CUDA symbols aren't relocated to the middle of the debug build binaries
Expand Down Expand Up @@ -1600,6 +1606,7 @@ SECTIONS
$<$<BOOL:${CUVS_NVTX}>:CUDA::nvtx3>
$<COMPILE_ONLY:nvidia::cutlass::cutlass>
$<COMPILE_ONLY:cuco::cuco>
$<BUILD_LOCAL_INTERFACE:kvikio::kvikio>
)
endif()

Expand Down
40 changes: 40 additions & 0 deletions cpp/cmake/thirdparty/get_kvikio.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# =============================================================================
# cmake-format: off
# SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION.
# SPDX-License-Identifier: Apache-2.0
# cmake-format: on

# Use RAPIDS_VERSION_MAJOR_MINOR from rapids_config.cmake
set(KVIKIO_VERSION "${RAPIDS_VERSION_MAJOR_MINOR}")
set(KVIKIO_FORK "rapidsai")
set(KVIKIO_PINNED_TAG "${rapids-cmake-checkout-tag}")

function(find_and_configure_kvikio)
set(oneValueArgs VERSION FORK PINNED_TAG)
cmake_parse_arguments(PKG "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})

# ----------------------------------------------------------------------------
# KvikIO provides the GPUDirect Storage (cuFile) and POSIX file I/O backends used by the CAGRA
# ACE disk-mode build. It is a private, build-time dependency: it is linked into libcuvs via
# $<BUILD_LOCAL_INTERFACE:kvikio::kvikio> and therefore is NOT part of cuvs' exported interface
# (no export set / find_dependency is generated). At runtime the conda 'libkvikio' package
# provides the shared library.
# ----------------------------------------------------------------------------
rapids_cpm_find(
kvikio ${PKG_VERSION}
GLOBAL_TARGETS kvikio::kvikio
CPM_ARGS
EXCLUDE_FROM_ALL TRUE
GIT_REPOSITORY https://github.com/${PKG_FORK}/kvikio.git
GIT_TAG ${PKG_PINNED_TAG}
GIT_SHALLOW TRUE
SOURCE_SUBDIR cpp
OPTIONS "KvikIO_BUILD_EXAMPLES OFF" "KvikIO_REMOTE_SUPPORT OFF"
)
endfunction()

# Change pinned tag here to test a commit in CI.
# To use a different KvikIO locally, set the CMake variable CPM_kvikio_SOURCE=/path/to/local/kvikio
find_and_configure_kvikio(
VERSION ${KVIKIO_VERSION}.00 FORK ${KVIKIO_FORK} PINNED_TAG ${KVIKIO_PINNED_TAG}
)
Loading
Loading