diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index b438949a..3d66e9a6 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -85,7 +85,7 @@ jobs: branch: ${{ inputs.branch }} sha: ${{ inputs.sha }} date: ${{ inputs.date }} - node_type: cpu8 + node_type: cpu4 script: ci/build_wheel_cugraph-pyg.sh package-name: cugraph-pyg package-type: python diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index a124fd6e..14789b3b 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -201,7 +201,7 @@ jobs: # This selects "ARCH=amd64 + the latest supported Python + CUDA". matrix_filter: map(select(.ARCH == "amd64")) | group_by(.CUDA_VER|split(".")|map(tonumber)|.[0]) | map(max_by([(.PY_VER|split(".")|map(tonumber)), (.CUDA_VER|split(".")|map(tonumber))])) build_type: pull-request - node_type: cpu8 + node_type: cpu4 script: ci/build_wheel_cugraph-pyg.sh package-name: cugraph-pyg package-type: python diff --git a/ci/build_wheel.sh b/ci/build_wheel.sh index 6f0d78dd..48d72fe1 100755 --- a/ci/build_wheel.sh +++ b/ci/build_wheel.sh @@ -48,9 +48,17 @@ RAPIDS_PIP_WHEEL_ARGS=( -v --no-deps --disable-pip-version-check - --build-constraint="${PIP_CONSTRAINT}" ) +# Only use --build-constraint when build isolation is enabled. +# +# Passing '--build-constraint' and '--no-build-isolation` together results in an error from 'pip', +# but we want to keep environment variable PIP_CONSTRAINT set unconditionally. +# PIP_NO_BUILD_ISOLATION=0 means "add --no-build-isolation" (ref: https://github.com/pypa/pip/issues/5735) +if [[ "${PIP_NO_BUILD_ISOLATION:-}" != "0" ]]; then + RAPIDS_PIP_WHEEL_ARGS+=(--build-constraint="${PIP_CONSTRAINT}") +fi + # unset PIP_CONSTRAINT (set by rapids-init-pip)... it doesn't affect builds as of pip 25.3, and # results in an error from 'pip wheel' when set and --build-constraint is also passed unset PIP_CONSTRAINT diff --git a/ci/build_wheel_libwholegraph.sh b/ci/build_wheel_libwholegraph.sh index 5a027ebc..64e46f5b 100755 --- a/ci/build_wheel_libwholegraph.sh +++ b/ci/build_wheel_libwholegraph.sh @@ -1,5 +1,5 @@ #!/bin/bash -# SPDX-FileCopyrightText: Copyright (c) 2024-2025, NVIDIA CORPORATION. +# SPDX-FileCopyrightText: Copyright (c) 2024-2026, NVIDIA CORPORATION. # SPDX-License-Identifier: Apache-2.0 set -euo pipefail @@ -8,7 +8,29 @@ source rapids-init-pip package_dir="python/libwholegraph" +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_libwholegraph" \ + --file-key "py_rapids_build_libwholegraph" \ + --matrix "${matrix_selectors}" \ +| tee /tmp/requirements-build.txt + +rapids-logger "Installing build requirements" +rapids-pip-retry install \ + -v \ + --prefer-binary \ + -r /tmp/requirements-build.txt + +rapids-logger "Done installing build requirements" + export SKBUILD_CMAKE_ARGS="-DBUILD_SHARED_LIBS=ON;-DCMAKE_MESSAGE_LOG_LEVEL=VERBOSE" +# 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 + ./ci/build_wheel.sh libwholegraph ${package_dir} cpp ./ci/validate_wheel.sh ${package_dir} "${RAPIDS_WHEEL_BLD_OUTPUT_DIR}" diff --git a/dependencies.yaml b/dependencies.yaml index 369c7c87..860d2fe6 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -248,7 +248,7 @@ dependencies: - libcusparse-dev common_build: common: - - output_types: [conda, pyproject] + - output_types: [conda, pyproject, requirements] packages: - &cmake_ver cmake>=3.30.4 - ninja