Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

Commit

Permalink
Merge branch 'branch-24.12' into py/create_block_optim
Browse files Browse the repository at this point in the history
  • Loading branch information
BradReesWork authored Nov 21, 2024
2 parents bd0344d + 0c0583d commit e5b9c57
Show file tree
Hide file tree
Showing 45 changed files with 1,617 additions and 108 deletions.
39 changes: 3 additions & 36 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ concurrency:
jobs:
cpp-build:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@branch-24.12
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand All @@ -38,52 +38,19 @@ jobs:
python-build:
needs: [cpp-build]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-24.12
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
date: ${{ inputs.date }}
sha: ${{ inputs.sha }}
script: ci/build_python.sh
docs-build:
if: github.ref_type == 'branch'
needs: [python-build]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
with:
arch: "amd64"
branch: ${{ inputs.branch }}
build_type: ${{ inputs.build_type || 'branch' }}
container_image: "rapidsai/ci-conda:latest"
date: ${{ inputs.date }}
node_type: "gpu-v100-latest-1"
run_script: "ci/build_docs.sh"
sha: ${{ inputs.sha }}
upload-conda:
needs: [cpp-build, python-build]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
date: ${{ inputs.date }}
sha: ${{ inputs.sha }}
wheel-build-pylibwholegraph:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-24.12
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
sha: ${{ inputs.sha }}
date: ${{ inputs.date }}
script: ci/build_wheel.sh
wheel-publish-pylibwholegraph:
needs: wheel-build-pylibwholegraph
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: pylibwholegraph
47 changes: 35 additions & 12 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ concurrency:
jobs:
pr-builder:
needs:
- changed-files
- checks
- conda-cpp-build
- conda-cpp-tests
Expand All @@ -21,41 +22,62 @@ jobs:
- wheel-build-pylibwholegraph
- wheel-test-pylibwholegraph
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
if: always()
with:
needs: ${{ toJSON(needs) }}
changed-files:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
with:
files_yaml: |
test_cpp:
- '**'
- '!.pre-commit-config.yaml'
- '!README.md'
- '!python/**'
- '!scripts/checks/**'
test_python:
- '**'
- '!.pre-commit-config.yaml'
- '!README.md'
- '!scripts/checks/**'
checks:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/checks.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/checks.yaml@branch-24.12
with:
enable_check_generated_files: false
conda-cpp-build:
needs: checks
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@branch-24.12
with:
build_type: pull-request
node_type: cpu16
conda-cpp-tests:
needs: conda-cpp-build
needs: [conda-cpp-build, changed-files]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_cpp
with:
build_type: pull-request
conda-python-build:
needs: conda-cpp-build
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-24.12
with:
build_type: pull-request
conda-python-tests:
needs: conda-python-build
needs: [conda-python-build, changed-files]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python
with:
build_type: pull-request
docs-build:
needs: conda-python-build
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-24.12
with:
build_type: pull-request
arch: "amd64"
Expand All @@ -64,14 +86,15 @@ jobs:
wheel-build-pylibwholegraph:
needs: checks
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-24.12
with:
build_type: pull-request
script: ci/build_wheel.sh
wheel-test-pylibwholegraph:
needs: wheel-build-pylibwholegraph
needs: [wheel-build-pylibwholegraph, changed-files]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python
with:
build_type: pull-request
script: ci/test_wheel.sh
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,23 @@ on:
jobs:
conda-cpp-tests:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@branch-24.12
with:
build_type: nightly
branch: ${{ inputs.branch }}
date: ${{ inputs.date }}
sha: ${{ inputs.sha }}
conda-pytorch-tests:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-24.12
with:
build_type: nightly
branch: ${{ inputs.branch }}
date: ${{ inputs.date }}
sha: ${{ inputs.sha }}
wheel-tests-pylibwholegraph:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-24.12
with:
build_type: nightly
branch: ${{ inputs.branch }}
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ repos:
[.]flake8[.]cython$
- id: verify-alpha-spec
- repo: https://github.com/rapidsai/dependency-file-generator
rev: v1.13.11
rev: v1.16.0
hooks:
- id: rapids-dependency-file-generator
args: ["--clean"]
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
24.10.00
24.12.00
6 changes: 5 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-2023, NVIDIA CORPORATION.
# Copyright (c) 2022-2024, NVIDIA CORPORATION.

