Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
8 changes: 8 additions & 0 deletions ci/build_wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ if [[ "${package_dir}" != "python/libcuvs" ]]; then
)
fi

RAPIDS_CUDA_MAJOR="${RAPIDS_CUDA_VERSION%%.*}"
if [[ ${RAPIDS_CUDA_MAJOR} == "12" ]]; then
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be written as “not 11” if we expect future major versions to behave like 12?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, the way I was thinking this would work with future versions is that we would just remove the if conditional but the logic inside the block would still remain at the top-level scope. I'll rewrite it to "not 11" because the answer to your question is yes.

EXCLUDE_ARGS+=(
--exclude "libnccl.so.*"
)
export SKBUILD_CMAKE_ARGS="-DUSE_NCCL_RUNTIME_WHEEL=ON"
fi

rapids-logger "Building '${package_name}' wheel"

sccache --zero-stats
Expand Down
6 changes: 6 additions & 0 deletions ci/test_wheel_cuvs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@

set -euo pipefail

# Delete system libnccl.so to ensure the wheel is used
RAPIDS_CUDA_MAJOR="${RAPIDS_CUDA_VERSION%%.*}"
if [[ ${RAPIDS_CUDA_MAJOR} == "12" ]]; then
Comment thread
divyegala marked this conversation as resolved.
Outdated
rm -rf /usr/lib64/libnccl*
fi

mkdir -p ./dist
RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen "${RAPIDS_CUDA_VERSION}")"
RAPIDS_PY_WHEEL_NAME="libcuvs_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 cpp ./local-libcuvs-dep
Expand Down
22 changes: 21 additions & 1 deletion dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ files:
- depends_on_cupy
- depends_on_librmm
- depends_on_pylibraft
- depends_on_nccl
- docs
- rapids_build
- run_py_cuvs
Expand All @@ -42,6 +43,7 @@ files:
- depends_on_pylibraft
- depends_on_libcuvs
- depends_on_librmm
- depends_on_nccl
- rapids_build
- rapids_build_setuptools
test_cpp:
Expand Down Expand Up @@ -94,6 +96,7 @@ files:
- rust
- depends_on_libcuvs
- depends_on_libraft
- depends_on_nccl
go:
output: conda
matrix:
Expand All @@ -107,6 +110,7 @@ files:
- go
- depends_on_libcuvs
- depends_on_libraft
- depends_on_nccl
py_build_libcuvs:
output: pyproject
pyproject_dir: python/libcuvs
Expand All @@ -123,6 +127,7 @@ files:
includes:
- depends_on_libraft
- depends_on_librmm
- depends_on_nccl
- rapids_build
py_run_libcuvs:
output: pyproject
Expand All @@ -133,6 +138,7 @@ files:
- cuda_wheels
- depends_on_libraft
- depends_on_librmm
- depends_on_nccl
py_build_cuvs:
output: pyproject
pyproject_dir: python/cuvs
Expand Down Expand Up @@ -226,7 +232,6 @@ dependencies:
packages:
- c-compiler
- cxx-compiler
- nccl>=2.19
specific:
- output_types: conda
matrices:
Expand Down Expand Up @@ -706,3 +711,18 @@ dependencies:
packages:
- pylibraft-cu11==25.6.*,>=0.0.0a0
- {matrix: null, packages: [*pylibraft_unsuffixed]}
depends_on_nccl:
common:
- output_types: conda
packages:
- &nccl_unsuffixed nccl>=2.19
specific:
- output_types: [pyproject, requirements]
matrices:
- matrix:
cuda: "12.*"
cuda_suffixed: "true"
packages:
- nvidia-nccl-cu12>=2.19
- matrix:
packages:
7 changes: 7 additions & 0 deletions python/libcuvs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ project(
LANGUAGES CXX CUDA
)

option(USE_NCCL_RUNTIME_WHEEL "Use the NCCL wheel at runtime instead of the system library" OFF)

# Check if cuVS is already available. If so, it is the user's responsibility to ensure that the
# CMake package is also available at build time of the Python cuvs package.
find_package(cuvs "${RAPIDS_VERSION}")
Expand Down Expand Up @@ -57,6 +59,11 @@ set(rpaths
"$ORIGIN/../../nvidia/cusparse/lib"
"$ORIGIN/../../nvidia/nvjitlink/lib"
)

if(USE_NCCL_RUNTIME_WHEEL)
list(APPEND rpaths "$ORIGIN/../../nvidia/nccl/lib")
endif()

set_property(
TARGET cuvs
PROPERTY INSTALL_RPATH ${rpaths}
Expand Down