Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
81b24de
Stub out libwholegraph python library
gforsyth Mar 7, 2025
9190163
feat(dependencies): add entries for libwholegraph
gforsyth Mar 10, 2025
03585fe
feat(cmake): cargo-cult cmakelists for libwholegraph
gforsyth Mar 10, 2025
8871971
fix: make VERSION a symlink
gforsyth Apr 3, 2025
162eb88
fix(libwholegraph): add dynamic version resolution
gforsyth Apr 3, 2025
1a0f140
add nccl wheel conditional
gforsyth Apr 3, 2025
263d94d
refactor(wheel): add libraft and librmm to build dependencies
gforsyth Apr 3, 2025
330a8b2
fix(libwholegraph): CMakeLists.txt tweaks to build
gforsyth Apr 9, 2025
beb461a
fix(build_wheel): exclude librapids_logger.so
gforsyth Apr 9, 2025
d97dd75
chore(libwholegraph): add rapids_logger as runtime dependency
gforsyth Apr 9, 2025
0d3af50
fix(libwholegraph): update rapids_config.cmake location
gforsyth Apr 16, 2025
98da9cb
chore(libwholegraph): cleanup CMakeLists.txt
gforsyth Apr 16, 2025
9319112
refactor(pylibwholegraph): add dependency on libwholegraph
gforsyth Apr 16, 2025
081a3ac
ci: add job to build `libwholegraph` wheel
gforsyth Apr 16, 2025
df2714b
ci: add the libwholegraph wheel script
gforsyth Apr 16, 2025
a70942a
chore: temporarily stop conda CI jobs
gforsyth Apr 16, 2025
b23b057
chore: disable devcontainer build
gforsyth Apr 16, 2025
7ea78de
ci: add matrix filter for libwholegraph wheel build
gforsyth Apr 16, 2025
eed6b84
refactor(wholegraph): shared library, not static
gforsyth Apr 17, 2025
8c4c964
refactor(pylibwholegraph): pull down libwholegraph wheel before build
gforsyth Apr 17, 2025
46ecd6e
ci(build_wheel): use standalone build script for libwholegraph wheel
gforsyth Apr 17, 2025
010cf2c
comment out wheel validation
gforsyth Apr 17, 2025
9d5433b
chore: use download wheels from s3
gforsyth Apr 17, 2025
d3a5be5
chore: set -x to debug pylibwholegraph
gforsyth Apr 18, 2025
5f27462
refactor(pylibwholegraph): cuda_suffixed=true
gforsyth Apr 18, 2025
1355993
refactor(pylibwholegraph): add find_package
gforsyth Apr 18, 2025
45b21cd
refactor(pylibwholegraph): include raft and rmm in build deps
gforsyth Apr 18, 2025
74edba3
refactor(build_wheel): add extra excludes, handle cpp wheels, too
gforsyth Apr 18, 2025
677cc98
refactor: use build_wheel for libwholegraph
gforsyth Apr 18, 2025
c1b1b22
test: add libwholegraph wheels to wheel test envs
gforsyth Apr 18, 2025
54855da
fix(libwholegraph): load raft and rapids_logger before libwholegraph
gforsyth Apr 18, 2025
a97a57f
fix(libwholegraph): add runtime dependency on libraft
gforsyth Apr 18, 2025
1e78f62
fix(pylibwholegraph): try to load symbols from libwholegraph wheel at…
gforsyth Apr 18, 2025
72977aa
chore: bump dependencies to 25.6
gforsyth Apr 18, 2025
e3adc2b
Merge branch 'branch-25.06' into wholegraph_wheel
gforsyth Apr 21, 2025
2116def
Revert "chore: temporarily stop conda CI jobs"
gforsyth Apr 21, 2025
4626c40
Revert "chore: disable devcontainer build"
gforsyth Apr 21, 2025
b440dd2
chore: apply suggestions from review
gforsyth Apr 21, 2025
d8c1940
Revert "refactor(wholegraph): shared library, not static"
gforsyth Apr 21, 2025
c14900f
refactor: set `BUILD_SHARED_LIBS=ON` instead of changes to cpp/CMakeL…
gforsyth Apr 21, 2025
29a7b15
fix(pylibwholegraph): add libwholegraph as runtime dependency
gforsyth Apr 21, 2025
cd1d7e0
chore: fix formatting
gforsyth Apr 21, 2025
a2437b1
fix: set package type to `cpp`
gforsyth Apr 21, 2025
e0d22c4
refactor(build_wheel): take package type as argument
gforsyth Apr 21, 2025
bee0e10
chore: remove bash debugging
gforsyth Apr 21, 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
11 changes: 11 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,18 @@ jobs:
date: ${{ inputs.date }}
package-name: cugraph-pyg
package-type: python
wheel-build-libwholegraph:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-25.06
with:
build_type: pull-request
script: ci/build_wheel_libwholegraph.sh
package-type: cpp
wheel-name: libwholegraph
# 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-pylibwholegraph:
needs: wheel-build-libwholegraph
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-25.06
with:
Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
- conda-python-tests
- docs-build
- conda-notebook-tests
- wheel-build-libwholegraph
- wheel-build-pylibwholegraph
- wheel-tests-pylibwholegraph
- wheel-build-cugraph-dgl
Expand Down Expand Up @@ -136,10 +137,21 @@ jobs:
build_type: pull-request
container_image: "rapidsai/ci-conda:latest"
run_script: "ci/build_docs.sh"
wheel-build-pylibwholegraph:
wheel-build-libwholegraph:
needs: checks
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-25.06
with:
build_type: pull-request
script: ci/build_wheel_libwholegraph.sh
package-type: cpp
wheel-name: libwholegraph
# 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-pylibwholegraph:
needs: [checks, wheel-build-libwholegraph]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-25.06
with:
build_type: pull-request
script: ci/build_wheel_pylibwholegraph.sh
Expand Down
27 changes: 14 additions & 13 deletions ci/build_wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,31 @@ set -euo pipefail

