-
Notifications
You must be signed in to change notification settings - Fork 329
introduce libcugraph wheels #4804
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 all commits
2898e78
0ecd5a5
f1645ac
6e1d3d9
3aa693c
7c55d20
c5cb53d
e73606c
fc37020
e80d566
695f627
486bf96
fce4fcf
796b54e
157f63e
4b4c4b2
e5aa3c2
089109f
881dc25
3484186
ead60e4
7dd4409
1d60712
7913278
96a7b5b
a18be8c
7f4f13b
dc7dac9
a38e5ae
3e57917
79cebbc
3a07f41
c753752
8e9fc0e
e72f55c
f924cef
c6b1d5a
ba612bd
bf8f815
1847314
740c3e9
9b0d635
4f742e5
4a9c070
2e77200
a026fc6
ffc122e
073504c
f5c8f16
f959f49
cdffb59
fbdc791
c629a4b
cce3e86
e7a2291
05e8617
8fe1d33
86c56d0
3130739
d623139
4e1265d
12a01e2
540c1a4
5573920
72978c7
5bc7523
47672c9
5b6fd89
abd6f18
96fb23a
ba73e56
2dbd946
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 |
---|---|---|
|
@@ -67,7 +67,29 @@ jobs: | |
node_type: "gpu-v100-latest-1" | ||
run_script: "ci/build_docs.sh" | ||
sha: ${{ inputs.sha }} | ||
wheel-build-libcugraph: | ||
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_libcugraph.sh | ||
node_type: cpu32 | ||
wheel-publish-libcugraph: | ||
needs: wheel-build-libcugraph | ||
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: libcugraph | ||
package-type: cpp | ||
wheel-build-pylibcugraph: | ||
needs: wheel-build-libcugraph | ||
secrets: inherit | ||
uses: rapidsai/shared-workflows/.github/workflows/[email protected] | ||
with: | ||
|
@@ -76,7 +98,6 @@ jobs: | |
sha: ${{ inputs.sha }} | ||
date: ${{ inputs.date }} | ||
script: ci/build_wheel_pylibcugraph.sh | ||
node_type: cpu32 | ||
wheel-publish-pylibcugraph: | ||
needs: wheel-build-pylibcugraph | ||
secrets: inherit | ||
|
@@ -87,8 +108,9 @@ jobs: | |
sha: ${{ inputs.sha }} | ||
date: ${{ inputs.date }} | ||
package-name: pylibcugraph | ||
package-type: python | ||
wheel-build-cugraph: | ||
needs: wheel-publish-pylibcugraph | ||
needs: wheel-build-pylibcugraph | ||
secrets: inherit | ||
uses: rapidsai/shared-workflows/.github/workflows/[email protected] | ||
with: | ||
|
@@ -107,3 +129,4 @@ jobs: | |
sha: ${{ inputs.sha }} | ||
date: ${{ inputs.date }} | ||
package-name: cugraph | ||
package-type: python |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ jobs: | |
- conda-python-build | ||
- conda-python-tests | ||
- docs-build | ||
- wheel-build-libcugraph | ||
- wheel-build-pylibcugraph | ||
- wheel-tests-pylibcugraph | ||
- wheel-build-cugraph | ||
|
@@ -149,14 +150,22 @@ jobs: | |
arch: "amd64" | ||
container_image: "rapidsai/ci-conda:cuda11.8.0-ubuntu22.04-py3.10" | ||
run_script: "ci/build_docs.sh" | ||
wheel-build-pylibcugraph: | ||
wheel-build-libcugraph: | ||
needs: checks | ||
secrets: inherit | ||
uses: rapidsai/shared-workflows/.github/workflows/[email protected] | ||
with: | ||
# 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))) | ||
build_type: pull-request | ||
script: ci/build_wheel_libcugraph.sh | ||
wheel-build-pylibcugraph: | ||
needs: wheel-build-libcugraph | ||
secrets: inherit | ||
uses: rapidsai/shared-workflows/.github/workflows/[email protected] | ||
with: | ||
build_type: pull-request | ||
script: ci/build_wheel_pylibcugraph.sh | ||
node_type: cpu32 | ||
wheel-tests-pylibcugraph: | ||
needs: [wheel-build-pylibcugraph, changed-files] | ||
secrets: inherit | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,25 @@ | ||
#!/bin/bash | ||
# Copyright (c) 2023-2024, NVIDIA CORPORATION. | ||
# Copyright (c) 2023-2025, NVIDIA CORPORATION. | ||
|
||
set -euo pipefail | ||
|
||
package_dir="python/cugraph" | ||
|
||
RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})" | ||
|
||
# Download the pylibcugraph wheel built in the previous step and make it | ||
# Download the libcugraph and pylibcugraph wheels built in the previous step and make them | ||
# available for pip to find. | ||
# | ||
# ensure 'cugraph' wheel builds always use the 'pylibcugraph' 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 | ||
CPP_WHEELHOUSE=$(RAPIDS_PY_WHEEL_NAME="pylibcugraph_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 /tmp/pylibcugraph_dist) | ||
LIBCUGRAPH_WHEELHOUSE=$(RAPIDS_PY_WHEEL_NAME="libcugraph_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 cpp /tmp/libcugraph_dist) | ||
PYLIBCUGRAPH_WHEELHOUSE=$(RAPIDS_PY_WHEEL_NAME="pylibcugraph_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 python /tmp/pylibcugraph_dist) | ||
|
||
echo "pylibcugraph-${RAPIDS_PY_CUDA_SUFFIX} @ file://$(echo ${CPP_WHEELHOUSE}/pylibcugraph_*.whl)" > ./constraints.txt | ||
export PIP_CONSTRAINT="${PWD}/constraints.txt" | ||
|
||
PARALLEL_LEVEL=$(python -c \ | ||
"from math import ceil; from multiprocessing import cpu_count; print(ceil(cpu_count()/4))") | ||
case "${RAPIDS_CUDA_VERSION}" in | ||
12.*) | ||
EXTRA_CMAKE_ARGS=";-DUSE_CUDA_MATH_WHEELS=ON" | ||
;; | ||
11.*) | ||
EXTRA_CMAKE_ARGS=";-DUSE_CUDA_MATH_WHEELS=OFF" | ||
;; | ||
esac | ||
cat >> ./constraints.txt <<EOF | ||
libcugraph-${RAPIDS_PY_CUDA_SUFFIX} @ file://$(echo ${LIBCUGRAPH_WHEELHOUSE}/libcugraph_*.whl) | ||
pylibcugraph-${RAPIDS_PY_CUDA_SUFFIX} @ file://$(echo ${PYLIBCUGRAPH_WHEELHOUSE}/pylibcugraph_*.whl) | ||
EOF | ||
|
||
export SKBUILD_CMAKE_ARGS="-DDETECT_CONDA_ENV=OFF;-DFIND_CUGRAPH_CPP=OFF${EXTRA_CMAKE_ARGS}" | ||
export SKBUILD_BUILD_TOOL_ARGS="-j${PARALLEL_LEVEL};-l${PARALLEL_LEVEL}" | ||
# Using env variable PIP_CONSTRAINT is necessary to ensure the constraints | ||
# are used when creating the isolated build environment. | ||
export PIP_CONSTRAINT="${PWD}/constraints.txt" | ||
|
||
./ci/build_wheel.sh cugraph ${package_dir} | ||
./ci/build_wheel.sh cugraph ${package_dir} python | ||
./ci/validate_wheel.sh ${package_dir} final_dist |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/bash | ||
# Copyright (c) 2025, NVIDIA CORPORATION. | ||
|
||
set -euo pipefail | ||
|
||
package_name="libcugraph" | ||
package_dir="python/libcugraph" | ||
|
||
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 | ||
|
||
rapids-logger "Done build requirements" | ||
|
||
# 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 libcugraph ${package_dir} cpp | ||
./ci/validate_wheel.sh ${package_dir} final_dist |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,23 @@ | ||
#!/bin/bash | ||
# Copyright (c) 2023-2024, NVIDIA CORPORATION. | ||
# Copyright (c) 2023-2025, NVIDIA CORPORATION. | ||
|
||
set -euo pipefail | ||
|
||
package_dir="python/pylibcugraph" | ||
|
||
PARALLEL_LEVEL=$(python -c \ | ||
"from math import ceil; from multiprocessing import cpu_count; print(ceil(cpu_count()/4))") | ||
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 | ||
# Download the libcugraph wheel built in the previous step and make it | ||
# available for pip to find. | ||
LIBCUGRAPH_WHEELHOUSE=$(RAPIDS_PY_WHEEL_NAME="libcugraph_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 cpp /tmp/libcugraph_dist) | ||
|
||
export SKBUILD_CMAKE_ARGS="-DDETECT_CONDA_ENV=OFF;-DFIND_CUGRAPH_CPP=OFF${EXTRA_CMAKE_ARGS}" | ||
export SKBUILD_BUILD_TOOL_ARGS="-j${PARALLEL_LEVEL};-l${PARALLEL_LEVEL}" | ||
cat >> ./constraints.txt <<EOF | ||
libcugraph-${RAPIDS_PY_CUDA_SUFFIX} @ file://$(echo ${LIBCUGRAPH_WHEELHOUSE}/libcugraph_*.whl) | ||
EOF | ||
|
||
./ci/build_wheel.sh pylibcugraph ${package_dir} | ||
# Using env variable PIP_CONSTRAINT is necessary to ensure the constraints | ||
# are used when creating the isolated build environment. | ||
export PIP_CONSTRAINT="${PWD}/constraints.txt" | ||
|
||
./ci/build_wheel.sh pylibcugraph ${package_dir} python | ||
./ci/validate_wheel.sh ${package_dir} final_dist |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/bin/bash | ||
# Copyright (c) 2018-2024, NVIDIA CORPORATION. | ||
# Copyright (c) 2018-2025, NVIDIA CORPORATION. | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
|
@@ -57,6 +57,7 @@ DEPENDENCIES=( | |
dask-cuda | ||
dask-cudf | ||
libcudf | ||
libcugraph | ||
libraft | ||
librmm | ||
pylibcugraph | ||
|
@@ -109,4 +110,3 @@ find .devcontainer/ -type f -name devcontainer.json -print0 | while IFS= read -r | |
done | ||
|
||
sed_runner "s/:[0-9][0-9]\.[0-9][0-9]/:${NEXT_SHORT_TAG}/" ./notebooks/README.md | ||
sed_runner "s/branch-[0-9][0-9].[0-9][0-9]/branch-${NEXT_SHORT_TAG}/" ./docs/cugraph/source/nx_cugraph/nx_cugraph.md | ||
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. To test the changes in this PR, I tested ci/release/update-version.sh '25.04.00' That revealed that this file doesn't exist any more... because all the docs were moved over to https://github.com/rapidsai/cugraph-docs in #4837 Thought it wasn't worth a new PR and CI run just for this, so just adding it here. |
Uh oh!
There was an error while loading. Please reload this page.