Skip to content

Commit 8299f17

Browse files
authored
introduce libraft wheels (#2531)
Replaces #2306, contributes to rapidsai/build-planning#33. Proposes packaging `libraft` as a wheel, which is then re-used by: * `pylibraft-cu{11,12}` and `raft-cu{11,12}` (this PR) * `libcugraph-cu{11,12}`, `pylibcugraph-cu{11,12}`, and `cugraph-cu{11,12}` in rapidsai/cugraph#4804 * `libcuml-cu{11,12}` and `cuml-cu{11,12}` in rapidsai/cuml#6199 As part of this, also proposes: * introducing a new CMake option, `RAFT_COMPILE_DYNAMIC_ONLY`, to allow building/installing only the dynamic shared library (i.e. skipping the static library) * enforcing `rapids-cmake`'s preferred CMake style (#2531 (comment)) * making wheel-building CI jobs always depend on other wheel-building CI jobs, not tests or `*-publish` (to reduce end-to-end CI time) ## Notes for Reviewers ### Benefits of these changes * smaller wheels (see "Size Changes" below) * faster compile times (no more re-compiling RAFT in cuGraph and cuML CI) * other benefits mentioned in rapidsai/build-planning#33 ### Wheel contents `libraft`: * `libraft.so` (shared library) * RAFT headers * vendored dependencies (`fmt`, CCCL, `cuco`, `cute`, `cutlass`) `pylibraft`: * `pylibraft` Python / Cython code and compiled Cython extensions `raft-dask`: * `raft-dask` Python / Cython code and compiled Cython extension ### Dependency Flows In short.... `libraft` contains a `libraft.so` dynamic library and the headers to link against it. * Anything that needs to link against RAFT at build time pulls in `libraft` wheels as a build dependency. * Anything that needs RAFT's symbols at runtime pulls it in as a runtime dependency, and calls `libraft.load_library()`. For more details and some flowcharts, see rapidsai/build-planning#33 (comment) ### Size changes (CUDA 12, Python 3.12, x86_64) | wheel | num files (before) | num files (these PRs) | size (before) | size (these PRs) | |:---------------:|------------------:|-----------------:|--------------:|-------------:| | `libraft`. | --- | 3169 | --- | 19M | | `pylibraft` | 64 | 63 | 11M | 1M | | `raft-dask` | 29 | 28 | 188M | 188M | | `libcugraph` | --- | 1762 | --- | 903M | | `pylibcugraph` | 190 | 187 | 901M | 2M | | `cugraph` | 315 | 313 | 899M | 3.0M | | `libcuml` | --- | 1766 | --- | 289M | | `cuml` | 442 | --- | 517M | --- | |**TOTAL** | **1,040** | **7,268** | **2,516M** | **1,405M** | *NOTES: size = compressed, "before" = 2025-01-13 nightlies* <details><summary>how I calculated those (click me)</summary> * `cugraph`: nightly commit = rapidsai/cugraph@8507cbf, PR = rapidsai/cugraph#4804 * `cuml`: nightly commit = rapidsai/cuml@7c715c4, PR = rapidsai/cuml#6199 * `raft`: nightly commit = 1b62c41, PR = this PR ```shell docker run \ --rm \ --network host \ --env RAPIDS_NIGHTLY_DATE=2025-01-13 \ --env CUGRAPH_NIGHTLY_SHA=8507cbf63db2f349136b266d3e6e787b189f45a0 \ --env CUGRAPH_PR="pull-request/4804" \ --env CUGRAPH_PR_SHA="2ef32eaa006a84c0bd16220bb8e8af34198fbee8" \ --env CUML_NIGHTLY_SHA=7c715c494dff71274d0fdec774bdee12a7e78827 \ --env CUML_PR="pull-request/6199" \ --env CUML_PR_SHA="2ef32eaa006a84c0bd16220bb8e8af34198fbee8" \ --env RAFT_NIGHTLY_SHA=1b62c4117a35b11ce3c830daae248e32ebf75e3f \ --env RAFT_PR="pull-request/2531" \ --env RAFT_PR_SHA="0d6597b08919f2aae8ac268f1a68d6a8fe5beb4e" \ --env RAPIDS_PY_CUDA_SUFFIX=cu12 \ --env WHEEL_DIR_BEFORE=/tmp/wheels-before \ --env WHEEL_DIR_AFTER=/tmp/wheels-after \ -it rapidsai/ci-wheel:cuda12.5.1-rockylinux8-py3.12 \ bash # --- nightly wheels --- # mkdir -p ./wheels-before export RAPIDS_BUILD_TYPE=branch export RAPIDS_REF_NAME="branch-25.02" # pylibraft RAPIDS_PY_WHEEL_NAME="pylibraft_${RAPIDS_PY_CUDA_SUFFIX}" \ RAPIDS_REPOSITORY=rapidsai/raft \ RAPIDS_SHA=${RAFT_NIGHTLY_SHA} \ rapids-download-wheels-from-s3 python ./wheels-before # raft-dask RAPIDS_PY_WHEEL_NAME="raft_dask_${RAPIDS_PY_CUDA_SUFFIX}" \ RAPIDS_REPOSITORY=rapidsai/raft \ RAPIDS_SHA=${RAFT_NIGHTLY_SHA} \ rapids-download-wheels-from-s3 python ./wheels-before # cugraph RAPIDS_PY_WHEEL_NAME="cugraph_${RAPIDS_PY_CUDA_SUFFIX}" \ RAPIDS_REPOSITORY=rapidsai/cugraph \ RAPIDS_SHA=${CUGRAPH_NIGHTLY_SHA} \ rapids-download-wheels-from-s3 python ./wheels-before # pylibcugraph RAPIDS_PY_WHEEL_NAME="pylibcugraph_${RAPIDS_PY_CUDA_SUFFIX}" \ RAPIDS_REPOSITORY=rapidsai/cugraph \ RAPIDS_SHA=${CUGRAPH_NIGHTLY_SHA} \ rapids-download-wheels-from-s3 python ./wheels-before # cuml RAPIDS_PY_WHEEL_NAME="cuml_${RAPIDS_PY_CUDA_SUFFIX}" \ RAPIDS_REPOSITORY=rapidsai/cuml \ RAPIDS_SHA=${CUML_NIGHTLY_SHA} \ rapids-download-wheels-from-s3 python ./wheels-before # --- wheels from CI --- # mkdir -p ./wheels-after export RAPIDS_BUILD_TYPE="pull-request" # libraft RAPIDS_PY_WHEEL_NAME="libraft_${RAPIDS_PY_CUDA_SUFFIX}" \ RAPIDS_REPOSITORY=rapidsai/raft \ RAPIDS_REF_NAME="${RAFT_PR}" \ RAPIDS_SHA="${RAFT_PR_SHA}" \ rapids-download-wheels-from-s3 cpp ./wheels-after # pylibraft RAPIDS_PY_WHEEL_NAME="pylibraft_${RAPIDS_PY_CUDA_SUFFIX}" \ RAPIDS_REPOSITORY=rapidsai/raft \ RAPIDS_REF_NAME="${RAFT_PR}" \ RAPIDS_SHA="${RAFT_PR_SHA}" \ rapids-download-wheels-from-s3 python ./wheels-after # raft-dask RAPIDS_PY_WHEEL_NAME="raft_dask_${RAPIDS_PY_CUDA_SUFFIX}" \ RAPIDS_REPOSITORY=rapidsai/raft \ RAPIDS_REF_NAME="${RAFT_PR}" \ RAPIDS_SHA="${RAFT_PR_SHA}" \ rapids-download-wheels-from-s3 python ./wheels-after # libcugraph RAPIDS_PY_WHEEL_NAME="libcugraph_${RAPIDS_PY_CUDA_SUFFIX}" \ RAPIDS_REPOSITORY=rapidsai/cugraph \ RAPIDS_REF_NAME="${CUGRAPH_PR}" \ RAPIDS_SHA="${CUGRAPH_PR_SHA}" \ rapids-download-wheels-from-s3 cpp ./wheels-after # pylibcugraph RAPIDS_PY_WHEEL_NAME="pylibcugraph_${RAPIDS_PY_CUDA_SUFFIX}" \ RAPIDS_REPOSITORY=rapidsai/cugraph \ RAPIDS_REF_NAME="${CUGRAPH_PR}" \ RAPIDS_SHA="${CUGRAPH_PR_SHA}" \ rapids-download-wheels-from-s3 python ./wheels-after # cugraph RAPIDS_PY_WHEEL_NAME="cugraph_${RAPIDS_PY_CUDA_SUFFIX}" \ RAPIDS_REPOSITORY=rapidsai/cugraph \ RAPIDS_REF_NAME="${CUGRAPH_PR}" \ RAPIDS_SHA="${CUGRAPH_PR_SHA}" \ rapids-download-wheels-from-s3 python ./wheels-after # libcuml RAPIDS_PY_WHEEL_NAME="libcuml_${RAPIDS_PY_CUDA_SUFFIX}" \ RAPIDS_REPOSITORY=rapidsai/cuml \ RAPIDS_REF_NAME="${CUML_PR}" \ RAPIDS_SHA="${CUML_PR_SHA}" \ rapids-download-wheels-from-s3 cpp ./wheels-after # cuml RAPIDS_PY_WHEEL_NAME="cuml_${RAPIDS_PY_CUDA_SUFFIX}" \ RAPIDS_REPOSITORY=rapidsai/cuml \ RAPIDS_REF_NAME="${CUML_PR}" \ RAPIDS_SHA="${CUML_PR_SHA}" \ rapids-download-wheels-from-s3 python ./wheels-after pip install pydistcheck pydistcheck \ --inspect \ --select 'distro-too-large-compressed' \ ./wheels-before/*.whl \ | grep -E '^checking|files: | compressed' \ > ./before.txt # get more exact sizes du -sh ./wheels-before/* pydistcheck \ --inspect \ --select 'distro-too-large-compressed' \ ./wheels-after/*.whl \ | grep -E '^checking|files: | compressed' \ > ./after.txt # get more exact sizes du -sh ./wheels-after/* ``` </details> ### How I tested this These other PRs: * rapidsai/devcontainers#435 * rapidsai/cugraph-gnn#110 * rapidsai/cuml#6199 * rapidsai/cugraph#4804
1 parent fb6bfe6 commit 8299f17

36 files changed

+643
-176
lines changed

.github/workflows/build.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,30 @@ jobs:
6666
node_type: "gpu-v100-latest-1"
6767
run_script: "ci/build_docs.sh"
6868
sha: ${{ inputs.sha }}
69+
wheel-build-libraft:
70+
secrets: inherit
71+
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
72+
with:
73+
build_type: ${{ inputs.build_type || 'branch' }}
74+
branch: ${{ inputs.branch }}
75+
sha: ${{ inputs.sha }}
76+
date: ${{ inputs.date }}
77+
script: ci/build_wheel_libraft.sh
78+
# build for every combination of arch and CUDA version, but only for the latest Python
79+
matrix_filter: group_by([.ARCH, (.CUDA_VER|split(".")|map(tonumber)|.[0])]) | map(max_by(.PY_VER|split(".")|map(tonumber)))
80+
wheel-publish-libraft:
81+
needs: wheel-build-libraft
82+
secrets: inherit
83+
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
84+
with:
85+
build_type: ${{ inputs.build_type || 'branch' }}
86+
branch: ${{ inputs.branch }}
87+
sha: ${{ inputs.sha }}
88+
date: ${{ inputs.date }}
89+
package-name: libraft
90+
package-type: cpp
6991
wheel-build-pylibraft:
92+
needs: wheel-build-libraft
7093
secrets: inherit
7194
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
7295
with:
@@ -85,7 +108,9 @@ jobs:
85108
sha: ${{ inputs.sha }}
86109
date: ${{ inputs.date }}
87110
package-name: pylibraft
111+
package-type: python
88112
wheel-build-raft-dask:
113+
needs: wheel-build-libraft
89114
secrets: inherit
90115
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
91116
with:
@@ -104,3 +129,4 @@ jobs:
104129
sha: ${{ inputs.sha }}
105130
date: ${{ inputs.date }}
106131
package-name: raft_dask
132+
package-type: python

.github/workflows/pr.yaml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121
- conda-python-build
2222
- conda-python-tests
2323
- docs-build
24+
- wheel-build-libraft
2425
- wheel-build-pylibraft
2526
- wheel-tests-pylibraft
2627
- wheel-build-raft-dask
@@ -116,10 +117,22 @@ jobs:
116117
arch: "amd64"
117118
container_image: "rapidsai/ci-conda:latest"
118119
run_script: "ci/build_docs.sh"
119-
wheel-build-pylibraft:
120+
wheel-build-libraft:
120121
needs: checks
121122
secrets: inherit
122123
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
124+
with:
125+
build_type: pull-request
126+
branch: ${{ inputs.branch }}
127+
sha: ${{ inputs.sha }}
128+
date: ${{ inputs.date }}
129+
script: ci/build_wheel_libraft.sh
130+
# build for every combination of arch and CUDA version, but only for the latest Python
131+
matrix_filter: group_by([.ARCH, (.CUDA_VER|split(".")|map(tonumber)|.[0])]) | map(max_by(.PY_VER|split(".")|map(tonumber)))
132+
wheel-build-pylibraft:
133+
needs: [checks, wheel-build-libraft]
134+
secrets: inherit
135+
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
123136
with:
124137
build_type: pull-request
125138
script: ci/build_wheel_pylibraft.sh
@@ -132,7 +145,7 @@ jobs:
132145
build_type: pull-request
133146
script: ci/test_wheel_pylibraft.sh
134147
wheel-build-raft-dask:
135-
needs: wheel-tests-pylibraft
148+
needs: [checks, wheel-build-libraft]
136149
secrets: inherit
137150
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
138151
with:

build.sh

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -347,13 +347,8 @@ if [[ ${CMAKE_TARGET} == "" ]]; then
347347
CMAKE_TARGET="all"
348348
fi
349349

350-
# Append `-DFIND_RAFT_CPP=ON` to EXTRA_CMAKE_ARGS unless a user specified the option.
351-
SKBUILD_EXTRA_CMAKE_ARGS="${EXTRA_CMAKE_ARGS}"
352-
if [[ "${EXTRA_CMAKE_ARGS}" != *"DFIND_RAFT_CPP"* ]]; then
353-
SKBUILD_EXTRA_CMAKE_ARGS="${SKBUILD_EXTRA_CMAKE_ARGS} -DFIND_RAFT_CPP=ON"
354-
fi
355350
# Replace spaces with semicolons in SKBUILD_EXTRA_CMAKE_ARGS
356-
SKBUILD_EXTRA_CMAKE_ARGS=$(echo ${SKBUILD_EXTRA_CMAKE_ARGS} | sed 's/ /;/g')
351+
SKBUILD_EXTRA_CMAKE_ARGS=$(echo ${EXTRA_CMAKE_ARGS} | sed 's/ /;/g')
357352

358353
# If clean given, run it prior to any other steps
359354
if (( ${CLEAN} == 1 )); then

ci/build_wheel.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ set -euo pipefail
55

66
package_name=$1
77
package_dir=$2
8+
package_type=$3
89
underscore_package_name=$(echo "${package_name}" | tr "-" "_")
910

1011
# Clear out system ucx files to ensure that we're getting ucx from the wheel.
@@ -39,6 +40,12 @@ case "${RAPIDS_CUDA_VERSION}" in
3940
;;
4041
esac
4142

43+
if [[ ${package_name} != "libraft" ]]; then
44+
EXCLUDE_ARGS+=(
45+
--exclude "libraft.so"
46+
)
47+
fi
48+
4249
sccache --zero-stats
4350

4451
rapids-logger "Building '${package_name}' wheel"
@@ -55,4 +62,4 @@ sccache --show-adv-stats
5562
mkdir -p final_dist
5663
python -m auditwheel repair -w final_dist "${EXCLUDE_ARGS[@]}" dist/*
5764

58-
RAPIDS_PY_WHEEL_NAME="${underscore_package_name}_${RAPIDS_PY_CUDA_SUFFIX}" rapids-upload-wheels-to-s3 python final_dist
65+
RAPIDS_PY_WHEEL_NAME="${underscore_package_name}_${RAPIDS_PY_CUDA_SUFFIX}" rapids-upload-wheels-to-s3 ${package_type} final_dist

ci/build_wheel_libraft.sh

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#!/bin/bash
2+
# Copyright (c) 2024, NVIDIA CORPORATION.
3+
4+
set -euo pipefail
5+
6+
package_name="libraft"
7+
package_dir="python/libraft"
8+
9+
rapids-logger "Generating build requirements"
10+
matrix_selectors="cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION};cuda_suffixed=true"
11+
12+
rapids-dependency-file-generator \
13+
--output requirements \
14+
--file-key "py_build_${package_name}" \
15+
--file-key "py_rapids_build_${package_name}" \
16+
--matrix "${matrix_selectors}" \
17+
| tee /tmp/requirements-build.txt
18+
19+
rapids-logger "Installing build requirements"
20+
python -m pip install \
21+
-v \
22+
--prefer-binary \
23+
-r /tmp/requirements-build.txt
24+
25+
# build with '--no-build-isolation', for better sccache hit rate
26+
# 0 really means "add --no-build-isolation" (ref: https://github.com/pypa/pip/issues/5735)
27+
export PIP_NO_BUILD_ISOLATION=0
28+
29+
RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})"
30+
31+
case "${RAPIDS_CUDA_VERSION}" in
32+
12.*)
33+
EXTRA_CMAKE_ARGS="-DUSE_CUDA_MATH_WHEELS=ON"
34+
;;
35+
11.*)
36+
EXTRA_CMAKE_ARGS="-DUSE_CUDA_MATH_WHEELS=OFF"
37+
;;
38+
esac
39+
40+
export SKBUILD_CMAKE_ARGS="${EXTRA_CMAKE_ARGS}"
41+
42+
ci/build_wheel.sh libraft ${package_dir} cpp
43+
ci/validate_wheel.sh ${package_dir} final_dist libraft

ci/build_wheel_pylibraft.sh

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,16 @@ set -euo pipefail
55

66
package_dir="python/pylibraft"
77

8-
case "${RAPIDS_CUDA_VERSION}" in
9-
12.*)
10-
EXTRA_CMAKE_ARGS=";-DUSE_CUDA_MATH_WHEELS=ON"
11-
;;
12-
11.*)
13-
EXTRA_CMAKE_ARGS=";-DUSE_CUDA_MATH_WHEELS=OFF"
14-
;;
15-
esac
8+
RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})"
169

17-
# Set up skbuild options. Enable sccache in skbuild config options
18-
export SKBUILD_CMAKE_ARGS="-DDETECT_CONDA_ENV=OFF;-DFIND_RAFT_CPP=OFF${EXTRA_CMAKE_ARGS}"
10+
# Downloads libraft wheels from this current build,
11+
# then ensures 'pylibraft' wheel builds always use the 'libraft' just built in the same CI run.
12+
#
13+
# Using env variable PIP_CONSTRAINT is necessary to ensure the constraints
14+
# are used when creating the isolated build environment.
15+
RAPIDS_PY_WHEEL_NAME="libraft_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 cpp /tmp/libraft_dist
16+
echo "libraft-${RAPIDS_PY_CUDA_SUFFIX} @ file://$(echo /tmp/libraft_dist/libraft_*.whl)" > /tmp/constraints.txt
17+
export PIP_CONSTRAINT="/tmp/constraints.txt"
1918

20-
ci/build_wheel.sh pylibraft ${package_dir}
19+
ci/build_wheel.sh pylibraft ${package_dir} python
2120
ci/validate_wheel.sh ${package_dir} final_dist pylibraft

ci/build_wheel_raft_dask.sh

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,16 @@ set -euo pipefail
55

66
package_dir="python/raft-dask"
77

8-
# Set up skbuild options. Enable sccache in skbuild config options
9-
export SKBUILD_CMAKE_ARGS="-DDETECT_CONDA_ENV=OFF;-DFIND_RAFT_CPP=OFF"
8+
RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})"
109

11-
ci/build_wheel.sh raft-dask ${package_dir}
10+
# Downloads libraft wheels from this current build,
11+
# then ensures 'raft-dask' wheel builds always use the 'libraft' just built in the same CI run.
12+
#
13+
# Using env variable PIP_CONSTRAINT is necessary to ensure the constraints
14+
# are used when creating the isolated build environment.
15+
RAPIDS_PY_WHEEL_NAME="libraft_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 cpp /tmp/libraft_dist
16+
echo "libraft-${RAPIDS_PY_CUDA_SUFFIX} @ file://$(echo /tmp/libraft_dist/libraft_*.whl)" > /tmp/constraints.txt
17+
export PIP_CONSTRAINT="/tmp/constraints.txt"
18+
19+
ci/build_wheel.sh raft-dask ${package_dir} python
1220
ci/validate_wheel.sh ${package_dir} final_dist raft-dask

ci/check_style.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,12 @@ rapids-dependency-file-generator \
1414
rapids-mamba-retry env create --yes -f env.yaml -n checks
1515
conda activate checks
1616

17+
# get config for cmake-format checks
18+
RAPIDS_VERSION_MAJOR_MINOR="$(rapids-version-major-minor)"
19+
FORMAT_FILE_URL="https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-${RAPIDS_VERSION_MAJOR_MINOR}/cmake-format-rapids-cmake.json"
20+
export RAPIDS_CMAKE_FORMAT_FILE=/tmp/rapids_cmake_ci/cmake-formats-rapids-cmake.json
21+
mkdir -p $(dirname ${RAPIDS_CMAKE_FORMAT_FILE})
22+
wget -O ${RAPIDS_CMAKE_FORMAT_FILE} ${FORMAT_FILE_URL}
23+
1724
# Run pre-commit checks
1825
pre-commit run --all-files --show-diff-on-failure

ci/release/update-version.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ echo "${NEXT_FULL_TAG}" > VERSION
4343

4444
DEPENDENCIES=(
4545
dask-cuda
46+
libraft
47+
librmm
4648
pylibraft
4749
rmm
4850
rapids-dask-dependency

ci/test_wheel_pylibraft.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,13 @@ set -euo pipefail
55

66
mkdir -p ./dist
77
RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})"
8-
RAPIDS_PY_WHEEL_NAME="pylibraft_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 ./dist
8+
RAPIDS_PY_WHEEL_NAME="libraft_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 cpp ./local-libraft-dep
9+
RAPIDS_PY_WHEEL_NAME="pylibraft_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 python ./dist
10+
911

1012
# echo to expand wildcard before adding `[extra]` requires for pip
11-
python -m pip install $(echo ./dist/pylibraft*.whl)[test]
13+
python -m pip install \
14+
./local-libraft-dep/libraft*.whl \
15+
"$(echo ./dist/pylibraft*.whl)[test]"
1216

1317
python -m pytest ./python/pylibraft/pylibraft/test

ci/test_wheel_raft_dask.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ set -euo pipefail
55

66
mkdir -p ./dist
77
RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})"
8-
RAPIDS_PY_WHEEL_NAME="raft_dask_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 ./dist
9-
10-
# Download the pylibraft built in the previous step
11-
RAPIDS_PY_WHEEL_NAME="pylibraft_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 ./local-pylibraft-dep
8+
RAPIDS_PY_WHEEL_NAME="libraft_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 cpp ./local-libraft-dep
9+
RAPIDS_PY_WHEEL_NAME="pylibraft_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 python ./local-pylibraft-dep
10+
RAPIDS_PY_WHEEL_NAME="raft_dask_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 python ./dist
1211

1312
# echo to expand wildcard before adding `[extra]` requires for pip
1413
python -m pip install -v \
14+
./local-libraft-dep/libraft*.whl \
1515
./local-pylibraft-dep/pylibraft*.whl \
1616
"$(echo ./dist/raft_dask_${RAPIDS_PY_CUDA_SUFFIX}*.whl)[test]"
1717

ci/validate_wheel.sh

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,17 @@ package_name=$3
1010
RAPIDS_CUDA_MAJOR="${RAPIDS_CUDA_VERSION%%.*}"
1111

1212
# some packages are much larger on CUDA 11 than on CUDA 12
13-
if [[ "${package_name}" == "raft-dask" ]]; then
14-
PYDISTCHECK_ARGS=(
15-
--max-allowed-size-compressed '200M'
16-
)
17-
elif [[ "${package_name}" == "pylibraft" ]]; then
13+
PYDISTCHECK_ARGS=()
14+
if [[ "${package_name}" == "libraft" ]]; then
1815
if [[ "${RAPIDS_CUDA_MAJOR}" == "11" ]]; then
19-
PYDISTCHECK_ARGS=(
20-
--max-allowed-size-compressed '600M'
16+
PYDISTCHECK_ARGS+=(
17+
--max-allowed-size-compressed '750M'
2118
)
2219
else
23-
PYDISTCHECK_ARGS=(
20+
PYDISTCHECK_ARGS+=(
2421
--max-allowed-size-compressed '100M'
2522
)
2623
fi
27-
else
28-
echo "Unsupported package name: ${package_name}"
29-
exit 1
3024
fi
3125

3226
cd "${package_dir}"

0 commit comments

Comments
 (0)