set -euo pipefail

Expand All @@ -17,6 +17,10 @@ version=$(rapids-generate-version)

rapids-logger "Begin cpp build"

sccache --zero-stats

RAPIDS_PACKAGE_VERSION=${version} rapids-conda-retry mambabuild conda/recipes/libwholegraph

sccache --show-adv-stats

rapids-upload-conda-to-s3 cpp
7 changes: 4 additions & 3 deletions ci/build_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ set -euo pipefail
rapids-logger "Create test conda environment"
. /opt/conda/etc/profile.d/conda.sh

RAPIDS_VERSION="$(rapids-version)"

rapids-dependency-file-generator \
--output conda \
--file-key docs \
Expand All @@ -22,12 +24,11 @@ rapids-print-env
rapids-logger "Downloading artifacts from previous jobs"

CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp)
export RAPIDS_VERSION_NUMBER="24.10"
export RAPIDS_DOCS_DIR="$(mktemp -d)"

rapids-mamba-retry install \
--channel "${CPP_CHANNEL}" \
libwholegraph
"libwholegraph=${RAPIDS_VERSION}"

rapids-logger "Build Doxygen docs"
pushd cpp
Expand All @@ -38,4 +39,4 @@ popd

rapids-logger "Output temp dir: ${RAPIDS_DOCS_DIR}"

rapids-upload-docs
RAPIDS_VERSION_NUMBER="$(rapids-version-major-minor)" rapids-upload-docs
6 changes: 4 additions & 2 deletions ci/build_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ export CMAKE_GENERATOR=Ninja

rapids-print-env

PACKAGES="libwholegraph"

CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp)

rapids-generate-version > ./VERSION

rapids-logger "Begin py build"

sccache --zero-stats

# TODO: Remove `--no-test` flags once importing on a CPU
# node works correctly
rapids-logger "Begin pylibwholegraph build"
Expand All @@ -29,4 +29,6 @@ RAPIDS_PACKAGE_VERSION=$(head -1 ./VERSION) rapids-conda-retry mambabuild \
--channel "${CPP_CHANNEL}" \
conda/recipes/pylibwholegraph

sccache --show-adv-stats

rapids-upload-conda-to-s3 python
9 changes: 6 additions & 3 deletions ci/build_wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,17 @@ RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})"

cd "${package_dir}"

# Hardcode the output dir
sccache --zero-stats

SKBUILD_CMAKE_ARGS="-DDETECT_CONDA_ENV=OFF;-DBUILD_SHARED_LIBS=OFF;-DCMAKE_MESSAGE_LOG_LEVEL=VERBOSE;-DCUDA_STATIC_RUNTIME=ON;-DWHOLEGRAPH_BUILD_WHEELS=ON" \
python -m pip wheel . -w dist -vvv --no-deps --disable-pip-version-check
python -m pip wheel . -w dist -v --no-deps --disable-pip-version-check

sccache --show-adv-stats

mkdir -p final_dist
python -m auditwheel repair \
--exclude libcuda.so.1 \
--exclude libnvidia-ml.so.1 \
-w final_dist dist/*

RAPIDS_PY_WHEEL_NAME="${package_name}_${RAPIDS_PY_CUDA_SUFFIX}" rapids-upload-wheels-to-s3 final_dist
RAPIDS_PY_WHEEL_NAME="${package_name}_${RAPIDS_PY_CUDA_SUFFIX}" rapids-upload-wheels-to-s3 python final_dist
1 change: 0 additions & 1 deletion ci/release/update-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,3 @@ for FILE in .github/workflows/*.yaml; do
sed_runner "/shared-workflows/ s/@.*/@branch-${NEXT_SHORT_TAG}/g" "${FILE}"

