From 7ad71e70408ba4cbca7c3d86d6b84decb7bdba6f Mon Sep 17 00:00:00 2001 From: Sevag H Date: Mon, 6 Feb 2023 08:53:24 -0500 Subject: [PATCH] Build pip wheels alongside conda CI (#3096) This PR adds pip wheel CI to the Conda CI, instead of having them work separately. Authors: - Sevag H (https://github.com/sevagh) - AJ Schmidt (https://github.com/ajschmidt8) - Vyas Ramasubramani (https://github.com/vyasr) - Rick Ratzel (https://github.com/rlratzel) Approvers: - AJ Schmidt (https://github.com/ajschmidt8) - Rick Ratzel (https://github.com/rlratzel) - Brad Rees (https://github.com/BradReesWork) URL: https://github.com/rapidsai/cugraph/pull/3096 --- .github/workflows/build.yaml | 59 ++++++++++++ .github/workflows/pr.yaml | 53 +++++++++++ .github/workflows/test.yaml | 26 ++++++ .github/workflows/wheels.yml | 94 -------------------- ci/release/update-version.sh | 17 +++- ci/wheel_smoke_test_cugraph.py | 37 ++++++++ ci/wheel_smoke_test_pylibcugraph.py | 54 +++++++++++ cpp/CMakeLists.txt | 10 ++- cpp/cmake/thirdparty/get_raft.cmake | 5 +- python/cugraph/CMakeLists.txt | 4 +- python/cugraph/_custom_build/backend.py | 8 +- python/cugraph/setup.py | 10 +-- python/pylibcugraph/CMakeLists.txt | 1 + python/pylibcugraph/_custom_build/backend.py | 6 +- python/pylibcugraph/setup.py | 4 +- 15 files changed, 271 insertions(+), 117 deletions(-) delete mode 100644 .github/workflows/wheels.yml create mode 100644 ci/wheel_smoke_test_cugraph.py create mode 100644 ci/wheel_smoke_test_pylibcugraph.py diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 17035cb0e37..26f9cc9c846 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -52,3 +52,62 @@ jobs: branch: ${{ inputs.branch }} date: ${{ inputs.date }} sha: ${{ inputs.sha }} + wheel-build-pylibcugraph: + secrets: inherit + uses: rapidsai/shared-action-workflows/.github/workflows/wheels-manylinux-build.yml@branch-23.02 + with: + build_type: ${{ inputs.build_type || 'branch' }} + branch: ${{ inputs.branch }} + sha: ${{ inputs.sha }} + date: ${{ inputs.date }} + package-name: pylibcugraph + package-dir: python/pylibcugraph + + # Note that this approach to cloning repos obviates any modification to + # the CMake variables in get_cumlprims_mg.cmake since CMake will just use + # the clone as is. + extra-repo: rapidsai/cugraph-ops + extra-repo-sha: branch-23.02 + extra-repo-deploy-key: CUGRAPH_OPS_SSH_PRIVATE_DEPLOY_KEY + + skbuild-configure-options: "-DDETECT_CONDA_ENV=OFF -DCUGRAPH_BUILD_WHEELS=ON -DFIND_CUGRAPH_CPP=OFF -DCPM_cugraph-ops_SOURCE=/project/cugraph-ops/" + wheel-publish-pylibcugraph: + needs: wheel-build-pylibcugraph + secrets: inherit + uses: rapidsai/shared-action-workflows/.github/workflows/wheels-manylinux-publish.yml@branch-23.02 + with: + build_type: ${{ inputs.build_type || 'branch' }} + branch: ${{ inputs.branch }} + sha: ${{ inputs.sha }} + date: ${{ inputs.date }} + package-name: pylibcugraph + wheel-build-cugraph: + needs: wheel-publish-pylibcugraph + secrets: inherit + uses: rapidsai/shared-action-workflows/.github/workflows/wheels-manylinux-build.yml@branch-23.02 + with: + build_type: ${{ inputs.build_type || 'branch' }} + branch: ${{ inputs.branch }} + sha: ${{ inputs.sha }} + date: ${{ inputs.date }} + package-name: cugraph + package-dir: python/cugraph + + # Note that this approach to cloning repos obviates any modification to + # the CMake variables in get_cumlprims_mg.cmake since CMake will just use + # the clone as is. + extra-repo: rapidsai/cugraph-ops + extra-repo-sha: branch-23.02 + extra-repo-deploy-key: CUGRAPH_OPS_SSH_PRIVATE_DEPLOY_KEY + + skbuild-configure-options: "-DDETECT_CONDA_ENV=OFF -DCUGRAPH_BUILD_WHEELS=ON -DFIND_CUGRAPH_CPP=OFF -DCPM_cugraph-ops_SOURCE=/project/cugraph-ops/" + wheel-publish-cugraph: + needs: wheel-build-cugraph + secrets: inherit + uses: rapidsai/shared-action-workflows/.github/workflows/wheels-manylinux-publish.yml@branch-23.02 + with: + build_type: ${{ inputs.build_type || 'branch' }} + branch: ${{ inputs.branch }} + sha: ${{ inputs.sha }} + date: ${{ inputs.date }} + package-name: cugraph diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index e1d66084e66..8a7a0035d66 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -18,6 +18,10 @@ jobs: - conda-notebook-tests - conda-python-build - conda-python-tests + - wheel-build-pylibcugraph + - wheel-tests-pylibcugraph + - wheel-build-cugraph + - wheel-tests-cugraph secrets: inherit uses: rapidsai/shared-action-workflows/.github/workflows/pr-builder.yaml@branch-23.02 checks: @@ -58,3 +62,52 @@ jobs: arch: "amd64" container_image: "rapidsai/ci:latest" run_script: "ci/test_notebooks.sh" + wheel-build-pylibcugraph: + needs: checks + secrets: inherit + uses: rapidsai/shared-action-workflows/.github/workflows/wheels-manylinux-build.yml@branch-23.02 + with: + build_type: pull-request + package-name: pylibcugraph + package-dir: python/pylibcugraph + extra-repo: rapidsai/cugraph-ops + extra-repo-sha: branch-23.02 + extra-repo-deploy-key: CUGRAPH_OPS_SSH_PRIVATE_DEPLOY_KEY + skbuild-configure-options: "-DDETECT_CONDA_ENV=OFF -DCUGRAPH_BUILD_WHEELS=ON -DFIND_CUGRAPH_CPP=OFF -DCPM_cugraph-ops_SOURCE=/project/cugraph-ops/" + wheel-tests-pylibcugraph: + needs: wheel-build-pylibcugraph + secrets: inherit + uses: rapidsai/shared-action-workflows/.github/workflows/wheels-manylinux-test.yml@branch-23.02 + with: + build_type: pull-request + package-name: pylibcugraph + # On arm also need to install cupy from the specific webpage. + test-before-arm64: "pip install cupy-cuda11x -f https://pip.cupy.dev/aarch64" + test-unittest: "RAPIDS_DATASET_ROOT_DIR=./datasets pytest -v ./python/pylibcugraph/pylibcugraph/tests" + test-smoketest: "python ci/wheel_smoke_test_pylibcugraph.py" + wheel-build-cugraph: + needs: wheel-tests-pylibcugraph + secrets: inherit + uses: rapidsai/shared-action-workflows/.github/workflows/wheels-manylinux-build.yml@branch-23.02 + with: + build_type: pull-request + package-name: cugraph + package-dir: python/cugraph + extra-repo: rapidsai/cugraph-ops + extra-repo-sha: branch-23.02 + extra-repo-deploy-key: CUGRAPH_OPS_SSH_PRIVATE_DEPLOY_KEY + before-wheel: "RAPIDS_PY_WHEEL_NAME=pylibcugraph_cu11 rapids-download-wheels-from-s3 ./local-wheelhouse" + skbuild-configure-options: "-DDETECT_CONDA_ENV=OFF -DCUGRAPH_BUILD_WHEELS=ON -DFIND_CUGRAPH_CPP=OFF -DCPM_cugraph-ops_SOURCE=/project/cugraph-ops/" + wheel-tests-cugraph: + needs: wheel-build-cugraph + secrets: inherit + uses: rapidsai/shared-action-workflows/.github/workflows/wheels-manylinux-test.yml@branch-23.02 + with: + build_type: pull-request + package-name: cugraph + # Always want to test against latest dask/distributed. + test-before-amd64: "cd ./datasets && bash ./get_test_data.sh && cd - && RAPIDS_PY_WHEEL_NAME=pylibcugraph_cu11 rapids-download-wheels-from-s3 ./local-pylibcugraph-dep && pip install --no-deps ./local-pylibcugraph-dep/*.whl && pip install git+https://github.com/dask/dask.git@main git+https://github.com/dask/distributed.git@main git+https://github.com/rapidsai/dask-cuda.git@branch-23.02" + # On arm also need to install cupy from the specific site. + test-before-arm64: "RAPIDS_PY_WHEEL_NAME=pylibcugraph_cu11 rapids-download-wheels-from-s3 ./local-pylibcugraph-dep && pip install --no-deps ./local-pylibcugraph-dep/*.whl && pip install cupy-cuda11x -f https://pip.cupy.dev/aarch64 && pip install git+https://github.com/dask/dask.git@main git+https://github.com/dask/distributed.git@main git+https://github.com/rapidsai/dask-cuda.git@branch-23.02" + test-unittest: "RAPIDS_DATASET_ROOT_DIR=/__w/cugraph/cugraph/datasets pytest -v ./python/cugraph/cugraph/tests --ignore=./python/cugraph/cugraph/tests/mg" + test-smoketest: "python ci/wheel_smoke_test_cugraph.py" diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 910b21cf7fe..533a2b5ce29 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -30,3 +30,29 @@ jobs: branch: ${{ inputs.branch }} date: ${{ inputs.date }} sha: ${{ inputs.sha }} + wheel-tests-pylibcugraph: + secrets: inherit + uses: rapidsai/shared-action-workflows/.github/workflows/wheels-manylinux-test.yml@branch-23.02 + with: + build_type: nightly + branch: ${{ inputs.branch }} + date: ${{ inputs.date }} + sha: ${{ inputs.sha }} + package-name: pylibcugraph + # On arm also need to install cupy from the specific webpage. + test-before-arm64: "pip install cupy-cuda11x -f https://pip.cupy.dev/aarch64" + test-unittest: "RAPIDS_DATASET_ROOT_DIR=./datasets pytest -v ./python/pylibcugraph/pylibcugraph/tests" + wheel-tests-cugraph: + secrets: inherit + uses: rapidsai/shared-action-workflows/.github/workflows/wheels-manylinux-test.yml@branch-23.02 + with: + build_type: nightly + branch: ${{ inputs.branch }} + date: ${{ inputs.date }} + sha: ${{ inputs.sha }} + package-name: cugraph + # Always want to test against latest dask/distributed. + test-before-amd64: "cd ./datasets && bash ./get_test_data.sh && cd - && pip install git+https://github.com/dask/dask.git@main git+https://github.com/dask/distributed.git@main git+https://github.com/rapidsai/dask-cuda.git@branch-23.02" + # On arm also need to install cupy from the specific webpage. + test-before-arm64: "cd ./datasets && bash ./get_test_data.sh && cd - && pip install cupy-cuda11x -f https://pip.cupy.dev/aarch64 && pip install git+https://github.com/dask/dask.git@main git+https://github.com/dask/distributed.git@main git+https://github.com/rapidsai/dask-cuda.git@branch-23.02" + test-unittest: "RAPIDS_DATASET_ROOT_DIR=/__w/cugraph/cugraph/datasets pytest -v ./python/cugraph/cugraph/tests --ignore=./python/cugraph/cugraph/tests/mg" diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml deleted file mode 100644 index 05123de1d65..00000000000 --- a/.github/workflows/wheels.yml +++ /dev/null @@ -1,94 +0,0 @@ -name: cuGraph wheels - -on: - workflow_call: - inputs: - versioneer-override: - type: string - default: '' - build-tag: - type: string - default: '' - branch: - required: true - type: string - date: - required: true - type: string - sha: - required: true - type: string - build-type: - type: string - default: nightly - -concurrency: - group: "cugraph-${{ github.workflow }}-${{ github.ref }}" - cancel-in-progress: true - -jobs: - pylibcugraph-wheel: - uses: rapidsai/shared-action-workflows/.github/workflows/wheels-manylinux.yml@main - with: - repo: rapidsai/cugraph - - build-type: ${{ inputs.build-type }} - branch: ${{ inputs.branch }} - sha: ${{ inputs.sha }} - date: ${{ inputs.date }} - - package-dir: python/pylibcugraph - package-name: pylibcugraph - - # Note that this approach to cloning repos obviates any modification to - # the CMake variables in get_cumlprims_mg.cmake since CMake will just use - # the clone as is. - extra-repo: rapidsai/cugraph-ops - extra-repo-sha: branch-22.12 - extra-repo-deploy-key: CUGRAPH_OPS_SSH_PRIVATE_DEPLOY_KEY - - python-package-versioneer-override: ${{ inputs.versioneer-override }} - python-package-build-tag: ${{ inputs.build-tag }} - - skbuild-configure-options: "-DDETECT_CONDA_ENV=OFF -DCUGRAPH_BUILD_WHEELS=ON -DCPM_cugraph-ops_SOURCE=/project/cugraph-ops/" - - # On arm also need to install cupy from the specific webpage. - test-before-arm64: "pip install cupy-cuda11x -f https://pip.cupy.dev/aarch64" - test-extras: test - - test-unittest: "RAPIDS_DATASET_ROOT_DIR=`pwd`/datasets pytest -v ./python/pylibcugraph/pylibcugraph/tests" - secrets: inherit - - cugraph-wheel: - needs: pylibcugraph-wheel - uses: rapidsai/shared-action-workflows/.github/workflows/wheels-manylinux.yml@main - with: - repo: rapidsai/cugraph - - build-type: ${{ inputs.build-type }} - branch: ${{ inputs.branch }} - sha: ${{ inputs.sha }} - date: ${{ inputs.date }} - - package-dir: python/cugraph - package-name: cugraph - - # Note that this approach to cloning repos obviates any modification to - # the CMake variables in get_cumlprims_mg.cmake since CMake will just use - # the clone as is. - extra-repo: rapidsai/cugraph-ops - extra-repo-sha: branch-22.12 - extra-repo-deploy-key: CUGRAPH_OPS_SSH_PRIVATE_DEPLOY_KEY - - python-package-versioneer-override: ${{ inputs.versioneer-override }} - python-package-build-tag: ${{ inputs.build-tag }} - - skbuild-configure-options: "-DDETECT_CONDA_ENV=OFF -DCUGRAPH_BUILD_WHEELS=ON -DCPM_cugraph-ops_SOURCE=/project/cugraph-ops/" - - # Always want to test against latest dask/distributed. - test-before-amd64: "pip install git+https://github.com/dask/dask.git@main git+https://github.com/dask/distributed.git@main git+https://github.com/rapidsai/dask-cuda.git@branch-23.02" - # On arm also need to install cupy from the specific webpage. - test-before-arm64: "pip install cupy-cuda11x -f https://pip.cupy.dev/aarch64 && pip install git+https://github.com/dask/dask.git@main git+https://github.com/dask/distributed.git@main git+https://github.com/rapidsai/dask-cuda.git@branch-23.02" - test-extras: test - test-unittest: "RAPIDS_DATASET_ROOT_DIR=`pwd`/datasets pytest -v ./python/cugraph/cugraph/tests" - secrets: inherit diff --git a/ci/release/update-version.sh b/ci/release/update-version.sh index 9186baca972..ebf2c9782a7 100755 --- a/ci/release/update-version.sh +++ b/ci/release/update-version.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2018-2022, NVIDIA CORPORATION. +# Copyright (c) 2018-2023, NVIDIA CORPORATION. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -82,3 +82,18 @@ sed_runner "/^ucx_py_version:$/ {n;s/.*/ - \"${NEXT_UCX_PY_VERSION}\"/}" conda/ for FILE in .github/workflows/*.yaml; do sed_runner "/shared-action-workflows/ s/@.*/@branch-${NEXT_SHORT_TAG}/g" "${FILE}" done + +# Wheel builds clone cugraph-ops, update its branch +sed_runner "s/extra-repo-sha: branch-.*/extra-repo-sha: branch-${NEXT_SHORT_TAG}/g" .github/workflows/*.yaml + +# Wheel builds install dask-cuda from source, update its branch +sed_runner "s/dask-cuda.git@branch-[^\"\s]\+/dask-cuda.git@branch-${NEXT_SHORT_TAG}/g" .github/workflows/*.yaml + +# Need to distutils-normalize the original version +NEXT_SHORT_TAG_PEP440=$(python -c "from setuptools.extern import packaging; print(packaging.version.Version('${NEXT_SHORT_TAG}'))") + +# Wheel builds install intra-RAPIDS dependencies from same release +sed_runner "s/{cuda_suffix}[^\"].*\",/{cuda_suffix}==${NEXT_SHORT_TAG_PEP440}.*\",/g" python/pylibcugraph/setup.py +sed_runner "s/{cuda_suffix}.*\",/{cuda_suffix}==${NEXT_SHORT_TAG_PEP440}.*\",/g" python/pylibcugraph/_custom_build/backend.py +sed_runner "s/{cuda_suffix}[^\"].*\",/{cuda_suffix}==${NEXT_SHORT_TAG_PEP440}.*\",/g" python/cugraph/setup.py +sed_runner "s/{cuda_suffix}.*\",/{cuda_suffix}==${NEXT_SHORT_TAG_PEP440}.*\",/g" python/cugraph/_custom_build/backend.py diff --git a/ci/wheel_smoke_test_cugraph.py b/ci/wheel_smoke_test_cugraph.py new file mode 100644 index 00000000000..9b014d9ce95 --- /dev/null +++ b/ci/wheel_smoke_test_cugraph.py @@ -0,0 +1,37 @@ +# Copyright (c) 2023, NVIDIA CORPORATION. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import cudf +import cugraph + +if __name__ == "__main__": + edgelist = cudf.DataFrame({"source": ["a", "b", "c"], "destination": ["b", "c", "d"]}) + + # directed graph + G = cugraph.Graph(directed=True) + G.from_cudf_edgelist(edgelist, store_transposed=True) + result_df = cugraph.pagerank(G) + + assert(result_df["pagerank"].sum() == 1.0) + assert(result_df.sort_values(by="pagerank")["vertex"].values_host.tolist() + == ["a", "b", "c", "d"]) + + # undirected graph + G = cugraph.Graph(directed=False) + G.from_cudf_edgelist(edgelist, store_transposed=True) + result_df = cugraph.pagerank(G) + + assert(result_df["pagerank"].sum() == 1.0) + result_df.set_index("vertex", inplace=True) + assert(result_df.loc["a", "pagerank"] == result_df.loc["d", "pagerank"]) + assert(result_df.loc["b", "pagerank"] == result_df.loc["c", "pagerank"]) diff --git a/ci/wheel_smoke_test_pylibcugraph.py b/ci/wheel_smoke_test_pylibcugraph.py new file mode 100644 index 00000000000..738e7061490 --- /dev/null +++ b/ci/wheel_smoke_test_pylibcugraph.py @@ -0,0 +1,54 @@ +# Copyright (c) 2023, NVIDIA CORPORATION. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import cupy +from pylibcugraph import ResourceHandle, GraphProperties, SGGraph, pagerank + +# an import statement that reveals a problem with cusolver +from pylibcugraph.components._connectivity import ( + strongly_connected_components, +) + + +if __name__ == "__main__": + src_array = cupy.asarray([100, 201, 302], dtype="int32") + dst_array = cupy.asarray([201, 302, 403], dtype="int32") + wgt_array = cupy.asarray([1.0, 1.0, 1.0], dtype="float32") + + resource_handle = ResourceHandle() + + G = SGGraph(resource_handle, + GraphProperties(is_symmetric=False, is_multigraph=False), + src_array, + dst_array, + wgt_array, + store_transposed=True, + renumber=True, + do_expensive_check=True, + ) + + (vertices, pageranks) = pagerank(resource_handle=resource_handle, + graph=G, + precomputed_vertex_out_weight_vertices=None, + precomputed_vertex_out_weight_sums=None, + initial_guess_vertices=None, + initial_guess_values=None, + alpha=0.85, + epsilon=1.0e-6, + max_iterations=500, + do_expensive_check=True, + ) + + assert(pageranks.sum() == 1.0) + results = dict(zip(vertices.tolist(),pageranks.tolist())) + assert(results[100] < results[201] < results[302] < results[403]) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 3dd99278d79..5dd1308637b 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -80,6 +80,7 @@ option(CMAKE_CUDA_LINEINFO "Enable the -lineinfo option for nvcc (useful for cud option(BUILD_TESTS "Configure CMake to build tests" ON) option(USE_CUGRAPH_OPS "Enable all functions that call cugraph-ops" ON) option(USE_RAFT_STATIC "Build raft as a static library" OFF) +option(CUGRAPH_COMPILE_RAFT_DIST_LIBS "Compile the raft library instead of using it header-only" ON) option(CUDA_STATIC_RUNTIME "Statically link the CUDA toolkit runtime and libraries" OFF) option(CUGRAPH_USE_CUGRAPH_OPS_STATIC "Build and statically link the cugraph-ops library" OFF) option(CUGRAPH_EXCLUDE_CUGRAPH_OPS_FROM_ALL "Exclude cugraph-ops targets from cuGraph's 'all' target" OFF) @@ -453,16 +454,17 @@ if(CUDA_STATIC_RUNTIME) target_include_directories(cugraph_c PUBLIC ${_includes}) # Add CTK include paths because we make our CTK library links private below target_include_directories(cugraph_c SYSTEM PUBLIC ${CUDAToolkit_INCLUDE_DIRS}) + set(_ctk_static_suffix "_static") endif() ################################################################################ # - C-API link libraries ------------------------------------------------------- target_link_libraries(cugraph_c PUBLIC - CUDA::cublas - CUDA::curand - CUDA::cusolver - CUDA::cusparse + CUDA::cublas${_ctk_static_suffix} + CUDA::curand${_ctk_static_suffix} + CUDA::cusolver${_ctk_static_suffix} + CUDA::cusparse${_ctk_static_suffix} rmm::rmm $<$>:raft::raft> $<$>:raft::distance> diff --git a/cpp/cmake/thirdparty/get_raft.cmake b/cpp/cmake/thirdparty/get_raft.cmake index 43226664e5d..d94827b4e81 100644 --- a/cpp/cmake/thirdparty/get_raft.cmake +++ b/cpp/cmake/thirdparty/get_raft.cmake @@ -19,7 +19,7 @@ set(CUGRAPH_BRANCH_VERSION_raft "${CUGRAPH_VERSION_MAJOR}.${CUGRAPH_VERSION_MINO function(find_and_configure_raft) - set(oneValueArgs VERSION FORK PINNED_TAG CLONE_ON_PIN USE_RAFT_STATIC) + set(oneValueArgs VERSION FORK PINNED_TAG CLONE_ON_PIN USE_RAFT_STATIC COMPILE_RAFT_DIST_LIBS) cmake_parse_arguments(PKG "" "${oneValueArgs}" "" ${ARGN} ) if(PKG_CLONE_ON_PIN AND NOT PKG_PINNED_TAG STREQUAL "branch-${CUGRAPH_BRANCH_VERSION_raft}") @@ -47,7 +47,7 @@ function(find_and_configure_raft) SOURCE_SUBDIR cpp OPTIONS "RAFT_COMPILE_LIBRARIES OFF" - "RAFT_COMPILE_DIST_LIBRARY ON" + "RAFT_COMPILE_DIST_LIBRARY ${PKG_COMPILE_RAFT_DIST_LIBS}" "BUILD_TESTS OFF" "BUILD_BENCH OFF" "BUILD_SHARED_LIBS ${BUILD_RAFT_SHARED}" @@ -74,4 +74,5 @@ find_and_configure_raft(VERSION ${CUGRAPH_MIN_VERSION_raft} # even if it's already installed. CLONE_ON_PIN ON USE_RAFT_STATIC ${USE_RAFT_STATIC} + COMPILE_RAFT_DIST_LIBS ${CUGRAPH_COMPILE_RAFT_DIST_LIBS} ) diff --git a/python/cugraph/CMakeLists.txt b/python/cugraph/CMakeLists.txt index 9acce421b9d..ac3b0bc3fd9 100644 --- a/python/cugraph/CMakeLists.txt +++ b/python/cugraph/CMakeLists.txt @@ -1,5 +1,5 @@ # ============================================================================= -# Copyright (c) 2022, NVIDIA CORPORATION. +# Copyright (c) 2022-2023, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the License at @@ -59,13 +59,13 @@ if(NOT cugraph_FOUND) set(BUILD_TESTS OFF) set(BUILD_CUGRAPH_MG_TESTS OFF) set(BUILD_CUGRAPH_OPS_CPP_TESTS OFF) - set(BUILD_CUGRAPH_OPS_CPP_TESTS OFF) set(_exclude_from_all "") if(CUGRAPH_BUILD_WHEELS) # Statically link dependencies if building wheels set(CUDA_STATIC_RUNTIME ON) set(USE_RAFT_STATIC ON) + set(CUGRAPH_COMPILE_RAFT_DIST_LIBS OFF) set(CUGRAPH_USE_CUGRAPH_OPS_STATIC ON) set(CUGRAPH_EXCLUDE_CUGRAPH_OPS_FROM_ALL ON) set(ALLOW_CLONE_CUGRAPH_OPS ON) diff --git a/python/cugraph/_custom_build/backend.py b/python/cugraph/_custom_build/backend.py index b468b1c88be..68991f0a66a 100644 --- a/python/cugraph/_custom_build/backend.py +++ b/python/cugraph/_custom_build/backend.py @@ -1,4 +1,4 @@ -# Copyright (c) 2022, NVIDIA CORPORATION. +# Copyright (c) 2022-2023, NVIDIA CORPORATION. """Custom build backend for cugraph to get versioned requirements. @@ -21,9 +21,9 @@ def wrapper(config_settings=None): orig_list = getattr(_orig, func.__name__)(config_settings) cuda_suffix = os.getenv("RAPIDS_PY_WHEEL_CUDA_SUFFIX", default="") append_list = [ - f"rmm{cuda_suffix}", - f"raft-dask{cuda_suffix}", - f"pylibcugraph{cuda_suffix}", + f"rmm{cuda_suffix}==23.2.*", + f"raft-dask{cuda_suffix}==23.2.*", + f"pylibcugraph{cuda_suffix}==23.2.*", ] return orig_list + append_list diff --git a/python/cugraph/setup.py b/python/cugraph/setup.py index 858c9594fa5..fab399d72f7 100644 --- a/python/cugraph/setup.py +++ b/python/cugraph/setup.py @@ -24,11 +24,11 @@ INSTALL_REQUIRES = [ "numba", "dask-cuda", - f"rmm{cuda_suffix}", - f"cudf{cuda_suffix}", - f"raft-dask{cuda_suffix}", - f"dask-cudf{cuda_suffix}", - f"pylibcugraph{cuda_suffix}", + f"rmm{cuda_suffix}==23.2.*", + f"cudf{cuda_suffix}==23.2.*", + f"raft-dask{cuda_suffix}==23.2.*", + f"dask-cudf{cuda_suffix}==23.2.*", + f"pylibcugraph{cuda_suffix}==23.2.*", "cupy-cuda11x", ] diff --git a/python/pylibcugraph/CMakeLists.txt b/python/pylibcugraph/CMakeLists.txt index 00ac3afe12b..1316be28ed3 100644 --- a/python/pylibcugraph/CMakeLists.txt +++ b/python/pylibcugraph/CMakeLists.txt @@ -65,6 +65,7 @@ if (NOT cugraph_FOUND) # Statically link dependencies if building wheels set(CUDA_STATIC_RUNTIME ON) set(USE_RAFT_STATIC ON) + set(CUGRAPH_COMPILE_RAFT_DIST_LIBS OFF) set(CUGRAPH_USE_CUGRAPH_OPS_STATIC ON) set(CUGRAPH_EXCLUDE_CUGRAPH_OPS_FROM_ALL ON) set(ALLOW_CLONE_CUGRAPH_OPS ON) diff --git a/python/pylibcugraph/_custom_build/backend.py b/python/pylibcugraph/_custom_build/backend.py index 707add312a0..f584c386b64 100644 --- a/python/pylibcugraph/_custom_build/backend.py +++ b/python/pylibcugraph/_custom_build/backend.py @@ -1,4 +1,4 @@ -# Copyright (c) 2022, NVIDIA CORPORATION. +# Copyright (c) 2022-2023, NVIDIA CORPORATION. """Custom build backend for pylibcugraph to get versioned requirements. @@ -21,8 +21,8 @@ def wrapper(config_settings=None): orig_list = getattr(_orig, func.__name__)(config_settings) cuda_suffix = os.getenv("RAPIDS_PY_WHEEL_CUDA_SUFFIX", default="") append_list = [ - f"rmm{cuda_suffix}", - f"pylibraft{cuda_suffix}", + f"rmm{cuda_suffix}==23.2.*", + f"pylibraft{cuda_suffix}==23.2.*", ] return orig_list + append_list diff --git a/python/pylibcugraph/setup.py b/python/pylibcugraph/setup.py index c27a6692908..901734852d1 100644 --- a/python/pylibcugraph/setup.py +++ b/python/pylibcugraph/setup.py @@ -93,8 +93,8 @@ def get_versions(): package_data={key: ["*.pxd"] for key in find_packages(include=["pylibcugraph*"])}, include_package_data=True, install_requires=[ - f"pylibraft{cuda_suffix}", - f"rmm{cuda_suffix}", + f"pylibraft{cuda_suffix}==23.2.*", + f"rmm{cuda_suffix}==23.2.*", ], extras_require={ "test": [