-
Notifications
You must be signed in to change notification settings - Fork 79
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
introduce libcuvs wheels #594
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
fbe777d
introduce libcuvs wheels
jameslamb 941c711
enforce cmake-format checks
jameslamb 1a07f09
more changes
jameslamb 0f7c7d8
stop building and installing static library
jameslamb 591bcff
more build deps
jameslamb 0bc1f0a
fix copy-paste error
jameslamb 7e04e6d
fix RPATHs and sizes
jameslamb 270081e
Merge branch 'branch-25.02' into libcuvs-wheels
jameslamb 895545f
more changes
jameslamb 4724d80
misc changes
jameslamb 929609f
use CUDA wheels on CUDA 11
jameslamb 7c37b90
Merge branch 'libcuvs-wheels' of github.com:jameslamb/cuvs into libcu…
jameslamb 97c5617
Merge branch 'branch-25.02' into libcuvs-wheels
jameslamb 9740e51
more changes
jameslamb 86648b9
stop relying on cython to transitively pin clang
jameslamb 81b4162
Merge branch 'libcuvs-wheels' of github.com:jameslamb/cuvs into libcu…
jameslamb 8640519
Merge branch 'branch-25.02' of github.com:rapidsai/cuvs into libcuvs-…
jameslamb a08c821
Merge branch 'branch-25.02' into libcuvs-wheels
jameslamb baae0a7
add clang to docs env, clean up
jameslamb 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 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 |
---|---|---|
|
@@ -80,7 +80,30 @@ jobs: | |
node_type: "gpu-v100-latest-1" | ||
run_script: "ci/build_docs.sh" | ||
sha: ${{ inputs.sha }} | ||
wheel-build-libcuvs: | ||
secrets: inherit | ||
uses: rapidsai/shared-workflows/.github/workflows/[email protected] | ||
with: | ||
build_type: ${{ inputs.build_type || 'branch' }} | ||
branch: ${{ inputs.branch }} | ||
sha: ${{ inputs.sha }} | ||
date: ${{ inputs.date }} | ||
script: ci/build_wheel_libcuvs.sh | ||
# build for every combination of arch and CUDA version, but only for the latest Python | ||
matrix_filter: group_by([.ARCH, (.CUDA_VER|split(".")|map(tonumber)|.[0])]) | map(max_by(.PY_VER|split(".")|map(tonumber))) | ||
wheel-publish-libcuvs: | ||
needs: wheel-build-libcuvs | ||
secrets: inherit | ||
uses: rapidsai/shared-workflows/.github/workflows/[email protected] | ||
with: | ||
build_type: ${{ inputs.build_type || 'branch' }} | ||
branch: ${{ inputs.branch }} | ||
sha: ${{ inputs.sha }} | ||
date: ${{ inputs.date }} | ||
package-name: libcuvs | ||
package-type: cpp | ||
wheel-build-cuvs: | ||
needs: wheel-build-libcuvs | ||
secrets: inherit | ||
uses: rapidsai/shared-workflows/.github/workflows/[email protected] | ||
with: | ||
|
@@ -99,3 +122,4 @@ jobs: | |
sha: ${{ inputs.sha }} | ||
date: ${{ inputs.date }} | ||
package-name: cuvs | ||
package-type: python |
This file contains 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 |
---|---|---|
|
@@ -22,6 +22,7 @@ jobs: | |
- conda-python-tests | ||
- docs-build | ||
- rust-build | ||
- wheel-build-libcuvs | ||
- wheel-build-cuvs | ||
- wheel-tests-cuvs | ||
- devcontainer | ||
|
@@ -135,10 +136,19 @@ jobs: | |
arch: "amd64" | ||
container_image: "rapidsai/ci-conda:latest" | ||
run_script: "ci/build_rust.sh" | ||
wheel-build-cuvs: | ||
wheel-build-libcuvs: | ||
needs: checks | ||
secrets: inherit | ||
uses: rapidsai/shared-workflows/.github/workflows/[email protected] | ||
with: | ||
build_type: pull-request | ||
script: ci/build_wheel_libcuvs.sh | ||
# build for every combination of arch and CUDA version, but only for the latest Python | ||
matrix_filter: group_by([.ARCH, (.CUDA_VER|split(".")|map(tonumber)|.[0])]) | map(max_by(.PY_VER|split(".")|map(tonumber))) | ||
wheel-build-cuvs: | ||
needs: wheel-build-libcuvs | ||
secrets: inherit | ||
uses: rapidsai/shared-workflows/.github/workflows/[email protected] | ||
with: | ||
build_type: pull-request | ||
script: ci/build_wheel_cuvs.sh | ||
|
This file contains 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 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 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 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 |
---|---|---|
@@ -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 |
This file contains 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,32 @@ | ||
#!/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})" | ||
|
||
ci/build_wheel.sh libcuvs ${package_dir} cpp | ||
ci/validate_wheel.sh ${package_dir} final_dist libcuvs |
This file contains 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 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 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 |
---|---|---|
@@ -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 |
This file contains 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 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 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 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 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 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 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.
Just picking a mostly-arbitrary place on the diff to start this thread... the
rust
build is failing here.(build link)
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
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'm able to reproduce this locally.
Working on a fix.
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.
Found it! Looks like having
cython
in therapids_build
group independencies.yaml
was load-bearing 😅With it in that group, the build environment for rust builds gets
clang-19
. Without it, it getsclang==8.0.0
.I'll update the pin here.
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.
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.
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.
Looks like
clang
is needed to build docs here too(failed docs build link)
, because the Rust stuff is rebuilt in docs builds
cuvs/ci/build_docs.sh
Lines 44 to 48 in 1c91e1f
Added it in baae0a7