done
sed_runner "s/RAPIDS_VERSION_NUMBER=\".*/RAPIDS_VERSION_NUMBER=\"${NEXT_SHORT_TAG}\"/g" ci/build_docs.sh
7 changes: 4 additions & 3 deletions ci/test_cpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ cd "$(dirname "$(realpath "${BASH_SOURCE[0]}")")"/../

. /opt/conda/etc/profile.d/conda.sh

RAPIDS_VERSION="$(rapids-version)"

rapids-logger "Generate C++ testing dependencies"
rapids-dependency-file-generator \
--output conda \
Expand All @@ -27,11 +29,10 @@ mkdir -p "${RAPIDS_TESTS_DIR}"

rapids-print-env

PACKAGES="libwholegraph libwholegraph-tests"

rapids-mamba-retry install \
--channel "${CPP_CHANNEL}" \
"${PACKAGES}"
"libwholegraph=${RAPIDS_VERSION}" \
"libwholegraph-tests=${RAPIDS_VERSION}"

rapids-logger "Check GPU usage"
nvidia-smi
Expand Down
6 changes: 3 additions & 3 deletions ci/test_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ cd "$(dirname "$(realpath "${BASH_SOURCE[0]}")")"/../

. /opt/conda/etc/profile.d/conda.sh

RAPIDS_VERSION="$(rapids-version)"

ARCH=$(arch)
EXITCODE=0

Expand Down Expand Up @@ -44,13 +46,11 @@ mkdir -p "${RAPIDS_TESTS_DIR}" "${RAPIDS_COVERAGE_DIR}"

rapids-print-env

PACKAGES="pylibwholegraph"

rapids-mamba-retry install \
--channel "${CPP_CHANNEL}" \
--channel "${PYTHON_CHANNEL}" \
'mkl<2024.1.0' \
"${PACKAGES}"
"pylibwholegraph=${RAPIDS_VERSION}"

rapids-logger "Check GPU usage"
nvidia-smi
Expand Down
17 changes: 10 additions & 7 deletions ci/test_wheel.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright (c) 2023, NVIDIA CORPORATION.
# Copyright (c) 2023-2024, NVIDIA CORPORATION.

set -e # abort the script on error
set -o pipefail # piped commands propagate their error
Expand All @@ -9,23 +9,26 @@ mkdir -p ./dist
RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})"
RAPIDS_PY_WHEEL_NAME="pylibwholegraph_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 ./dist

# echo to expand wildcard before adding `[extra]` requires for pip
python -m pip install $(echo ./dist/pylibwholegraph*.whl)

# determine PyTorch source
PKG_CUDA_VER="$(echo ${CUDA_VERSION} | cut -d '.' -f1,2 | tr -d '.')"
PKG_CUDA_VER_MAJOR=${PKG_CUDA_VER:0:2}
if [[ "${PKG_CUDA_VER_MAJOR}" == "12" ]]; then
INDEX_URL="https://download.pytorch.org/whl/cu121"
else
INDEX_URL="https://download.pytorch.org/whl/cu${PKG_CUDA_VER}"
fi

# echo to expand wildcard before adding `[extra]` requires for pip
python -m pip install \
-v \
--extra-index-url "${INDEX_URL}" \
"$(echo ./dist/pylibwholegraph_${RAPIDS_PY_CUDA_SUFFIX}*.whl)[test]" \
'torch>=2.0,<2.4.0a0'

RAPIDS_TESTS_DIR=${RAPIDS_TESTS_DIR:-"${PWD}/test-results"}
RAPIDS_COVERAGE_DIR=${RAPIDS_COVERAGE_DIR:-"${PWD}/coverage-results"}
mkdir -p "${RAPIDS_TESTS_DIR}" "${RAPIDS_COVERAGE_DIR}"

rapids-logger "Installing PyTorch"
rapids-retry python -m pip install --pre torch --index-url ${INDEX_URL}
rapids-retry python -m pip install pytest pytest-forked numpy
rapids-logger "pytest pylibwholegraph"
cd python/pylibwholegraph/pylibwholegraph/tests
python -m pytest \
Expand Down
Loading

0 comments on commit e5b9c57

Please sign in to comment.