package_name=$1
package_dir=$2
underscore_package_name=$(echo "${package_name}" | tr "-" "_")
package_type=$3

# The set of shared libraries that should be packaged differs by project.
#
# Capturing that here in argument-parsing to allow this build_wheel.sh
# script to be re-used by all wheel builds in the project.
case "${package_dir}" in
python/pylibwholegraph)
EXCLUDE_ARGS=(
--exclude libcuda.so.1
--exclude libnvidia-ml.so.1
#
EXCLUDE_ARGS=(
--exclude libcuda.so.1
--exclude libnvidia-ml.so.1
--exclude librapids_logger.so
)

if [[ "${package_name}" != "libwholegraph" ]]; then
EXCLUDE_ARGS+=(
--exclude libwholegraph.so
)
;;
*)
EXCLUDE_ARGS=()
;;
esac
fi

source rapids-configure-sccache
source rapids-date-string

rapids-generate-version > ./VERSION

RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})"
RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen "${RAPIDS_CUDA_VERSION}")"

cd "${package_dir}"

Expand Down Expand Up @@ -56,5 +57,5 @@ else
-w "${RAPIDS_WHEEL_BLD_OUTPUT_DIR}" \
dist/*

RAPIDS_PY_WHEEL_NAME="${package_name}_${RAPIDS_PY_CUDA_SUFFIX}" rapids-upload-wheels-to-s3 python "${RAPIDS_WHEEL_BLD_OUTPUT_DIR}"
RAPIDS_PY_WHEEL_NAME="${package_name}_${RAPIDS_PY_CUDA_SUFFIX}" rapids-upload-wheels-to-s3 "${package_type}" "${RAPIDS_WHEEL_BLD_OUTPUT_DIR}"
fi
2 changes: 1 addition & 1 deletion ci/build_wheel_cugraph-dgl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ set -euo pipefail

package_dir="python/cugraph-dgl"

./ci/build_wheel.sh cugraph-dgl ${package_dir}
./ci/build_wheel.sh cugraph-dgl ${package_dir} python
./ci/validate_wheel.sh ${package_dir} "${RAPIDS_WHEEL_BLD_OUTPUT_DIR}"
2 changes: 1 addition & 1 deletion ci/build_wheel_cugraph-pyg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ set -euo pipefail

package_dir="python/cugraph-pyg"

./ci/build_wheel.sh cugraph-pyg ${package_dir}
./ci/build_wheel.sh cugraph-pyg ${package_dir} python
./ci/validate_wheel.sh ${package_dir} "${RAPIDS_WHEEL_BLD_OUTPUT_DIR}"
11 changes: 11 additions & 0 deletions ci/build_wheel_libwholegraph.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
# Copyright (c) 2024-2025, NVIDIA CORPORATION.

set -euo pipefail

package_dir="python/libwholegraph"

export SKBUILD_CMAKE_ARGS="-DBUILD_SHARED_LIBS=ON;-DCMAKE_MESSAGE_LOG_LEVEL=VERBOSE;-DCUDA_STATIC_RUNTIME=ON"

./ci/build_wheel.sh libwholegraph ${package_dir} cpp
./ci/validate_wheel.sh ${package_dir} "${RAPIDS_WHEEL_BLD_OUTPUT_DIR}"
15 changes: 13 additions & 2 deletions ci/build_wheel_pylibwholegraph.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,18 @@ set -euo pipefail

package_dir="python/pylibwholegraph"

export SKBUILD_CMAKE_ARGS="-DBUILD_SHARED_LIBS=OFF;-DCMAKE_MESSAGE_LOG_LEVEL=VERBOSE;-DCUDA_STATIC_RUNTIME=ON;-DWHOLEGRAPH_BUILD_WHEELS=ON"
RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen "${RAPIDS_CUDA_VERSION}")"

./ci/build_wheel.sh pylibwholegraph ${package_dir}
# Download the libcugraph wheel built in the previous step and make it
# available for pip to find.
RAPIDS_PY_WHEEL_NAME="libwholegraph_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 cpp /tmp/libwholegraph_dist
echo "libwholegraph-${RAPIDS_PY_CUDA_SUFFIX} @ file://$(echo /tmp/libwholegraph_dist/libwholegraph_*.whl)" > /tmp/constraints.txt

# Using env variable PIP_CONSTRAINT is necessary to ensure the constraints
# are used when creating the isolated build environment.
export PIP_CONSTRAINT="/tmp/constraints.txt"

export SKBUILD_CMAKE_ARGS="-DBUILD_SHARED_LIBS=ON;-DCMAKE_MESSAGE_LOG_LEVEL=VERBOSE;-DCUDA_STATIC_RUNTIME=ON;-DWHOLEGRAPH_BUILD_WHEELS=ON"

./ci/build_wheel.sh pylibwholegraph ${package_dir} python
./ci/validate_wheel.sh ${package_dir} "${RAPIDS_WHEEL_BLD_OUTPUT_DIR}"
4 changes: 3 additions & 1 deletion ci/test_wheel_cugraph-dgl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ package_name="cugraph-dgl"
mkdir -p ./dist
RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})"

# Download the pylibwholegraph and cugraph-dgl built in the previous step
# Download the libwholegraph, pylibwholegraph, and cugraph-dgl built in the previous step
RAPIDS_PY_WHEEL_NAME="libwholegraph_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 cpp ./local-libwholegraph-dep
RAPIDS_PY_WHEEL_NAME="pylibwholegraph_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 python ./local-deps
RAPIDS_PY_WHEEL_NAME="${package_name}_${RAPIDS_PY_CUDA_SUFFIX}" RAPIDS_PY_WHEEL_PURE="1" rapids-download-wheels-from-s3 python ./dist

Expand All @@ -28,6 +29,7 @@ rapids-pip-retry install \
-v \
--extra-index-url "${PYTORCH_URL}" \
--find-links "${DGL_URL}" \
./local-libwholegraph-dep/*.whl \
"$(echo ./local-deps/pylibwholegraph_${RAPIDS_PY_CUDA_SUFFIX}*.whl)" \
"$(echo ./dist/cugraph_dgl_${RAPIDS_PY_CUDA_SUFFIX}*.whl)[test]" \
'dgl==2.4.0' \
Expand Down
4 changes: 3 additions & 1 deletion ci/test_wheel_cugraph-pyg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ package_name="cugraph-pyg"
mkdir -p ./dist
RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})"

# Download the pylibwholegraph and cugraph-pyg built in the previous step
# Download the libwholegraph, pylibwholegraph, and cugraph-pyg built in the previous step
RAPIDS_PY_WHEEL_NAME="libwholegraph_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 cpp ./local-libwholegraph-dep
RAPIDS_PY_WHEEL_NAME="pylibwholegraph_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 python ./local-deps
RAPIDS_PY_WHEEL_NAME="${package_name}_${RAPIDS_PY_CUDA_SUFFIX}" RAPIDS_PY_WHEEL_PURE="1" rapids-download-wheels-from-s3 python ./dist

# echo to expand wildcard before adding `[extra]` requires for pip
rapids-pip-retry install \
-v \
./local-libwholegraph-dep/*.whl \
"$(echo ./local-deps/pylibwholegraph_${RAPIDS_PY_CUDA_SUFFIX}*.whl)" \
"$(echo ./dist/cugraph_pyg_${RAPIDS_PY_CUDA_SUFFIX}*.whl)[test]"

Expand Down
2 changes: 2 additions & 0 deletions ci/test_wheel_pylibwholegraph.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ set -E # ERR traps are inherited by subcommands

mkdir -p ./dist
RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})"
RAPIDS_PY_WHEEL_NAME="libwholegraph_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 cpp ./local-libwholegraph-dep
RAPIDS_PY_WHEEL_NAME="pylibwholegraph_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 python ./dist

# determine pytorch source
Expand All @@ -26,6 +27,7 @@ rapids-logger "Installing Packages"
rapids-pip-retry install \
--extra-index-url ${INDEX_URL} \
"$(echo ./dist/pylibwholegraph*.whl)[test]" \
./local-libwholegraph-dep/*.whl \
'torch>=2.3'

rapids-logger "pytest pylibwholegraph"
Expand Down
121 changes: 120 additions & 1 deletion dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,42 @@ files:
- depends_on_pylibwholegraph
- test_python_pylibwholegraph

py_build_libwholegraph:
output: pyproject
pyproject_dir: python/libwholegraph
extras:
table: build-system
includes:
- rapids_build_skbuild

py_rapids_build_libwholegraph:
output: pyproject
pyproject_dir: python/libwholegraph
extras:
table: tool.rapids-build-backend
key: requires
includes:
- common_build
- depends_on_libraft
- depends_on_librmm

py_run_libwholegraph:
output: pyproject
pyproject_dir: python/libwholegraph
extras:
table: project
includes:
- depends_on_rapids_logger
- depends_on_libraft

py_build_pylibwholegraph:
output: pyproject
pyproject_dir: python/pylibwholegraph
extras:
table: build-system
includes:
- rapids_build_skbuild

py_rapids_build_pylibwholegraph:
output: pyproject
pyproject_dir: python/pylibwholegraph
Expand All @@ -124,13 +153,18 @@ files:
includes:
- common_build
- python_build_cythonize
- depends_on_libwholegraph
- depends_on_libraft
- depends_on_librmm

py_run_pylibwholegraph:
output: pyproject
pyproject_dir: python/pylibwholegraph
extras:
table: project
includes:
- python_run_pylibwholegraph
- depends_on_libwholegraph
py_test_pylibwholegraph:
output: pyproject
pyproject_dir: python/pylibwholegraph
Expand Down Expand Up @@ -367,6 +401,11 @@ dependencies:
- output_types: [conda, pyproject, requirements]
packages:
- cython>=3.0.0
python_run_libwholegraph:
common:
- output_types: [conda, pyproject, requirements]
packages:
- depends_on_rapids_logger
python_run_pylibwholegraph:
common:
- output_types: [conda, pyproject, requirements]
Expand Down Expand Up @@ -524,11 +563,91 @@ dependencies:
- pylibwholegraph-cu11==25.6.*,>=0.0.0a0
- {matrix: null, packages: [*pylibwholegraph_unsuffixed]}

depends_on_libraft:
common:
- output_types: conda
packages:
- &libraft_unsuffixed libraft==25.6.*,>=0.0.0a0
- output_types: requirements
packages:
# pip recognizes the index as a global option for the requirements.txt file
- --extra-index-url=https://pypi.nvidia.com
- --extra-index-url=https://pypi.anaconda.org/rapidsai-wheels-nightly/simple
specific:
- output_types: [requirements, pyproject]
matrices:
- matrix:
cuda: "12.*"
cuda_suffixed: "true"
packages:
- libraft-cu12==25.6.*,>=0.0.0a0
- matrix:
cuda: "11.*"
cuda_suffixed: "true"
packages:
- libraft-cu11==25.6.*,>=0.0.0a0
- {matrix: null, packages: [*libraft_unsuffixed]}

depends_on_librmm:
common:
- output_types: conda
packages:
- librmm==25.6.*,>=0.0.0a0
- &librmm_unsuffixed librmm==25.6.*,>=0.0.0a0
- output_types: requirements
packages:
# pip recognizes the index as a global option for the requirements.txt file
- --extra-index-url=https://pypi.nvidia.com
- --extra-index-url=https://pypi.anaconda.org/rapidsai-wheels-nightly/simple
specific:
- output_types: [requirements, pyproject]
matrices:
- matrix:
cuda: "12.*"
cuda_suffixed: "true"
packages:
- librmm-cu12==25.6.*,>=0.0.0a0
- matrix:
cuda: "11.*"
cuda_suffixed: "true"
packages:
- librmm-cu11==25.6.*,>=0.0.0a0
- {matrix: null, packages: [*librmm_unsuffixed]}

depends_on_rapids_logger:
common:
- output_types: [conda, requirements, pyproject]
packages:
- rapids-logger==0.1.*,>=0.0.0a0
- output_types: requirements
packages:
# pip recognizes the index as a global option for the requirements.txt file
- --extra-index-url=https://pypi.anaconda.org/rapidsai-wheels-nightly/simple

depends_on_libwholegraph:
common:
- output_types: conda
packages:
- libwholegraph==25.6.*,>=0.0.0a0
- &libwholegraph_unsuffixed libwholegraph==25.6.*,>=0.0.0a0
- output_types: requirements
packages:
# pip recognizes the index as a global option for the requirements.txt file
- --extra-index-url=https://pypi.nvidia.com
- --extra-index-url=https://pypi.anaconda.org/rapidsai-wheels-nightly/simple
specific:
- output_types: [requirements, pyproject]
matrices:
- matrix:
cuda: "12.*"
cuda_suffixed: "true"
packages:
- libwholegraph-cu12==25.6.*,>=0.0.0a0
- matrix:
cuda: "11.*"
cuda_suffixed: "true"
packages:
- libwholegraph-cu11==25.6.*,>=0.0.0a0
- {matrix: null, packages: [*libwholegraph_unsuffixed]}

depends_on_libwholegraph_tests:
common:
Expand Down
Loading