-
Notifications
You must be signed in to change notification settings - Fork 195
introduce libcuvs wheels #594
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
Changes from 8 commits
fbe777d
941c711
1a07f09
0f7c7d8
591bcff
0bc1f0a
7e04e6d
270081e
895545f
4724d80
929609f
7c37b90
97c5617
9740e51
86648b9
81b4162
8640519
a08c821
baae0a7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -313,12 +313,6 @@ if [[ ${CMAKE_TARGET} == "" ]]; then | |
| CMAKE_TARGET="all" | ||
| fi | ||
|
|
||
|
|
||
| SKBUILD_EXTRA_CMAKE_ARGS="${EXTRA_CMAKE_ARGS}" | ||
| if [[ "${EXTRA_CMAKE_ARGS}" != *"DFIND_CUVS_CPP"* ]]; then | ||
| SKBUILD_EXTRA_CMAKE_ARGS="${SKBUILD_EXTRA_CMAKE_ARGS};-DFIND_CUVS_CPP=ON" | ||
| fi | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just picking a mostly-arbitrary place on the diff to start this thread... the I strongly suspect it's related to this PR, because I've seen it on multiple runs and because that build is succeeding on branch builds and other PRs. For example, it just passed 6 minutes ago on #596: https://github.com/rapidsai/cuvs/actions/runs/12895689316/job/35960708413?pr=596
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm able to reproduce this locally. Working on a fix.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pushed 86648b9 updating this. Normally I'd say that should be it's own PR, but since we're so CI-constrained right now and since this change only matters for the benefit of this PR, I think we should just include it in the scope here.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like
, because the Rust stuff is rebuilt in docs builds Added it in baae0a7 |
||
|
|
||
| # If clean given, run it prior to any other steps | ||
| if (( ${CLEAN} == 1 )); then | ||
| # If the dirs to clean are mounted dirs in a container, the | ||
|
|
@@ -434,7 +428,7 @@ fi | |
|
|
||
| # Build and (optionally) install the cuvs Python package | ||
| if (( ${NUMARGS} == 0 )) || hasArg python; then | ||
| SKBUILD_CMAKE_ARGS="${SKBUILD_EXTRA_CMAKE_ARGS}" \ | ||
| SKBUILD_CMAKE_ARGS="${EXTRA_CMAKE_ARGS}" \ | ||
| SKBUILD_BUILD_OPTIONS="-j${PARALLEL_LEVEL}" \ | ||
| python -m pip install --no-build-isolation --no-deps --config-settings rapidsai.disable-cuda=true ${REPODIR}/python/cuvs | ||
| fi | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,21 +1,20 @@ | ||
| #!/bin/bash | ||
| # Copyright (c) 2023-2024, NVIDIA CORPORATION. | ||
| # Copyright (c) 2023-2025, NVIDIA CORPORATION. | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| package_dir="python/cuvs" | ||
|
|
||
| case "${RAPIDS_CUDA_VERSION}" in | ||
| 12.*) | ||
| EXTRA_CMAKE_ARGS=";-DUSE_CUDA_MATH_WHEELS=ON" | ||
| ;; | ||
| 11.*) | ||
| EXTRA_CMAKE_ARGS=";-DUSE_CUDA_MATH_WHEELS=OFF" | ||
| ;; | ||
| esac | ||
| RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})" | ||
|
|
||
| # Set up skbuild options. Enable sccache in skbuild config options | ||
| export SKBUILD_CMAKE_ARGS="-DDETECT_CONDA_ENV=OFF;-DFIND_CUVS_CPP=OFF${EXTRA_CMAKE_ARGS}" | ||
| # Downloads libcuvs wheels from this current build, | ||
| # then ensures 'cuvs' wheel builds always use the 'libcuvs' just built in the same CI run. | ||
| # | ||
| # Using env variable PIP_CONSTRAINT is necessary to ensure the constraints | ||
| # are used when creating the isolated build environment. | ||
| RAPIDS_PY_WHEEL_NAME="libcuvs_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 cpp /tmp/libcuvs_dist | ||
| echo "libcuvs-${RAPIDS_PY_CUDA_SUFFIX} @ file://$(echo /tmp/libcuvs_dist/libcuvs_*.whl)" > /tmp/constraints.txt | ||
| export PIP_CONSTRAINT="/tmp/constraints.txt" | ||
|
|
||
| ci/build_wheel.sh cuvs ${package_dir} | ||
| ci/build_wheel.sh cuvs ${package_dir} python | ||
| ci/validate_wheel.sh ${package_dir} final_dist |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| #!/bin/bash | ||
| # Copyright (c) 2025, NVIDIA CORPORATION. | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| package_name="libcuvs" | ||
| package_dir="python/libcuvs" | ||
|
|
||
| rapids-logger "Generating build requirements" | ||
| matrix_selectors="cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION};cuda_suffixed=true" | ||
|
|
||
| rapids-dependency-file-generator \ | ||
| --output requirements \ | ||
| --file-key "py_build_${package_name}" \ | ||
| --file-key "py_rapids_build_${package_name}" \ | ||
| --matrix "${matrix_selectors}" \ | ||
| | tee /tmp/requirements-build.txt | ||
|
|
||
| rapids-logger "Installing build requirements" | ||
| python -m pip install \ | ||
| -v \ | ||
| --prefer-binary \ | ||
| -r /tmp/requirements-build.txt | ||
|
|
||
| # build with '--no-build-isolation', for better sccache hit rate | ||
| # 0 really means "add --no-build-isolation" (ref: https://github.com/pypa/pip/issues/5735) | ||
| export PIP_NO_BUILD_ISOLATION=0 | ||
|
|
||
| RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})" | ||
|
|
||
| case "${RAPIDS_CUDA_VERSION}" in | ||
| 12.*) | ||
| EXTRA_CMAKE_ARGS="-DUSE_CUDA_MATH_WHEELS=ON" | ||
| ;; | ||
| 11.*) | ||
| EXTRA_CMAKE_ARGS="-DUSE_CUDA_MATH_WHEELS=OFF" | ||
| ;; | ||
| esac | ||
|
|
||
| export SKBUILD_CMAKE_ARGS="${EXTRA_CMAKE_ARGS}" | ||
|
|
||
| ci/build_wheel.sh libcuvs ${package_dir} cpp | ||
| ci/validate_wheel.sh ${package_dir} final_dist libcuvs |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,16 @@ | ||
| #!/bin/bash | ||
| # Copyright (c) 2023-2024, NVIDIA CORPORATION. | ||
| # Copyright (c) 2023-2025, NVIDIA CORPORATION. | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| mkdir -p ./dist | ||
| RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})" | ||
| RAPIDS_PY_WHEEL_NAME="cuvs_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 ./dist | ||
| RAPIDS_PY_WHEEL_NAME="libcuvs_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 cpp ./local-libcuvs-dep | ||
| RAPIDS_PY_WHEEL_NAME="cuvs_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 python ./dist | ||
|
|
||
| # echo to expand wildcard before adding `[extra]` requires for pip | ||
| python -m pip install $(echo ./dist/cuvs*.whl)[test] | ||
| python -m pip install \ | ||
| ./local-libcuvs-dep/libcuvs*.whl \ | ||
| "$(echo ./dist/cuvs*.whl)[test]" | ||
|
|
||
| python -m pytest ./python/cuvs/cuvs/test |

Uh oh!
There was an error while loading. Please reload this page.