Skip to content

Commit

Permalink
use RAPIDS_VERSION in CMake CPM scripts, other packaging changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jameslamb committed Jan 6, 2025
1 parent 04f0984 commit 4de4a1d
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 40 deletions.
12 changes: 4 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,16 @@ test-results
## Python build directories & artifacts
dask-worker-space/
htmlcov
*.conda
dist/
*.egg-info/
.egg-info/
python/build
python/cugraph/bindings/*.cpp
wheels/
wheelhouse/
_skbuild/
cufile.log

## pylibcugraph build directories & artifacts
python/pylibcugraph/pylibcugraph.egg-info
*.whl

## Patching
*.diff
Expand Down Expand Up @@ -89,10 +88,7 @@ docs/cugraph/lib*
docs/cugraph/api/*

# created by Dask tests
python/dask-worker-space
python/cugraph/dask-worker-space
python/cugraph/cugraph/dask-worker-space
python/cugraph/cugraph/tests/dask-worker-space
dask-worker-space/

# Sphinx docs & build artifacts
docs/cugraph/source/api_docs/api/*
Expand Down
11 changes: 1 addition & 10 deletions ci/test_wheel.sh
Original file line number Diff line number Diff line change
@@ -1,21 +1,12 @@
#!/bin/bash
# Copyright (c) 2023-2024, NVIDIA CORPORATION.
# Copyright (c) 2023-2025, NVIDIA CORPORATION.

set -eoxu pipefail

package_name=$1

python_package_name=$(echo ${package_name}|sed 's/-/_/g')

mkdir -p ./dist
RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})"

RAPIDS_PY_WHEEL_NAME="${package_name}_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 ./dist

# use 'ls' to expand wildcard before adding `[extra]` requires for pip
# pip creates wheels using python package names
python -m pip install $(ls ./dist/${python_package_name}*.whl)[test]

# Run smoke tests for aarch64 pull requests
arch=$(uname -m)
if [[ "${arch}" == "aarch64" && ${RAPIDS_BUILD_TYPE} == "pull-request" ]]; then
Expand Down
14 changes: 10 additions & 4 deletions ci/test_wheel_cugraph.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
#!/bin/bash
# Copyright (c) 2023-2024, NVIDIA CORPORATION.
# Copyright (c) 2023-2025, NVIDIA CORPORATION.

set -eoxu pipefail

# Download the pylibcugraph built in the previous step
# Download the packages built in the previous step
mkdir -p ./dist
RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})"
RAPIDS_PY_WHEEL_NAME="pylibcugraph_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 ./local-pylibcugraph-dep
python -m pip install --no-deps ./local-pylibcugraph-dep/pylibcugraph*.whl
RAPIDS_PY_WHEEL_NAME="cugraph_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 python ./dist
RAPIDS_PY_WHEEL_NAME="pylibcugraph_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 python ./local-pylibcugraph-dep

# echo to expand wildcard before adding `[extra]` requires for pip
python -m pip install \
"$(echo ./dist/cugraph*.whl)[test]" \
./local-pylibcugraph-dep/pylibcugraph*.whl

./ci/test_wheel.sh cugraph
11 changes: 10 additions & 1 deletion ci/test_wheel_pylibcugraph.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
#!/bin/bash
# Copyright (c) 2023-2024, NVIDIA CORPORATION.
# Copyright (c) 2023-2025, NVIDIA CORPORATION.

set -eoxu pipefail

# Download the packages built in the previous step
mkdir -p ./dist
RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})"
RAPIDS_PY_WHEEL_NAME="pylibcugraph_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 python ./dist

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

./ci/test_wheel.sh pylibcugraph
8 changes: 4 additions & 4 deletions cpp/cmake/thirdparty/get_raft.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#=============================================================================
# Copyright (c) 2022-2024, NVIDIA CORPORATION.
# Copyright (c) 2022-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.
Expand All @@ -14,8 +14,8 @@
# limitations under the License.
#=============================================================================

set(CUGRAPH_MIN_VERSION_raft "${CUGRAPH_VERSION_MAJOR}.${CUGRAPH_VERSION_MINOR}.00")
set(CUGRAPH_BRANCH_VERSION_raft "${CUGRAPH_VERSION_MAJOR}.${CUGRAPH_VERSION_MINOR}")
set(CUGRAPH_MIN_VERSION_raft "${RAPIDS_VERSION_MAJOR}.${RAPIDS_VERSION_MINOR}.00")
set(CUGRAPH_BRANCH_VERSION_raft "${RAPIDS_VERSION_MAJOR}.${RAPIDS_VERSION_MINOR}")

function(find_and_configure_raft)

Expand Down Expand Up @@ -51,7 +51,7 @@ function(find_and_configure_raft)
OPTIONS
"RAFT_COMPILE_LIBRARY ${PKG_COMPILE_RAFT_LIB}"
"BUILD_TESTS OFF"
"BUILD_BENCH OFF"
"BUILD_PRIMS_BENCH OFF"
"BUILD_CAGRA_HNSWLIB OFF"
)

Expand Down
15 changes: 8 additions & 7 deletions cpp/libcugraph_etl/cmake/thirdparty/get_cudf.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#=============================================================================
# Copyright (c) 2021, NVIDIA CORPORATION.
# Copyright (c) 2021-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.
Expand Down Expand Up @@ -27,20 +27,21 @@ function(find_and_configure_cudf)
GIT_REPOSITORY https://github.com/${PKG_FORK}/cudf.git
GIT_TAG ${PKG_PINNED_TAG}
SOURCE_SUBDIR cpp
OPTIONS "BUILD_TESTS OFF"
OPTIONS
"BUILD_BENCHMARKS OFF"
"BUILD_TESTS OFF"
)

message(VERBOSE "CUGRAPH_ETL: Using CUDF located in ${cudf_SOURCE_DIR}")

endfunction()

set(CUGRAPH_ETL_MIN_VERSION_cudf "${CUGRAPH_ETL_VERSION_MAJOR}.${CUGRAPH_ETL_VERSION_MINOR}.00")
set(CUGRAPH_ETL_BRANCH_VERSION_cudf "${CUGRAPH_ETL_VERSION_MAJOR}.${CUGRAPH_ETL_VERSION_MINOR}")

set(CUGRAPH_ETL_MIN_VERSION_cudf "${RAPIDS_VERSION_MAJOR}.${RAPIDS_VERSION_MINOR}.00")
set(CUGRAPH_ETL_BRANCH_VERSION_cudf "${RAPIDS_VERSION_MAJOR}.${RAPIDS_VERSION_MINOR}")

# Change pinned tag and fork here to test a commit in CI
# To use a different RAFT locally, set the CMake variable
# RPM_cudf_SOURCE=/path/to/local/cudf
# To use a different cuDF locally, set the CMake variable
# CPM_cudf_SOURCE=/path/to/local/cudf
find_and_configure_cudf(VERSION ${CUGRAPH_ETL_MIN_VERSION_cudf}
FORK rapidsai
PINNED_TAG branch-${CUGRAPH_ETL_BRANCH_VERSION_cudf}
Expand Down
11 changes: 5 additions & 6 deletions cpp/libcugraph_etl/cmake/thirdparty/get_cugraph.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#=============================================================================
# Copyright (c) 2021, NVIDIA CORPORATION.
# Copyright (c) 2021-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.
Expand Down Expand Up @@ -34,13 +34,12 @@ function(find_and_configure_cugraph)

endfunction()

set(CUGRAPH_ETL_MIN_VERSION_cugraph "${CUGRAPH_ETL_VERSION_MAJOR}.${CUGRAPH_ETL_VERSION_MINOR}.00")
set(CUGRAPH_ETL_BRANCH_VERSION_cugraph "${CUGRAPH_ETL_VERSION_MAJOR}.${CUGRAPH_ETL_VERSION_MINOR}")

set(CUGRAPH_ETL_MIN_VERSION_cugraph "${RAPIDS_VERSION_MAJOR}.${RAPIDS_VERSION_MINOR}.00")
set(CUGRAPH_ETL_BRANCH_VERSION_cugraph "${RAPIDS_VERSION_MAJOR}.${RAPIDS_VERSION_MINOR}")

# Change pinned tag and fork here to test a commit in CI
# To use a different RAFT locally, set the CMake variable
# RPM_cugraph_SOURCE=/path/to/local/cugraph
# To use a different cuGraph locally, set the CMake variable
# CPM_cugraph_SOURCE=/path/to/local/cugraph
find_and_configure_cugraph(VERSION ${CUGRAPH_ETL_MIN_VERSION_cugraph}
FORK rapidsai
PINNED_TAG branch-${CUGRAPH_ETL_BRANCH_VERSION_cugraph}
Expand Down

0 comments on commit 4de4a1d

Please sign in to comment.