-
Notifications
You must be signed in to change notification settings - Fork 615
introduce libcuml wheels #6199
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
Merged
Merged
introduce libcuml wheels #6199
Changes from all commits
Commits
Show all changes
77 commits
Select commit
Hold shift + click to select a range
e42f3d1
initial libcuml wheel
jameslamb 13db0a9
remove uses of ASSOCIATED_TARGETS, lots of other refactoring
jameslamb f33e5ed
Merge branch 'branch-25.02' into libcuml-wheels
jameslamb 368faea
more changes
jameslamb bbc4742
Merge branch 'branch-25.02' of github.com:rapidsai/cuml into libcuml-…
jameslamb e99a2b7
use static treelite
jameslamb b6eeb73
merge branch-25.02
jameslamb 8082c45
one more merge conflict
jameslamb 8434d77
more fiddling
jameslamb 9bda048
more changes
jameslamb eb14ede
more changes
jameslamb c5d385b
Merge branch 'branch-25.02' into libcuml-wheels
jameslamb 8c1f38d
got importing minimally working
jameslamb 7c09598
use conda packages from RAFT PR
jameslamb c7ad450
pre-commit
jameslamb 8d058e6
copyright
jameslamb cbf26a2
fix scripts
jameslamb dc8a5a4
fix wheel downloads
jameslamb 9773c81
clone cumlprims_mg in CI
jameslamb a56e3d4
fix pins, fix script
jameslamb dba121f
pull in changes from logger targets
jameslamb 2290fb7
more changes
jameslamb e6f4d73
update handling of cumlprims_mg
jameslamb a224fc1
more todo
jameslamb afe7c4f
Merge branch 'branch-25.02' of github.com:rapidsai/cuml into libcuml-…
jameslamb 96b90f3
merge branch-25.02
jameslamb 05f8fbf
start unwinding CPM debugging changes
jameslamb 8f505e3
undo exporting
jameslamb 829d714
add debugging prints, update RAFT commit
jameslamb 8151e62
this is working
jameslamb cae868e
revert some debugging changes
jameslamb def5a4d
use static treelite
jameslamb 9ae5941
Merge branch 'branch-25.02' into libcuml-wheels
jameslamb 83b28d9
bigger pydistcheck threshold, remove cuvs from build env
jameslamb e6cf739
Merge branch 'libcuml-wheels' of github.com:jameslamb/cuml into libcu…
jameslamb 1d5326f
fix validation working dir
jameslamb 2ef32ea
try to fix more builds
jameslamb e35df32
use dynamic treelite in conda builds
jameslamb 7853681
refine build dependencies
jameslamb 7e94d7d
merge branch-25.02
jameslamb ba3387f
more dependency fixes
jameslamb 1f9ac89
fix scripts
jameslamb 82e3f16
update RAFT commit, build cuml without build isolation
jameslamb 53c8b35
try fixing math wheels linkage for CUDA 11
jameslamb 002c0f3
add use_cuda_wheels
jameslamb 35c88ac
fix build_wheel_cuml.sh again
jameslamb 0e62018
try to fix build_wheel_cuml.sh again
jameslamb f5b6590
misc. changes
jameslamb e4c1fad
Merge branch 'branch-25.02' of github.com:rapidsai/cuml into libcuml-…
jameslamb c79617b
rapids_cuda_init_architectures()
jameslamb 57db9f7
Revert libraft testing changes.
bdice e7109c4
simplify CMake
jameslamb e2ae2dc
Merge branch 'libcuml-wheels' of github.com:jameslamb/cuml into libcu…
jameslamb b17f613
fix typo in rapids_cuda_init_architectures
jameslamb 2623cc9
fix SINGLEGPU arg
jameslamb 77c8f14
updates
jameslamb 668e46b
Merge branch 'branch-25.02' of github.com:rapidsai/cuml into libcuml-…
jameslamb 3a02bf5
use libcuvs wheels
jameslamb bd8de88
CUVS_COMMIT
jameslamb 610970a
fix depends_on_libcuvs
jameslamb 2859fd8
Merge branch 'branch-25.02' into libcuml-wheels
jameslamb 73f20b9
use CUDA wheels on CUDA 11
jameslamb 9c615b1
update cuVS commit
jameslamb 71ce00d
rearrange CI-artifact-downloading
jameslamb 8c9dd70
align paths for constraints
jameslamb d016c28
this constraints file is giving me agita
jameslamb 9d5100e
newer cuvs commit
jameslamb b1b9d08
adjust wheel-size thresholds, clean up some debugging stuff
jameslamb 21fe7c7
more cleanup
jameslamb 057a4a9
Update ci/build_wheel_cuml.sh
jameslamb c451a47
Update python/libcuml/libcuml/load.py
jameslamb 93ddda5
merge branch-25.02
jameslamb 02ac476
Merge branch 'branch-25.02' into libcuml-wheels
bdice fb83625
remove download-cuvs-ci-artifacts stuff
jameslamb 304c52d
Merge branch 'libcuml-wheels' of github.com:jameslamb/cuml into libcu…
jameslamb 1f09c32
Remove testing changes now that libcuvs is available.
bdice 90b4d81
Merge branch 'libcuml-wheels' of github.com:jameslamb/cuml into libcu…
bdice 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,55 +1,26 @@ | ||
| #!/bin/bash | ||
| # Copyright (c) 2023-2024, NVIDIA CORPORATION. | ||
| # Copyright (c) 2023-2025, NVIDIA CORPORATION. | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| package_dir="python/cuml" | ||
| package_name=$1 | ||
| package_dir=$2 | ||
|
|
||
| source rapids-configure-sccache | ||
| source rapids-date-string | ||
|
|
||
| RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})" | ||
|
|
||
| rapids-generate-version > ./VERSION | ||
|
|
||
| cd ${package_dir} | ||
|
|
||
| case "${RAPIDS_CUDA_VERSION}" in | ||
| 12.*) | ||
| EXCLUDE_ARGS=( | ||
| --exclude "libcuvs.so" | ||
| --exclude "libcublas.so.12" | ||
| --exclude "libcublasLt.so.12" | ||
| --exclude "libcufft.so.11" | ||
| --exclude "libcurand.so.10" | ||
| --exclude "libcusolver.so.11" | ||
| --exclude "libcusparse.so.12" | ||
| --exclude "libnvJitLink.so.12" | ||
| ) | ||
| EXTRA_CMAKE_ARGS=";-DUSE_CUDA_MATH_WHEELS=ON" | ||
| ;; | ||
| 11.*) | ||
| EXCLUDE_ARGS=( | ||
| --exclude "libcuvs.so" | ||
| ) | ||
| EXTRA_CMAKE_ARGS=";-DUSE_CUDA_MATH_WHEELS=OFF" | ||
| ;; | ||
| esac | ||
| cd "${package_dir}" | ||
|
|
||
| sccache --zero-stats | ||
|
|
||
| SKBUILD_CMAKE_ARGS="-DDETECT_CONDA_ENV=OFF;-DDISABLE_DEPRECATION_WARNINGS=ON;-DCPM_cumlprims_mg_SOURCE=${GITHUB_WORKSPACE}/cumlprims_mg/;-DUSE_CUVS_WHEEL=ON${EXTRA_CMAKE_ARGS}" \ | ||
| python -m pip wheel . \ | ||
| rapids-logger "Building '${package_name}' wheel" | ||
| python -m pip wheel \ | ||
| -w dist \ | ||
| -v \ | ||
| --no-deps \ | ||
| --disable-pip-version-check | ||
| --disable-pip-version-check \ | ||
| . | ||
|
|
||
| sccache --show-adv-stats | ||
|
|
||
| mkdir -p final_dist | ||
| python -m auditwheel repair -w final_dist "${EXCLUDE_ARGS[@]}" dist/* | ||
|
|
||
| ../../ci/validate_wheel.sh final_dist | ||
|
|
||
| RAPIDS_PY_WHEEL_NAME="cuml_${RAPIDS_PY_CUDA_SUFFIX}" rapids-upload-wheels-to-s3 python final_dist |
This file contains hidden or 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,42 @@ | ||
| #!/bin/bash | ||
| # Copyright (c) 2023-2025, NVIDIA CORPORATION. | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| package_name="cuml" | ||
| package_dir="python/cuml" | ||
|
|
||
| RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})" | ||
|
|
||
| # Download the libcuml wheel built in the previous step and make it | ||
| # available for pip to find. | ||
| RAPIDS_PY_WHEEL_NAME="libcuml_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 cpp /tmp/libcuml_dist | ||
| echo "libcuml-${RAPIDS_PY_CUDA_SUFFIX} @ file://$(echo /tmp/libcuml_dist/libcuml_*.whl)" >> /tmp/constraints.txt | ||
| export PIP_CONSTRAINT="/tmp/constraints.txt" | ||
|
|
||
| EXCLUDE_ARGS=( | ||
| --exclude "libcuml++.so" | ||
| --exclude "libcumlprims_mg.so" | ||
| --exclude "libcuvs.so" | ||
| --exclude "libraft.so" | ||
| --exclude "libcublas.so.*" | ||
| --exclude "libcublasLt.so.*" | ||
| --exclude "libcufft.so.*" | ||
| --exclude "libcurand.so.*" | ||
| --exclude "libcusolver.so.*" | ||
| --exclude "libcusparse.so.*" | ||
| --exclude "libnvJitLink.so.*" | ||
| ) | ||
|
|
||
| export SKBUILD_CMAKE_ARGS="-DDISABLE_DEPRECATION_WARNINGS=ON;-DSINGLEGPU=OFF;-DUSE_LIBCUML_WHEEL=ON" | ||
| ./ci/build_wheel.sh "${package_name}" "${package_dir}" | ||
|
|
||
| mkdir -p ${package_dir}/final_dist | ||
| python -m auditwheel repair \ | ||
| "${EXCLUDE_ARGS[@]}" \ | ||
| -w ${package_dir}/final_dist \ | ||
| ${package_dir}/dist/* | ||
|
|
||
| ./ci/validate_wheel.sh ${package_dir} final_dist | ||
|
|
||
| RAPIDS_PY_WHEEL_NAME="${package_name}_${RAPIDS_PY_CUDA_SUFFIX}" rapids-upload-wheels-to-s3 python "${package_dir}/final_dist" | ||
This file contains hidden or 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,56 @@ | ||
| #!/bin/bash | ||
| # Copyright (c) 2025, NVIDIA CORPORATION. | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| package_name="libcuml" | ||
| package_dir="python/libcuml" | ||
|
|
||
| RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})" | ||
|
|
||
| rapids-logger "Generating build requirements" | ||
|
|
||
| rapids-dependency-file-generator \ | ||
| --output requirements \ | ||
| --file-key "py_build_${package_name}" \ | ||
| --file-key "py_rapids_build_${package_name}" \ | ||
| --matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION};cuda_suffixed=true" \ | ||
| | 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 | ||
|
|
||
| # NOTE: 'libcumlprims_mg.so' is marked as '--exclude' here because auditwheel doesn't detect it, | ||
| # but it really is intentionally included in 'libcuml' wheels | ||
| EXCLUDE_ARGS=( | ||
| --exclude "libcumlprims_mg.so" | ||
| --exclude "libcuvs.so" | ||
| --exclude "libraft.so" | ||
| --exclude "libcublas.so.*" | ||
| --exclude "libcublasLt.so.*" | ||
| --exclude "libcufft.so.*" | ||
| --exclude "libcurand.so.*" | ||
| --exclude "libcusolver.so.*" | ||
| --exclude "libcusparse.so.*" | ||
| --exclude "libnvJitLink.so.*" | ||
| ) | ||
|
|
||
| export SKBUILD_CMAKE_ARGS="-DDISABLE_DEPRECATION_WARNINGS=ON;-DCPM_cumlprims_mg_SOURCE=${GITHUB_WORKSPACE}/cumlprims_mg/" | ||
| ./ci/build_wheel.sh "${package_name}" "${package_dir}" | ||
|
|
||
| mkdir -p ${package_dir}/final_dist | ||
| python -m auditwheel repair \ | ||
| "${EXCLUDE_ARGS[@]}" \ | ||
| -w ${package_dir}/final_dist \ | ||
| ${package_dir}/dist/* | ||
|
|
||
| ./ci/validate_wheel.sh ${package_dir} final_dist | ||
|
|
||
| RAPIDS_PY_WHEEL_NAME="${package_name}_${RAPIDS_PY_CUDA_SUFFIX}" rapids-upload-wheels-to-s3 cpp "${package_dir}/final_dist" |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Uh oh!
There was an error while loading. Please reload this page.