diff --git a/build.sh b/build.sh index b7a9fca8a4e..196c8a713ba 100755 --- a/build.sh +++ b/build.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright (c) 2019-2021, NVIDIA CORPORATION. +# Copyright (c) 2019-2022, NVIDIA CORPORATION. # cugraph build script @@ -20,7 +20,7 @@ REPODIR=$(cd $(dirname $0); pwd) LIBCUGRAPH_BUILD_DIR=${LIBCUGRAPH_BUILD_DIR:=${REPODIR}/cpp/build} LIBCUGRAPH_ETL_BUILD_DIR=${LIBCUGRAPH_ETL_BUILD_DIR:=${REPODIR}/cpp/libcugraph_etl/build} -VALIDARGS="clean uninstall libcugraph libcugraph_etl cugraph pylibcugraph cpp-mgtests docs -v -g -n --allgpuarch --buildfaiss --show_depr_warn --skip_cpp_tests -h --help" +VALIDARGS="clean uninstall libcugraph libcugraph_etl cugraph pylibcugraph cpp-mgtests docs -v -g -n --allgpuarch --skip_cpp_tests -h --help" HELP="$0 [ ...] [ ...] where is: clean - remove all existing build artifacts and configuration (start over) @@ -36,9 +36,7 @@ HELP="$0 [ ...] [ ...] -g - build for debug -n - do not install after a successful build --allgpuarch - build for all supported GPU architectures - --buildfaiss - build faiss statically into cugraph - --show_depr_warn - show cmake deprecation warnings - --skip_cpp_tests - do not build the SG test binaries as part of the libcugraph and libcugraph_etl targets + --skip_cpp_tests - do not build the SG test binaries as part of the libcugraph target -h - print this text default action (no args) is to build and install 'libcugraph' then 'libcugraph_etl' then 'pylibcugraph' then 'cugraph' then 'docs' targets @@ -54,10 +52,8 @@ BUILD_DIRS="${LIBCUGRAPH_BUILD_DIR} ${LIBCUGRAPH_ETL_BUILD_DIR} ${CUGRAPH_BUILD_ VERBOSE_FLAG="" BUILD_TYPE=Release INSTALL_TARGET=install -BUILD_DISABLE_DEPRECATION_WARNING=ON BUILD_CPP_TESTS=ON BUILD_CPP_MG_TESTS=OFF -BUILD_STATIC_FAISS=OFF BUILD_ALL_GPU_ARCH=0 # Set defaults for vars that may not have been defined externally @@ -103,12 +99,6 @@ fi if hasArg --allgpuarch; then BUILD_ALL_GPU_ARCH=1 fi -if hasArg --buildfaiss; then - BUILD_STATIC_FAISS=ON -fi -if hasArg --show_depr_warn; then - BUILD_DISABLE_DEPRECATION_WARNING=OFF -fi if hasArg --skip_cpp_tests; then BUILD_CPP_TESTS=OFF fi @@ -180,14 +170,13 @@ if buildAll || hasArg libcugraph; then fi mkdir -p ${LIBCUGRAPH_BUILD_DIR} cd ${LIBCUGRAPH_BUILD_DIR} - cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} \ + cmake -B "${LIBCUGRAPH_BUILD_DIR}" -S "${REPODIR}/cpp" \ + -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} \ -DCMAKE_CUDA_ARCHITECTURES=${CUGRAPH_CMAKE_CUDA_ARCHITECTURES} \ - -DDISABLE_DEPRECATION_WARNING=${BUILD_DISABLE_DEPRECATION_WARNING} \ -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ - -DBUILD_STATIC_FAISS=${BUILD_STATIC_FAISS} \ -DBUILD_TESTS=${BUILD_CPP_TESTS} \ - -DBUILD_CUGRAPH_MG_TESTS=${BUILD_CPP_MG_TESTS} \ - ${REPODIR}/cpp + -DBUILD_CUGRAPH_MG_TESTS=${BUILD_CPP_MG_TESTS} + cmake --build "${LIBCUGRAPH_BUILD_DIR}" -j${PARALLEL_LEVEL} --target ${INSTALL_TARGET} ${VERBOSE_FLAG} fi @@ -242,10 +231,9 @@ if buildAll || hasArg docs; then if [ ! -d ${LIBCUGRAPH_BUILD_DIR} ]; then mkdir -p ${LIBCUGRAPH_BUILD_DIR} cd ${LIBCUGRAPH_BUILD_DIR} - cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} \ - -DDISABLE_DEPRECATION_WARNING=${BUILD_DISABLE_DEPRECATION_WARNING} \ - -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ${REPODIR}/cpp \ - -DBUILD_STATIC_FAISS=${BUILD_STATIC_FAISS} + cmake -B "${LIBCUGRAPH_BUILD_DIR}" -S "${REPODIR}/cpp" \ + -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} \ + -DCMAKE_BUILD_TYPE=${BUILD_TYPE} fi cd ${LIBCUGRAPH_BUILD_DIR} cmake --build "${LIBCUGRAPH_BUILD_DIR}" -j${PARALLEL_LEVEL} --target docs_cugraph ${VERBOSE_FLAG} diff --git a/ci/gpu/build.sh b/ci/gpu/build.sh index b59ba0b3968..e840da43fe9 100755 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Copyright (c) 2018-2021, NVIDIA CORPORATION. +# Copyright (c) 2018-2022, NVIDIA CORPORATION. ########################################## # cuGraph GPU build & testscript for CI # ########################################## @@ -94,17 +94,6 @@ if [[ -z "$PROJECT_FLASH" || "$PROJECT_FLASH" == "0" ]]; then gpuci_logger "Build from source" $WORKSPACE/build.sh -v clean libcugraph pylibcugraph cugraph else - # ...cugraph/cpu/conda_work/... is the dir name when only 1 lib* library is - # present. For multiple libs (ie. libcugraph and libcugraph_etl), the - # "_work" dir is prefixed with the lib name. - export LIBCUGRAPH_BUILD_DIR="$WORKSPACE/ci/artifacts/cugraph/cpu/libcugraph_work/cpp/build" - - # Faiss patch - echo "Update libcugraph.so" - cd $LIBCUGRAPH_BUILD_DIR - chrpath -d libcugraph.so - patchelf --replace-needed `patchelf --print-needed libcugraph.so | grep faiss` libfaiss.so libcugraph.so - CONDA_FILE=`find ${CONDA_ARTIFACT_PATH} -name "libcugraph*.tar.bz2"` CONDA_FILE=`basename "$CONDA_FILE" .tar.bz2` #get filename without extension CONDA_FILE=${CONDA_FILE//-/=} #convert to conda install diff --git a/conda/environments/cugraph_dev_cuda11.0.yml b/conda/environments/cugraph_dev_cuda11.0.yml index 40b440c5b89..b3233feeda9 100644 --- a/conda/environments/cugraph_dev_cuda11.0.yml +++ b/conda/environments/cugraph_dev_cuda11.0.yml @@ -28,8 +28,6 @@ dependencies: - boost - cython>=0.29,<0.30 - pytest -- libfaiss=1.7.0 -- faiss-proc=*=cuda - scikit-learn>=0.23.1 - sphinx - pydata-sphinx-theme diff --git a/conda/environments/cugraph_dev_cuda11.2.yml b/conda/environments/cugraph_dev_cuda11.2.yml index 8a717fa06ed..d8b7f34cd67 100644 --- a/conda/environments/cugraph_dev_cuda11.2.yml +++ b/conda/environments/cugraph_dev_cuda11.2.yml @@ -28,8 +28,6 @@ dependencies: - boost - cython>=0.29,<0.30 - pytest -- libfaiss=1.7.0 -- faiss-proc=*=cuda - scikit-learn>=0.23.1 - sphinx - pydata-sphinx-theme diff --git a/conda/environments/cugraph_dev_cuda11.4.yml b/conda/environments/cugraph_dev_cuda11.4.yml index e5b5fe82d2b..d9457d9bf6a 100644 --- a/conda/environments/cugraph_dev_cuda11.4.yml +++ b/conda/environments/cugraph_dev_cuda11.4.yml @@ -28,8 +28,6 @@ dependencies: - boost - cython>=0.29,<0.30 - pytest -- libfaiss=1.7.0 -- faiss-proc=*=cuda - scikit-learn>=0.23.1 - sphinx - pydata-sphinx-theme diff --git a/conda/environments/cugraph_dev_cuda11.5.yml b/conda/environments/cugraph_dev_cuda11.5.yml index ee3645a28aa..5fb72d0ef05 100644 --- a/conda/environments/cugraph_dev_cuda11.5.yml +++ b/conda/environments/cugraph_dev_cuda11.5.yml @@ -28,8 +28,6 @@ dependencies: - boost - cython>=0.29,<0.30 - pytest -- libfaiss=1.7.0 -- faiss-proc=*=cuda - scikit-learn>=0.23.1 - sphinx - pydata-sphinx-theme diff --git a/conda/recipes/libcugraph/meta.yaml b/conda/recipes/libcugraph/meta.yaml index 372767afb9b..f0bcb674455 100644 --- a/conda/recipes/libcugraph/meta.yaml +++ b/conda/recipes/libcugraph/meta.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2018-2021, NVIDIA CORPORATION. +# Copyright (c) 2018-2022, NVIDIA CORPORATION. # Usage: # conda build -c nvidia -c rapidsai -c conda-forge . @@ -42,14 +42,10 @@ requirements: - ucx-proc=*=gpu - gtest - gmock - - faiss-proc=*=cuda - - libfaiss 1.7.0 *_cuda run: - {{ pin_compatible('cudatoolkit', max_pin='x', min_pin='x') }} - nccl>=2.9.9 - ucx-proc=*=gpu - - faiss-proc=*=cuda - - libfaiss 1.7.0 *_cuda - libcusolver>=11.2.1 about: diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 8b74f39a305..992edebc48b 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -55,7 +55,11 @@ endforeach() # arch > 86 list(POP_BACK usable_arch_values latest_arch) list(TRANSFORM usable_arch_values APPEND "-real") -list(APPEND usable_arch_values ${latest_arch}) +if (usable_arch_values) + list(APPEND usable_arch_values ${latest_arch}) +else() + list(APPEND usable_arch_values ${latest_arch}-real) +endif() set(CMAKE_CUDA_ARCHITECTURES ${usable_arch_values}) @@ -73,8 +77,6 @@ rapids_cmake_build_type(Release) # - User Options -------------------------------------------------------------- option(BUILD_CUGRAPH_MG_TESTS "Build cuGraph multigpu algorithm tests" OFF) -set(BLAS_LIBRARIES "" CACHE STRING "Location of BLAS library for FAISS build.") -option(BUILD_STATIC_FAISS "Build the FAISS library for nearest neighbors search on GPU" OFF) option(CMAKE_CUDA_LINEINFO "Enable the -lineinfo option for nvcc (useful for cuda-memcheck / profiler" OFF) option(BUILD_TESTS "Configure CMake to build tests" ON) @@ -122,29 +124,29 @@ if(OpenMP_FOUND) list(APPEND CUGRAPH_CUDA_FLAGS -Xcompiler=${OpenMP_CXX_FLAGS}) endif() - -################################################################################ -# - find blas ------------------------------------------------------------------ - -if(NOT DEFINED BLAS_LIBRARIES) - find_package( BLAS REQUIRED ) -else() - message(STATUS "Manually setting BLAS to ${BLAS_LIBRARIES}") -endif() - -################################################################################ -# - find CPM based dependencies ----------------------------------------------- +################################################################################################### +# - find CPM based dependencies ------------------------------------------------------------------ rapids_cpm_init() -include(cmake/thirdparty/get_thrust.cmake) -include(cmake/thirdparty/get_faiss.cmake) -include(cmake/thirdparty/get_nccl.cmake) -include(cmake/thirdparty/get_rmm.cmake) - +### +# Linking to the `raft::raft` target implicitly links cugraph targets to the +# following public header-only raft dependencies: +# * RMM +# * Thrust +# * libcu++ +# * GTest/GMock +# * cuCollections +# +# The CMakeLists.txt for each of these projects are properly configured +# to generate a build and install export-set, so reimplementing finding or +# fetching those targets in cuGraph is redundant (at best), and potentially +# error-prone if something about those targets change and our implementation +# lags behind. +### include(cmake/thirdparty/get_raft.cmake) -include(cmake/thirdparty/get_cuco.cmake) +include(cmake/thirdparty/get_nccl.cmake) include(cmake/thirdparty/get_cuhornet.cmake) if(BUILD_TESTS) @@ -273,7 +275,6 @@ target_include_directories(cugraph PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../thirdparty" "${CMAKE_CURRENT_SOURCE_DIR}/src" - "${NCCL_INCLUDE_DIRS}" PUBLIC "$" "$" @@ -283,17 +284,9 @@ target_include_directories(cugraph # - link libraries ------------------------------------------------------------- target_link_libraries(cugraph PUBLIC - rmm::rmm - cugraph::Thrust raft::raft PRIVATE - cuco::cuco - CUDA::cublas - CUDA::curand - CUDA::cusolver - CUDA::cusparse cugraph::cuHornet - FAISS::FAISS NCCL::NCCL ) @@ -393,7 +386,6 @@ target_include_directories(cugraph_c # - C-API link libraries ------------------------------------------------------- target_link_libraries(cugraph_c PUBLIC - FAISS::FAISS CUDA::cublas CUDA::curand CUDA::cusolver @@ -446,17 +438,11 @@ cuGraph library is a collection of GPU accelerated graph algorithms that process ]=]) -set(code_string -[=[ -thrust_create_target(cugraph::Thrust FROM_OPTIONS) -]=]) - - rapids_export(INSTALL cugraph +rapids_export(INSTALL cugraph EXPORT_SET cugraph-exports GLOBAL_TARGETS cugraph cugraph_c NAMESPACE cugraph:: DOCUMENTATION doc_string - FINAL_CODE_BLOCK code_string ) ################################################################################ @@ -466,7 +452,6 @@ rapids_export(BUILD cugraph GLOBAL_TARGETS cugraph cugraph_c NAMESPACE cugraph:: DOCUMENTATION doc_string - FINAL_CODE_BLOCK code_string ) ################################################################################ diff --git a/cpp/cmake/thirdparty/get_cuco.cmake b/cpp/cmake/thirdparty/get_cuco.cmake deleted file mode 100644 index 8870137dbbd..00000000000 --- a/cpp/cmake/thirdparty/get_cuco.cmake +++ /dev/null @@ -1,35 +0,0 @@ -#============================================================================= -# Copyright (c) 2021-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_cuco VERSION) - - rapids_cpm_find(cuco ${VERSION} - GLOBAL_TARGETS cuco::cuco - CPM_ARGS - GIT_REPOSITORY https://github.com/NVIDIA/cuCollections.git - GIT_TAG 0ca860b824f5dc22cf8a41f09912e62e11f07d82 - OPTIONS "BUILD_TESTS OFF" - "BUILD_BENCHMARKS OFF" - "BUILD_EXAMPLES OFF" - ) - - if(TARGET cuco AND NOT TARGET cuco::cuco) - add_library(cuco::cuco ALIAS cuco) - endif() - -endfunction() - -find_and_configure_cuco(0.0.1) diff --git a/cpp/cmake/thirdparty/get_faiss.cmake b/cpp/cmake/thirdparty/get_faiss.cmake deleted file mode 100644 index ad11fb9b7bd..00000000000 --- a/cpp/cmake/thirdparty/get_faiss.cmake +++ /dev/null @@ -1,53 +0,0 @@ -#============================================================================= -# Copyright (c) 2021, 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_faiss) - set(oneValueArgs VERSION PINNED_TAG) - cmake_parse_arguments(PKG "${options}" "${oneValueArgs}" - "${multiValueArgs}" ${ARGN} ) - - rapids_find_generate_module(FAISS - HEADER_NAMES faiss/IndexFlat.h - LIBRARY_NAMES faiss - ) - - rapids_cpm_find(FAISS ${PKG_VERSION} - GLOBAL_TARGETS faiss FAISS::FAISS - CPM_ARGS - GIT_REPOSITORY https://github.com/facebookresearch/faiss.git - GIT_TAG ${PKG_PINNED_TAG} - OPTIONS - "FAISS_ENABLE_PYTHON OFF" - "BUILD_SHARED_LIBS OFF" - "CUDAToolkit_ROOT ${CUDAToolkit_LIBRARY_DIR}" - "FAISS_ENABLE_GPU ON" - "BUILD_TESTING OFF" - "CMAKE_MESSAGE_LOG_LEVEL VERBOSE" - ) - - if(FAISS_ADDED) - set(FAISS_GPU_HEADERS ${FAISS_SOURCE_DIR} PARENT_SCOPE) - endif() - - if(TARGET faiss AND NOT TARGET FAISS::FAISS) - add_library(FAISS::FAISS ALIAS faiss) - endif() - -endfunction() - -find_and_configure_faiss(VERSION 1.7.0 - PINNED_TAG bde7c0027191f29c9dadafe4f6e68ca0ee31fb30 - ) diff --git a/cpp/cmake/thirdparty/get_gtest.cmake b/cpp/cmake/thirdparty/get_gtest.cmake index d72769ff33b..cdc2c5d8898 100644 --- a/cpp/cmake/thirdparty/get_gtest.cmake +++ b/cpp/cmake/thirdparty/get_gtest.cmake @@ -1,5 +1,5 @@ #============================================================================= -# Copyright (c) 2021, NVIDIA CORPORATION. +# Copyright (c) 2021-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. diff --git a/cpp/cmake/thirdparty/get_gunrock.cmake b/cpp/cmake/thirdparty/get_gunrock.cmake deleted file mode 100644 index 056cd4bd5ea..00000000000 --- a/cpp/cmake/thirdparty/get_gunrock.cmake +++ /dev/null @@ -1,64 +0,0 @@ -#============================================================================= -# Copyright (c) 2021, 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_gunrock VERSION) - - if(NOT TARGET gunrock) - set(GUNROCK_GENCODE_SM60 OFF) - set(GUNROCK_GENCODE_SM61 OFF) - set(GUNROCK_GENCODE_SM70 OFF) - set(GUNROCK_GENCODE_SM72 OFF) - set(GUNROCK_GENCODE_SM75 OFF) - set(GUNROCK_GENCODE_SM80 OFF) - - foreach(arch IN LISTS CMAKE_CUDA_ARCHITECTURES) - string(REPLACE "-real" "" arch ${arch}) - set(GUNROCK_GENCODE_SM${arch} "ON") - endforeach() - - # FIXME: gunrock is still using ExternalProject instead of CPM, as version 1.2 - # doesn't work with CPM - - include(ExternalProject) - - set(GUNROCK_DIR ${CMAKE_CURRENT_BINARY_DIR}/gunrock) - ExternalProject_Add(gunrock_ext - GIT_REPOSITORY https://github.com/gunrock/gunrock.git - GIT_TAG v${VERSION} - PREFIX ${GUNROCK_DIR} - CMAKE_ARGS -DCMAKE_INSTALL_PREFIX= - -DGUNROCK_BUILD_SHARED_LIBS=OFF - -DGUNROCK_BUILD_TESTS=OFF - -DCUDA_AUTODETECT_GENCODE=OFF - -DGUNROCK_GENCODE_SM60=${GUNROCK_GENCODE_SM60} - -DGUNROCK_GENCODE_SM61=${GUNROCK_GENCODE_SM61} - -DGUNROCK_GENCODE_SM70=${GUNROCK_GENCODE_SM70} - -DGUNROCK_GENCODE_SM72=${GUNROCK_GENCODE_SM72} - -DGUNROCK_GENCODE_SM75=${GUNROCK_GENCODE_SM75} - -DGUNROCK_GENCODE_SM80=${GUNROCK_GENCODE_SM80} - BUILD_BYPRODUCTS ${GUNROCK_DIR}/src/gunrock_ext-build/lib/libgunrock.a - INSTALL_COMMAND "" - ) - - add_library(gunrock STATIC IMPORTED) - add_dependencies(gunrock gunrock_ext) - set_property(TARGET gunrock PROPERTY IMPORTED_LOCATION "${GUNROCK_DIR}/src/gunrock_ext-build/lib/libgunrock.a") - target_include_directories(gunrock INTERFACE "${GUNROCK_DIR}/src/gunrock_ext") - endif() -endfunction() - - -find_and_configure_gunrock(1.2) diff --git a/cpp/cmake/thirdparty/get_raft.cmake b/cpp/cmake/thirdparty/get_raft.cmake index a819d7158e1..43068468ab9 100644 --- a/cpp/cmake/thirdparty/get_raft.cmake +++ b/cpp/cmake/thirdparty/get_raft.cmake @@ -1,5 +1,5 @@ #============================================================================= -# Copyright (c) 2021, NVIDIA CORPORATION. +# 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. @@ -27,7 +27,9 @@ function(find_and_configure_raft) GIT_REPOSITORY https://github.com/${PKG_FORK}/raft.git GIT_TAG ${PKG_PINNED_TAG} SOURCE_SUBDIR cpp - OPTIONS "BUILD_TESTS OFF" + OPTIONS + "BUILD_TESTS OFF" + "RAFT_COMPILE_LIBRARIES OFF" ) message(VERBOSE "CUGRAPH: Using RAFT located in ${raft_SOURCE_DIR}") @@ -42,6 +44,8 @@ set(CUGRAPH_BRANCH_VERSION_raft "${CUGRAPH_VERSION_MAJOR}.${CUGRAPH_VERSION_MINO # To use a different RAFT locally, set the CMake variable # RPM_raft_SOURCE=/path/to/local/raft find_and_configure_raft(VERSION ${CUGRAPH_MIN_VERSION_raft} - FORK rapidsai - PINNED_TAG branch-${CUGRAPH_BRANCH_VERSION_raft} + # FORK rapidsai + # PINNED_TAG branch-${CUGRAPH_BRANCH_VERSION_raft} + FORK robertmaynard + PINNED_TAG refactor_cmake_raft_target_logic ) diff --git a/cpp/cmake/thirdparty/get_rmm.cmake b/cpp/cmake/thirdparty/get_rmm.cmake deleted file mode 100644 index 0e33fd3e2fd..00000000000 --- a/cpp/cmake/thirdparty/get_rmm.cmake +++ /dev/null @@ -1,27 +0,0 @@ -#============================================================================= -# Copyright (c) 2021, 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_rmm) - - include(${rapids-cmake-dir}/cpm/rmm.cmake) - rapids_cpm_rmm( - BUILD_EXPORT_SET cugraph-exports - INSTALL_EXPORT_SET cugraph-exports - ) - -endfunction() - -find_and_configure_rmm() diff --git a/cpp/cmake/thirdparty/get_thrust.cmake b/cpp/cmake/thirdparty/get_thrust.cmake deleted file mode 100644 index f4dfeb2a810..00000000000 --- a/cpp/cmake/thirdparty/get_thrust.cmake +++ /dev/null @@ -1,28 +0,0 @@ -#============================================================================= -# Copyright (c) 2021-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_thrust) - include(${rapids-cmake-dir}/cpm/thrust.cmake) - - rapids_cpm_thrust( - NAMESPACE cugraph - BUILD_EXPORT_SET raft-exports - INSTALL_EXPORT_SET raft-exports - ) - -endfunction() - -find_and_configure_thrust() diff --git a/cpp/tests/CMakeLists.txt b/cpp/tests/CMakeLists.txt index bddc2996720..cebc0e0c149 100644 --- a/cpp/tests/CMakeLists.txt +++ b/cpp/tests/CMakeLists.txt @@ -41,8 +41,7 @@ target_include_directories(cugraphtestutil target_link_libraries(cugraphtestutil PUBLIC - cugraph - cuco::cuco + cugraph::cugraph NCCL::NCCL ) @@ -54,20 +53,16 @@ set_property(TARGET cugraphmgtestutil PROPERTY POSITION_INDEPENDENT_CODE ON) target_include_directories(cugraphmgtestutil PRIVATE - "${CUB_INCLUDE_DIR}" - "${THRUST_INCLUDE_DIR}" - "${CUCO_INCLUDE_DIR}" - "${LIBCUDACXX_INCLUDE_DIR}" - "${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES}" - "${RMM_INCLUDE}" - "${NCCL_INCLUDE_DIRS}" "${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/mmio" "${CMAKE_CURRENT_SOURCE_DIR}/../include" "${CMAKE_CURRENT_SOURCE_DIR}" - "${RAFT_DIR}/cpp/include" ) -target_link_libraries(cugraphmgtestutil cugraph) +target_link_libraries(cugraphmgtestutil + PUBLIC + cugraph::cugraph + NCCL::NCCL +) ################################################################################################### # - compiler function ----------------------------------------------------------------------------- @@ -78,16 +73,12 @@ function(ConfigureTest CMAKE_TEST_NAME) target_link_libraries(${CMAKE_TEST_NAME} PRIVATE cugraphtestutil - cugraph + cugraph::cugraph GTest::gmock GTest::gmock_main GTest::gtest GTest::gtest_main NCCL::NCCL - CUDA::cublas - CUDA::cusparse - CUDA::cusolver - CUDA::curand ) if(OpenMP_CXX_FOUND) @@ -151,16 +142,12 @@ function(ConfigureTestMG CMAKE_TEST_NAME) PRIVATE cugraphmgtestutil cugraphtestutil - cugraph + cugraph::cugraph GTest::gmock GTest::gmock_main GTest::gtest GTest::gtest_main NCCL::NCCL - CUDA::cublas - CUDA::cusparse - CUDA::cusolver - CUDA::curand MPI::MPI_CXX ) @@ -231,8 +218,12 @@ function(ConfigureCTest CMAKE_TEST_NAME) target_link_libraries(${CMAKE_TEST_NAME} PRIVATE - cugraph_c + cugraph::cugraph_c cugraph_c_testutil + GTest::gmock + GTest::gmock_main + GTest::gtest + GTest::gtest_main ) add_test(NAME ${CMAKE_TEST_NAME} COMMAND ${CMAKE_TEST_NAME})