From 18ac2c20da891e4b718ee5034bef4b64bb34371d Mon Sep 17 00:00:00 2001 From: Matt Joux Date: Sat, 12 Feb 2022 14:32:07 +0100 Subject: [PATCH] add libcugraphops as a dependency of cugraph (#2019) We need to do several things: - Add libcugraphops to conda (both in the cugraph recipe as well as build environment) - Add libcugraphops to cmake (I added a new thirdparty include here) - Ensure that the right headers and objects are added in cmake For now, this is a work in progress since libcugraphops doesn't seem available on anaconda yet. Authors: - Matt Joux (https://github.com/MatthiasKohl) - Rick Ratzel (https://github.com/rlratzel) Approvers: - Brad Rees (https://github.com/BradReesWork) - Robert Maynard (https://github.com/robertmaynard) - Rick Ratzel (https://github.com/rlratzel) - Jordan Jacobelli (https://github.com/Ethyling) URL: https://github.com/rapidsai/cugraph/pull/2019 --- ci/benchmark/build.sh | 2 +- conda/environments/cugraph_dev_cuda11.0.yml | 1 + conda/environments/cugraph_dev_cuda11.2.yml | 1 + conda/environments/cugraph_dev_cuda11.4.yml | 1 + conda/environments/cugraph_dev_cuda11.5.yml | 1 + conda/recipes/libcugraph/meta.yaml | 1 + conda/recipes/libcugraph_etl/meta.yaml | 1 + cpp/CMakeLists.txt | 1 + cpp/cmake/thirdparty/get_libcugraphops.cmake | 33 ++++++++++++++++++++ 9 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 cpp/cmake/thirdparty/get_libcugraphops.cmake diff --git a/ci/benchmark/build.sh b/ci/benchmark/build.sh index aa734bb47c9..6e592521d66 100644 --- a/ci/benchmark/build.sh +++ b/ci/benchmark/build.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Copyright (c) 2018-2021, NVIDIA CORPORATION. +# Copyright (c) 2018-2022, NVIDIA CORPORATION. ########################################## # cuGraph Benchmark test script for CI # ########################################## diff --git a/conda/environments/cugraph_dev_cuda11.0.yml b/conda/environments/cugraph_dev_cuda11.0.yml index 16438ef76bf..ef8a596ddeb 100644 --- a/conda/environments/cugraph_dev_cuda11.0.yml +++ b/conda/environments/cugraph_dev_cuda11.0.yml @@ -6,6 +6,7 @@ channels: - conda-forge dependencies: - cudatoolkit=11.0 +- libcugraphops=22.04.* - cudf=22.04.* - libcudf=22.04.* - rmm=22.04.* diff --git a/conda/environments/cugraph_dev_cuda11.2.yml b/conda/environments/cugraph_dev_cuda11.2.yml index e8fb28f0064..48796a2804d 100644 --- a/conda/environments/cugraph_dev_cuda11.2.yml +++ b/conda/environments/cugraph_dev_cuda11.2.yml @@ -6,6 +6,7 @@ channels: - conda-forge dependencies: - cudatoolkit=11.2 +- libcugraphops=22.04.* - cudf=22.04.* - libcudf=22.04.* - rmm=22.04.* diff --git a/conda/environments/cugraph_dev_cuda11.4.yml b/conda/environments/cugraph_dev_cuda11.4.yml index 75e33a8d1e9..6a8962b0549 100644 --- a/conda/environments/cugraph_dev_cuda11.4.yml +++ b/conda/environments/cugraph_dev_cuda11.4.yml @@ -6,6 +6,7 @@ channels: - conda-forge dependencies: - cudatoolkit=11.4 +- libcugraphops=22.04.* - cudf=22.04.* - libcudf=22.04.* - rmm=22.04.* diff --git a/conda/environments/cugraph_dev_cuda11.5.yml b/conda/environments/cugraph_dev_cuda11.5.yml index 51bbe64884a..96d7bbc20a8 100644 --- a/conda/environments/cugraph_dev_cuda11.5.yml +++ b/conda/environments/cugraph_dev_cuda11.5.yml @@ -6,6 +6,7 @@ channels: - conda-forge dependencies: - cudatoolkit=11.5 +- libcugraphops=22.04.* - cudf=22.04.* - libcudf=22.04.* - rmm=22.04.* diff --git a/conda/recipes/libcugraph/meta.yaml b/conda/recipes/libcugraph/meta.yaml index 3615f644dd7..d7c7ee0778f 100644 --- a/conda/recipes/libcugraph/meta.yaml +++ b/conda/recipes/libcugraph/meta.yaml @@ -37,6 +37,7 @@ requirements: - cmake>=3.20.1 - doxygen>=1.8.11 - cudatoolkit {{ cuda_version }}.* + - libcugraphops {{ minor_version }}.* - librmm {{ minor_version }}.* - cudf {{ minor_version }}.* - boost-cpp>=1.66 diff --git a/conda/recipes/libcugraph_etl/meta.yaml b/conda/recipes/libcugraph_etl/meta.yaml index 18426907c8c..795b8d56b4f 100644 --- a/conda/recipes/libcugraph_etl/meta.yaml +++ b/conda/recipes/libcugraph_etl/meta.yaml @@ -37,6 +37,7 @@ requirements: - cmake>=3.20.1 - doxygen>=1.8.11 - cudatoolkit {{ cuda_version }}.* + - libcugraphops {{ minor_version }}.* # needed for cmake to find transitive deps - libcudf {{ minor_version }}.* - libcugraph {{ minor_version }}.* run: diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 62657a53479..b1c50959c88 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -145,6 +145,7 @@ rapids_cpm_init() # lags behind. ### include(cmake/thirdparty/get_raft.cmake) +include(cmake/thirdparty/get_libcugraphops.cmake) include(cmake/thirdparty/get_nccl.cmake) include(cmake/thirdparty/get_cuhornet.cmake) diff --git a/cpp/cmake/thirdparty/get_libcugraphops.cmake b/cpp/cmake/thirdparty/get_libcugraphops.cmake new file mode 100644 index 00000000000..2b257d87394 --- /dev/null +++ b/cpp/cmake/thirdparty/get_libcugraphops.cmake @@ -0,0 +1,33 @@ +#============================================================================= +# Copyright (c) 2022, 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. +#============================================================================= + +function(find_and_configure_cugraphops) + + if(TARGET cugraphops::cugraphops) + return() + endif() + + rapids_find_generate_module(cugraphops + HEADER_NAMES graph/sampling.h + LIBRARY_NAMES cugraph-ops++ + INCLUDE_SUFFIXES cugraph-ops + ) + + rapids_find_package(cugraphops REQUIRED) + +endfunction() + +find_and_configure_cugraphops()