Skip to content
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

WIP: [DO NOT MERGE] introduce libcugraph wheels #4804

Draft
wants to merge 55 commits into
base: branch-25.02
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
2898e78
distribute libcugraph wheels
jameslamb Dec 3, 2024
0ecd5a5
exclude libcugraph.so from cugraph/pylibcugraph
jameslamb Dec 4, 2024
f1645ac
fix pr-builder
jameslamb Dec 5, 2024
6e1d3d9
remove more cugraph-ops, fix variables
jameslamb Dec 5, 2024
3aa693c
remove Python interpreter stuff
jameslamb Dec 6, 2024
7c55d20
Merge branch 'branch-25.02' into libcugraph-wheel
jameslamb Dec 6, 2024
c5cb53d
temporarily raise size threshold
jameslamb Dec 6, 2024
e73606c
declare librmm dependency, fix CI dependency tree
jameslamb Dec 6, 2024
fc37020
run a subet of wheel-testing CI
jameslamb Dec 6, 2024
e80d566
skip devcontainer jobs
jameslamb Dec 6, 2024
695f627
skip 'checks' job too
jameslamb Dec 6, 2024
486bf96
just run Python 3.12 builds
jameslamb Dec 6, 2024
fce4fcf
move CUDA libs deps to wheels, ignore deprecation warning
jameslamb Dec 6, 2024
796b54e
more dependency fiddling
jameslamb Dec 6, 2024
157f63e
fix CI configs, remove unnecessary stuff from pylibcugraph CMake
jameslamb Dec 9, 2024
4b4c4b2
load libcugraph_c too
jameslamb Dec 9, 2024
e5aa3c2
merge branch-25.02
jameslamb Dec 9, 2024
089109f
fix typo
jameslamb Dec 9, 2024
881dc25
header install sort of working
jameslamb Dec 10, 2024
3484186
Merge branch 'branch-25.02' into libcugraph-wheel
nv-rliu Dec 12, 2024
ead60e4
install working (no libraft.a/libraft.so, just headers) ... export no…
jameslamb Dec 12, 2024
7dd4409
install working, exports still not quite working
jameslamb Dec 12, 2024
1d60712
remove debugging stuff
jameslamb Dec 12, 2024
7913278
merge branch-25.02
jameslamb Dec 12, 2024
96a7b5b
Merge branch 'libcugraph-wheel' of github.com:jameslamb/cugraph into …
jameslamb Dec 12, 2024
a18be8c
remove more debugging stuff
jameslamb Dec 12, 2024
7f4f13b
try adding exports back
jameslamb Dec 12, 2024
dc7dac9
use libraft wheels
jameslamb Dec 17, 2024
a38e5ae
use libraft from PR
jameslamb Dec 17, 2024
3e57917
update RAFT reference
jameslamb Dec 17, 2024
79cebbc
fix libcugraph build script
jameslamb Dec 17, 2024
3a07f41
try to fix installing libraft
jameslamb Dec 17, 2024
c753752
use constraints instead
jameslamb Dec 17, 2024
8e9fc0e
Merge branch 'branch-25.02' into libcugraph-wheel
jameslamb Dec 17, 2024
e72f55c
Merge branch 'branch-25.02' into libcugraph-wheel
jameslamb Dec 18, 2024
f924cef
merge branch-25.02
jameslamb Dec 20, 2024
c6b1d5a
try new libraft wheels
jameslamb Dec 20, 2024
ba612bd
merge
jameslamb Dec 20, 2024
bf8f815
merge branch-25.02
jameslamb Dec 23, 2024
1847314
remove USE_CUDA_MATH_WHEELS
jameslamb Dec 30, 2024
740c3e9
Merge branch 'branch-25.02' into libcugraph-wheel
jameslamb Jan 2, 2025
9b0d635
Merge branch 'branch-25.02' into libcugraph-wheel
jameslamb Jan 6, 2025
4f742e5
Merge branch 'libcugraph-wheel' of github.com:jameslamb/cugraph into …
jameslamb Jan 6, 2025
4a9c070
Merge branch 'branch-25.02' into libcugraph-wheel
jameslamb Jan 7, 2025
2e77200
Merge branch 'libcugraph-wheel' of github.com:jameslamb/cugraph into …
jameslamb Jan 7, 2025
a026fc6
update copyrights, get packages from CI
jameslamb Jan 7, 2025
ffc122e
Merge branch 'branch-25.02' into libcugraph-wheel
jameslamb Jan 7, 2025
073504c
merge branch-25.02
jameslamb Jan 8, 2025
f5c8f16
more changes
jameslamb Jan 8, 2025
f959f49
use dynamic libraft
jameslamb Jan 9, 2025
cdffb59
more fixes
jameslamb Jan 9, 2025
fbdc791
merge branch-25.02
jameslamb Jan 9, 2025
c629a4b
move Cython, other small changes
jameslamb Jan 9, 2025
cce3e86
clean up dependencies, other misc. fixes
jameslamb Jan 10, 2025
e7a2291
use newer raft packages
jameslamb Jan 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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-publish-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-publish-libcugraph
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
with:
Expand All @@ -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
Expand All @@ -87,6 +108,7 @@ jobs:
sha: ${{ inputs.sha }}
date: ${{ inputs.date }}
package-name: pylibcugraph
package-type: python
wheel-build-cugraph:
needs: wheel-publish-pylibcugraph
secrets: inherit
Expand All @@ -107,3 +129,4 @@ jobs:
sha: ${{ inputs.sha }}
date: ${{ inputs.date }}
package-name: cugraph
package-type: cpp
151 changes: 81 additions & 70 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,51 +13,52 @@ jobs:
# Please keep pr-builder as the top job here
pr-builder:
needs:
- check-nightly-ci
#- check-nightly-ci
- changed-files
- checks
- conda-cpp-build
- conda-cpp-tests
- conda-cpp-checks
- conda-notebook-tests
# - conda-notebook-tests
- conda-python-build
- conda-python-tests
- docs-build
# - docs-build
- wheel-build-libcugraph
- wheel-build-pylibcugraph
- wheel-tests-pylibcugraph
- wheel-build-cugraph
- wheel-tests-cugraph
- telemetry-setup
- devcontainer
# - telemetry-setup
# - devcontainer
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
if: always()
with:
needs: ${{ toJSON(needs) }}
telemetry-setup:
runs-on: ubuntu-latest
continue-on-error: true
env:
OTEL_SERVICE_NAME: "pr-cugraph"
steps:
- name: Telemetry setup
if: ${{ vars.TELEMETRY_ENABLED == 'true' }}
uses: rapidsai/shared-actions/telemetry-dispatch-stash-base-env-vars@main
check-nightly-ci:
# Switch to ubuntu-latest once it defaults to a version of Ubuntu that
# provides at least Python 3.11 (see
# https://docs.python.org/3/library/datetime.html#datetime.date.fromisoformat)
runs-on: ubuntu-24.04
env:
RAPIDS_GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Check if nightly CI is passing
uses: rapidsai/shared-actions/check_nightly_success/dispatch@main
with:
repo: cugraph
# telemetry-setup:
# runs-on: ubuntu-latest
# continue-on-error: true
# env:
# OTEL_SERVICE_NAME: "pr-cugraph"
# steps:
# - name: Telemetry setup
# if: ${{ vars.TELEMETRY_ENABLED == 'true' }}
# uses: rapidsai/shared-actions/telemetry-dispatch-stash-base-env-vars@main
# check-nightly-ci:
# # Switch to ubuntu-latest once it defaults to a version of Ubuntu that
# # provides at least Python 3.11 (see
# # https://docs.python.org/3/library/datetime.html#datetime.date.fromisoformat)
# runs-on: ubuntu-24.04
# env:
# RAPIDS_GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# steps:
# - name: Check if nightly CI is passing
# uses: rapidsai/shared-actions/check_nightly_success/dispatch@main
# with:
# repo: cugraph
changed-files:
secrets: inherit
needs: telemetry-setup
# needs: telemetry-setup
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
with:
files_yaml: |
Expand Down Expand Up @@ -88,7 +89,7 @@ jobs:
- '!notebooks/**'
checks:
secrets: inherit
needs: telemetry-setup
# needs: telemetry-setup
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
with:
enable_check_generated_files: false
Expand Down Expand Up @@ -128,35 +129,43 @@ jobs:
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python
with:
build_type: pull-request
conda-notebook-tests:
needs: [conda-python-build, changed-files]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_notebooks
with:
build_type: pull-request
node_type: "gpu-v100-latest-1"
arch: "amd64"
container_image: "rapidsai/ci-conda:cuda11.8.0-ubuntu22.04-py3.10"
run_script: "ci/test_notebooks.sh"
docs-build:
needs: conda-python-build
# conda-notebook-tests:
# needs: [conda-python-build, changed-files]
# secrets: inherit
# uses: rapidsai/shared-workflows/.github/workflows/[email protected]
# if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_notebooks
# with:
# build_type: pull-request
# node_type: "gpu-v100-latest-1"
# arch: "amd64"
# container_image: "rapidsai/ci-conda:cuda11.8.0-ubuntu22.04-py3.10"
# run_script: "ci/test_notebooks.sh"
# docs-build:
# needs: conda-python-build
# secrets: inherit
# uses: rapidsai/shared-workflows/.github/workflows/[email protected]
# with:
# build_type: pull-request
# node_type: "gpu-v100-latest-1"
# arch: "amd64"
# container_image: "rapidsai/ci-conda:cuda11.8.0-ubuntu22.04-py3.10"
# run_script: "ci/build_docs.sh"
wheel-build-libcugraph:
# needs: checks
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/custom-job[email protected]
uses: rapidsai/shared-workflows/.github/workflows/wheels-build[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
node_type: "gpu-v100-latest-1"
arch: "amd64"
container_image: "rapidsai/ci-conda:cuda11.8.0-ubuntu22.04-py3.10"
run_script: "ci/build_docs.sh"
script: ci/build_wheel_libcugraph.sh
wheel-build-pylibcugraph:
needs: checks
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
Expand All @@ -176,28 +185,30 @@ jobs:
needs: [wheel-build-cugraph, changed-files]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python
# if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python
with:
build_type: pull-request
script: ci/test_wheel_cugraph.sh
devcontainer:
secrets: inherit
needs: telemetry-setup
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
with:
arch: '["amd64"]'
cuda: '["12.5"]'
node_type: cpu32
build_command: |
sccache -z;
build-all --verbose -j$(nproc --ignore=1) -DBUILD_CUGRAPH_MG_TESTS=ON;
sccache -s;
telemetry-summarize:
# This job must use a self-hosted runner to record telemetry traces.
runs-on: linux-amd64-cpu4
needs: pr-builder
if: ${{ vars.TELEMETRY_ENABLED == 'true' && !cancelled() }}
continue-on-error: true
steps:
- name: Telemetry summarize
uses: rapidsai/shared-actions/telemetry-dispatch-summarize@main
# This selects "ARCH=amd64 + the latest supported Python + CUDA".
matrix_filter: map(select(.ARCH == "amd64")) | max_by([(.PY_VER|split(".")|map(tonumber)), (.CUDA_VER|split(".")|map(tonumber))]) | [.]
# devcontainer:
# secrets: inherit
# # needs: telemetry-setup
# uses: rapidsai/shared-workflows/.github/workflows/[email protected]
# with:
# arch: '["amd64"]'
# cuda: '["12.5"]'
# node_type: cpu32
# build_command: |
# sccache -z;
# build-all --verbose -j$(nproc --ignore=1) -DBUILD_CUGRAPH_MG_TESTS=ON;
# sccache -s;
# telemetry-summarize:
# # This job must use a self-hosted runner to record telemetry traces.
# runs-on: linux-amd64-cpu4
# needs: pr-builder
# if: ${{ vars.TELEMETRY_ENABLED == 'true' && !cancelled() }}
# continue-on-error: true
# steps:
# - name: Telemetry summarize
# uses: rapidsai/shared-actions/telemetry-dispatch-summarize@main
7 changes: 1 addition & 6 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

# Copyright (c) 2019-2024, NVIDIA CORPORATION.
# Copyright (c) 2019-2025, NVIDIA CORPORATION.

# cugraph build script

Expand Down Expand Up @@ -175,11 +175,6 @@ SKBUILD_EXTRA_CMAKE_ARGS="${EXTRA_CMAKE_ARGS}"
# Replace spaces with semicolons in SKBUILD_EXTRA_CMAKE_ARGS
SKBUILD_EXTRA_CMAKE_ARGS=$(echo ${SKBUILD_EXTRA_CMAKE_ARGS} | sed 's/ /;/g')

# Append `-DFIND_CUGRAPH_CPP=ON` to EXTRA_CMAKE_ARGS unless a user specified the option.
if [[ "${EXTRA_CMAKE_ARGS}" != *"DFIND_CUGRAPH_CPP"* ]]; then
SKBUILD_EXTRA_CMAKE_ARGS="${SKBUILD_EXTRA_CMAKE_ARGS};-DFIND_CUGRAPH_CPP=ON"
fi

# If clean or uninstall targets given, run them prior to any other steps
if hasArg uninstall; then
if [[ "$INSTALL_PREFIX" != "" ]]; then
Expand Down
5 changes: 4 additions & 1 deletion ci/build_cpp.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright (c) 2022-2024, NVIDIA CORPORATION.
# Copyright (c) 2022-2025, NVIDIA CORPORATION.

set -euo pipefail

Expand All @@ -9,6 +9,9 @@ source rapids-configure-sccache

source rapids-date-string

# TODO(jameslamb): remove this when https://github.com/rapidsai/raft/pull/2531 is merged
source ci/use_conda_packages_from_prs.sh

export CMAKE_GENERATOR=Ninja

rapids-print-env
Expand Down
5 changes: 4 additions & 1 deletion ci/build_docs.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright (c) 2023-2024, NVIDIA CORPORATION.
# Copyright (c) 2023-2025, NVIDIA CORPORATION.

set -euo pipefail

Expand All @@ -10,6 +10,9 @@ export RAPIDS_VERSION="$(rapids-version)"
export RAPIDS_VERSION_MAJOR_MINOR="$(rapids-version-major-minor)"
export RAPIDS_VERSION_NUMBER="$RAPIDS_VERSION_MAJOR_MINOR"

# TODO(jameslamb): remove this when https://github.com/rapidsai/raft/pull/2531 is merged
source ci/use_conda_packages_from_prs.sh

rapids-dependency-file-generator \
--output conda \
--file-key docs \
Expand Down
5 changes: 4 additions & 1 deletion ci/build_python.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright (c) 2022-2024, NVIDIA CORPORATION.
# Copyright (c) 2022-2025, NVIDIA CORPORATION.

set -euo pipefail

Expand All @@ -9,6 +9,9 @@ source rapids-configure-sccache

source rapids-date-string

# TODO(jameslamb): remove this when https://github.com/rapidsai/raft/pull/2531 is merged
source ci/use_conda_packages_from_prs.sh

export CMAKE_GENERATOR=Ninja

rapids-print-env
Expand Down
31 changes: 25 additions & 6 deletions ci/build_wheel.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#!/bin/bash
# Copyright (c) 2023-2024, NVIDIA CORPORATION.
# Copyright (c) 2023-2025, NVIDIA CORPORATION.

set -euo pipefail

package_name=$1
package_dir=$2
package_type=$3

source rapids-configure-sccache
source rapids-date-string
Expand All @@ -29,9 +30,15 @@ python -m pip wheel \

sccache --show-adv-stats

# TODO(jameslamb): move all the auditwheel stuff into individual build_wheel_{project}.sh like cudf does?

EXCLUDE_ARGS=(
--exclude "libraft.so"
)

case "${RAPIDS_CUDA_VERSION}" in
12.*)
EXCLUDE_ARGS=(
EXCLUDE_ARGS+=(
--exclude "libcublas.so.12"
--exclude "libcublasLt.so.12"
--exclude "libcurand.so.10"
Expand All @@ -40,11 +47,23 @@ case "${RAPIDS_CUDA_VERSION}" in
--exclude "libnvJitLink.so.12"
)
;;
11.*)
EXCLUDE_ARGS=()
;;
esac

case "${package_dir}" in
python/pylibcugraph)
EXCLUDE_ARGS+=(
--exclude "libcugraph_c.so"
--exclude "libcugraph.so"
)
;;
python/cugraph)
EXCLUDE_ARGS+=(
--exclude "libcugraph_c.so"
--exclude "libcugraph.so"
)
;;
esac

mkdir -p final_dist
python -m auditwheel repair -w final_dist "${EXCLUDE_ARGS[@]}" dist/*
RAPIDS_PY_WHEEL_NAME="${package_name}_${RAPIDS_PY_CUDA_SUFFIX}" rapids-upload-wheels-to-s3 python final_dist
RAPIDS_PY_WHEEL_NAME="${package_name}_${RAPIDS_PY_CUDA_SUFFIX}" rapids-upload-wheels-to-s3 "${package_type}" final_dist
Loading
Loading