From 0c656418068ddbf740aa4ebb97784a6d3a8f5e57 Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Mon, 21 Mar 2022 18:36:25 -0400 Subject: [PATCH 01/12] Adding cuco and libcucxx back to cugraph build. Disabling transitively pulling from RAFT --- cpp/CMakeLists.txt | 9 ++++-- cpp/cmake/thirdparty/get_cuco.cmake | 34 +++++++++++++++++++++++ cpp/cmake/thirdparty/get_libcudacxx.cmake | 24 ++++++++++++++++ cpp/cmake/thirdparty/get_raft.cmake | 1 + cpp/tests/CMakeLists.txt | 5 ++++ 5 files changed, 71 insertions(+), 2 deletions(-) create mode 100644 cpp/cmake/thirdparty/get_cuco.cmake create mode 100644 cpp/cmake/thirdparty/get_libcudacxx.cmake diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 57b2cac3716..6c3a93d6d7e 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -134,9 +134,7 @@ rapids_cpm_init() # 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 @@ -144,6 +142,11 @@ rapids_cpm_init() # error-prone if something about those targets change and our implementation # lags behind. ### + +# Putting this before raft to override RAFT from pulling them in. +include(cmake/thirdparty/get_libcudacxx.cmake) +include(cmake/thirdparty/get_cuco.cmake) + include(cmake/thirdparty/get_raft.cmake) include(cmake/thirdparty/get_libcugraphops.cmake) @@ -289,6 +292,7 @@ target_link_libraries(cugraph cugraphops::cugraphops raft::raft PRIVATE + cuco::cuco cugraph::cuHornet NCCL::NCCL ) @@ -398,6 +402,7 @@ target_link_libraries(cugraph_c CUDA::cusolver CUDA::cusparse PRIVATE + cuco::cuco cugraph::cugraph ) diff --git a/cpp/cmake/thirdparty/get_cuco.cmake b/cpp/cmake/thirdparty/get_cuco.cmake new file mode 100644 index 00000000000..63453071ece --- /dev/null +++ b/cpp/cmake/thirdparty/get_cuco.cmake @@ -0,0 +1,34 @@ +#============================================================================= +# 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 + BUILD_EXPORT_SET cugraph-exports + CPM_ARGS + EXCLUDE_FROM_ALL TRUE + GIT_REPOSITORY https://github.com/NVIDIA/cuCollections.git + GIT_TAG 0ca860b824f5dc22cf8a41f09912e62e11f07d82 + OPTIONS "BUILD_TESTS OFF" + "BUILD_BENCHMARKS OFF" + "BUILD_EXAMPLES OFF" + ) + +endfunction() + +# cuCollections doesn't have a version yet +find_and_configure_cuco(0.0) diff --git a/cpp/cmake/thirdparty/get_libcudacxx.cmake b/cpp/cmake/thirdparty/get_libcudacxx.cmake new file mode 100644 index 00000000000..41e5998a448 --- /dev/null +++ b/cpp/cmake/thirdparty/get_libcudacxx.cmake @@ -0,0 +1,24 @@ +# ============================================================================= +# Copyright (c) 2020-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. +# ============================================================================= + +# This function finds libcudacxx and sets any additional necessary environment variables. +function(find_and_configure_libcudacxx) + include(${rapids-cmake-dir}/cpm/libcudacxx.cmake) + + rapids_cpm_libcudacxx(BUILD_EXPORT_SET cugraph-exports + INSTALL_EXPORT_SET cugraph-exports) + +endfunction() + +find_and_configure_libcudacxx() diff --git a/cpp/cmake/thirdparty/get_raft.cmake b/cpp/cmake/thirdparty/get_raft.cmake index 8b75753db91..9abf0d5d431 100644 --- a/cpp/cmake/thirdparty/get_raft.cmake +++ b/cpp/cmake/thirdparty/get_raft.cmake @@ -39,6 +39,7 @@ function(find_and_configure_raft) "RAFT_COMPILE_LIBRARIES OFF" "BUILD_TESTS OFF" "BUILD_BENCH OFF" + "RAFT_ENABLE_cuco_DEPENDENCY OFF" ) if(raft_ADDED) diff --git a/cpp/tests/CMakeLists.txt b/cpp/tests/CMakeLists.txt index b7826bceeec..91c97b310ae 100644 --- a/cpp/tests/CMakeLists.txt +++ b/cpp/tests/CMakeLists.txt @@ -60,6 +60,7 @@ target_include_directories(cugraphmgtestutil target_link_libraries(cugraphmgtestutil PUBLIC + cuco::cuco cugraph::cugraph NCCL::NCCL ) @@ -77,6 +78,7 @@ function(ConfigureTest CMAKE_TEST_NAME) GTest::gtest GTest::gtest_main NCCL::NCCL + cuco::cuco ) if(OpenMP_CXX_FOUND) @@ -155,6 +157,7 @@ function(ConfigureTestMG CMAKE_TEST_NAME) GTest::gtest_main NCCL::NCCL MPI::MPI_CXX + cuco::cuco ) if(OpenMP_CXX_FOUND) @@ -237,6 +240,7 @@ function(ConfigureCTest CMAKE_TEST_NAME) cugraph_c_testutil GTest::gtest GTest::gtest_main + cuco::cuco ) add_test(NAME ${CMAKE_TEST_NAME} COMMAND ${CMAKE_TEST_NAME}) @@ -263,6 +267,7 @@ function(ConfigureCTestMG CMAKE_TEST_NAME) GTest::gtest_main NCCL::NCCL MPI::MPI_CXX + cuco::cuco ) add_test(NAME ${CMAKE_TEST_NAME} From 316185358ab227c1d120409a5050e16f36d5d33a Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Mon, 21 Mar 2022 19:25:37 -0400 Subject: [PATCH 02/12] Making raft a private dependency --- cpp/CMakeLists.txt | 2 +- cpp/tests/CMakeLists.txt | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 6c3a93d6d7e..f06307d3afa 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -290,8 +290,8 @@ target_include_directories(cugraph target_link_libraries(cugraph PUBLIC cugraphops::cugraphops - raft::raft PRIVATE + raft::raft cuco::cuco cugraph::cuHornet NCCL::NCCL diff --git a/cpp/tests/CMakeLists.txt b/cpp/tests/CMakeLists.txt index 91c97b310ae..b7826bceeec 100644 --- a/cpp/tests/CMakeLists.txt +++ b/cpp/tests/CMakeLists.txt @@ -60,7 +60,6 @@ target_include_directories(cugraphmgtestutil target_link_libraries(cugraphmgtestutil PUBLIC - cuco::cuco cugraph::cugraph NCCL::NCCL ) @@ -78,7 +77,6 @@ function(ConfigureTest CMAKE_TEST_NAME) GTest::gtest GTest::gtest_main NCCL::NCCL - cuco::cuco ) if(OpenMP_CXX_FOUND) @@ -157,7 +155,6 @@ function(ConfigureTestMG CMAKE_TEST_NAME) GTest::gtest_main NCCL::NCCL MPI::MPI_CXX - cuco::cuco ) if(OpenMP_CXX_FOUND) @@ -240,7 +237,6 @@ function(ConfigureCTest CMAKE_TEST_NAME) cugraph_c_testutil GTest::gtest GTest::gtest_main - cuco::cuco ) add_test(NAME ${CMAKE_TEST_NAME} COMMAND ${CMAKE_TEST_NAME}) @@ -267,7 +263,6 @@ function(ConfigureCTestMG CMAKE_TEST_NAME) GTest::gtest_main NCCL::NCCL MPI::MPI_CXX - cuco::cuco ) add_test(NAME ${CMAKE_TEST_NAME} From 0b620eb74af8fc9a791b7f3b7e780f4f5a54ba39 Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Mon, 21 Mar 2022 19:40:17 -0400 Subject: [PATCH 03/12] Adding thrust back to cugraph --- cpp/CMakeLists.txt | 2 ++ cpp/cmake/thirdparty/get_thrust.cmake | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 cpp/cmake/thirdparty/get_thrust.cmake diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index f06307d3afa..b427abe5847 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -146,6 +146,7 @@ rapids_cpm_init() # Putting this before raft to override RAFT from pulling them in. include(cmake/thirdparty/get_libcudacxx.cmake) include(cmake/thirdparty/get_cuco.cmake) +include(cmake/thirdparty/get_thrust.cmake) include(cmake/thirdparty/get_raft.cmake) include(cmake/thirdparty/get_libcugraphops.cmake) @@ -293,6 +294,7 @@ target_link_libraries(cugraph PRIVATE raft::raft cuco::cuco + Thrust::Thrust cugraph::cuHornet NCCL::NCCL ) diff --git a/cpp/cmake/thirdparty/get_thrust.cmake b/cpp/cmake/thirdparty/get_thrust.cmake new file mode 100644 index 00000000000..81353b53db2 --- /dev/null +++ b/cpp/cmake/thirdparty/get_thrust.cmake @@ -0,0 +1,23 @@ +# ============================================================================= +# 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. +# ============================================================================= + +# Use CPM to find or clone thrust +function(find_and_configure_thrust) + include(${rapids-cmake-dir}/cpm/thrust.cmake) + + rapids_cpm_thrust() + rapids_export_package(BUILD thrust cugraph-exports) +endfunction() + +find_and_configure_thrust() From b9c8921d8253be3799c25664f792459ddbad918d Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Mon, 21 Mar 2022 20:55:51 -0400 Subject: [PATCH 04/12] Overriding thrust --- cpp/CMakeLists.txt | 4 ++-- cpp/cmake/thirdparty/get_thrust.cmake | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index b427abe5847..2d20f997fec 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -144,9 +144,9 @@ rapids_cpm_init() ### # Putting this before raft to override RAFT from pulling them in. +include(cmake/thirdparty/get_thrust.cmake) include(cmake/thirdparty/get_libcudacxx.cmake) include(cmake/thirdparty/get_cuco.cmake) -include(cmake/thirdparty/get_thrust.cmake) include(cmake/thirdparty/get_raft.cmake) include(cmake/thirdparty/get_libcugraphops.cmake) @@ -294,7 +294,7 @@ target_link_libraries(cugraph PRIVATE raft::raft cuco::cuco - Thrust::Thrust + cugraph::Thrust cugraph::cuHornet NCCL::NCCL ) diff --git a/cpp/cmake/thirdparty/get_thrust.cmake b/cpp/cmake/thirdparty/get_thrust.cmake index 81353b53db2..2a9dc97db4d 100644 --- a/cpp/cmake/thirdparty/get_thrust.cmake +++ b/cpp/cmake/thirdparty/get_thrust.cmake @@ -16,7 +16,7 @@ function(find_and_configure_thrust) include(${rapids-cmake-dir}/cpm/thrust.cmake) - rapids_cpm_thrust() + rapids_cpm_thrust(NAMESPACE cugraph) rapids_export_package(BUILD thrust cugraph-exports) endfunction() From fbc758f59a8ae67123af2680bc895714cdac4608 Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Mon, 21 Mar 2022 22:23:10 -0400 Subject: [PATCH 05/12] Adding get_rmm.cmake --- cpp/CMakeLists.txt | 1 + cpp/cmake/thirdparty/get_rmm.cmake | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 cpp/cmake/thirdparty/get_rmm.cmake diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 2d20f997fec..66fef66578e 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -145,6 +145,7 @@ rapids_cpm_init() # Putting this before raft to override RAFT from pulling them in. include(cmake/thirdparty/get_thrust.cmake) +include(cmake/thirdparty/get_rmm.cmake) include(cmake/thirdparty/get_libcudacxx.cmake) include(cmake/thirdparty/get_cuco.cmake) diff --git a/cpp/cmake/thirdparty/get_rmm.cmake b/cpp/cmake/thirdparty/get_rmm.cmake new file mode 100644 index 00000000000..d97985e9a99 --- /dev/null +++ b/cpp/cmake/thirdparty/get_rmm.cmake @@ -0,0 +1,22 @@ +#============================================================================= +# 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_rmm) + include(${rapids-cmake-dir}/cpm/rmm.cmake) + rapids_cpm_rmm(BUILD_EXPORT_SET cugraph-exports) +endfunction() + +find_and_configure_rmm() From a20794c10c91140906cb596ed782f37e982546a9 Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Mon, 21 Mar 2022 23:57:33 -0400 Subject: [PATCH 06/12] Updating thrust target name --- cpp/cmake/thirdparty/get_thrust.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/cmake/thirdparty/get_thrust.cmake b/cpp/cmake/thirdparty/get_thrust.cmake index 2a9dc97db4d..60fd7313ec0 100644 --- a/cpp/cmake/thirdparty/get_thrust.cmake +++ b/cpp/cmake/thirdparty/get_thrust.cmake @@ -17,7 +17,7 @@ function(find_and_configure_thrust) include(${rapids-cmake-dir}/cpm/thrust.cmake) rapids_cpm_thrust(NAMESPACE cugraph) - rapids_export_package(BUILD thrust cugraph-exports) + rapids_export_package(BUILD Thrust cugraph-exports) endfunction() find_and_configure_thrust() From 143c126f386f648c70d5efd914ed451c8276222d Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Tue, 22 Mar 2022 10:10:50 -0400 Subject: [PATCH 07/12] Adding raft::raft to tests and other targets --- cpp/CMakeLists.txt | 1 + cpp/tests/CMakeLists.txt | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 66fef66578e..2f44f130012 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -405,6 +405,7 @@ target_link_libraries(cugraph_c CUDA::cusolver CUDA::cusparse PRIVATE + raft::raft cuco::cuco cugraph::cugraph ) diff --git a/cpp/tests/CMakeLists.txt b/cpp/tests/CMakeLists.txt index b7826bceeec..ffe03757f16 100644 --- a/cpp/tests/CMakeLists.txt +++ b/cpp/tests/CMakeLists.txt @@ -41,6 +41,7 @@ target_include_directories(cugraphtestutil target_link_libraries(cugraphtestutil PUBLIC + raft::raft cugraph::cugraph NCCL::NCCL ) @@ -72,6 +73,7 @@ function(ConfigureTest CMAKE_TEST_NAME) target_link_libraries(${CMAKE_TEST_NAME} PRIVATE + raft::raft cugraphtestutil cugraph::cugraph GTest::gtest @@ -148,6 +150,7 @@ function(ConfigureTestMG CMAKE_TEST_NAME) target_link_libraries(${CMAKE_TEST_NAME} PRIVATE + raft::raft cugraphmgtestutil cugraphtestutil cugraph::cugraph @@ -233,6 +236,7 @@ function(ConfigureCTest CMAKE_TEST_NAME) target_link_libraries(${CMAKE_TEST_NAME} PRIVATE + raft::raft cugraph::cugraph_c cugraph_c_testutil GTest::gtest @@ -257,6 +261,7 @@ function(ConfigureCTestMG CMAKE_TEST_NAME) target_link_libraries(${CMAKE_TEST_NAME} PRIVATE + raft::raft cugraph::cugraph_c cugraph_c_testutil GTest::gtest From 87f76faac8f5b90e23161a5ecd03a98d17ce271f Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Tue, 22 Mar 2022 10:37:01 -0400 Subject: [PATCH 08/12] Adding thrust as explicit dependency --- cpp/CMakeLists.txt | 2 ++ cpp/tests/CMakeLists.txt | 3 +++ 2 files changed, 5 insertions(+) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 2f44f130012..8252fc3f0bb 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -294,6 +294,7 @@ target_link_libraries(cugraph cugraphops::cugraphops PRIVATE raft::raft + cugraph::Thrust cuco::cuco cugraph::Thrust cugraph::cuHornet @@ -405,6 +406,7 @@ target_link_libraries(cugraph_c CUDA::cusolver CUDA::cusparse PRIVATE + cugraph::Thrust raft::raft cuco::cuco cugraph::cugraph diff --git a/cpp/tests/CMakeLists.txt b/cpp/tests/CMakeLists.txt index ffe03757f16..e18dec29cfc 100644 --- a/cpp/tests/CMakeLists.txt +++ b/cpp/tests/CMakeLists.txt @@ -74,6 +74,7 @@ function(ConfigureTest CMAKE_TEST_NAME) target_link_libraries(${CMAKE_TEST_NAME} PRIVATE raft::raft + cugraph::Thrust cugraphtestutil cugraph::cugraph GTest::gtest @@ -151,6 +152,7 @@ function(ConfigureTestMG CMAKE_TEST_NAME) target_link_libraries(${CMAKE_TEST_NAME} PRIVATE raft::raft + cugraph::Thrust cugraphmgtestutil cugraphtestutil cugraph::cugraph @@ -262,6 +264,7 @@ function(ConfigureCTestMG CMAKE_TEST_NAME) target_link_libraries(${CMAKE_TEST_NAME} PRIVATE raft::raft + cugraph::Thrust cugraph::cugraph_c cugraph_c_testutil GTest::gtest From c31a3e3d52643df83c1ebe5a02aac8f05e0804a2 Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Tue, 22 Mar 2022 11:30:14 -0400 Subject: [PATCH 09/12] Adding more cugraph::Thrust --- cpp/CMakeLists.txt | 1 - cpp/tests/CMakeLists.txt | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 8252fc3f0bb..52eeae000a9 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -294,7 +294,6 @@ target_link_libraries(cugraph cugraphops::cugraphops PRIVATE raft::raft - cugraph::Thrust cuco::cuco cugraph::Thrust cugraph::cuHornet diff --git a/cpp/tests/CMakeLists.txt b/cpp/tests/CMakeLists.txt index e18dec29cfc..ab9a986f87c 100644 --- a/cpp/tests/CMakeLists.txt +++ b/cpp/tests/CMakeLists.txt @@ -42,6 +42,7 @@ target_include_directories(cugraphtestutil target_link_libraries(cugraphtestutil PUBLIC raft::raft + cugraph::Thrust cugraph::cugraph NCCL::NCCL ) @@ -61,6 +62,7 @@ target_include_directories(cugraphmgtestutil target_link_libraries(cugraphmgtestutil PUBLIC + cugraph::Thrust cugraph::cugraph NCCL::NCCL ) @@ -239,6 +241,7 @@ function(ConfigureCTest CMAKE_TEST_NAME) target_link_libraries(${CMAKE_TEST_NAME} PRIVATE raft::raft + cugraph::Thrust cugraph::cugraph_c cugraph_c_testutil GTest::gtest From 2005981ea80c8ee32c61c22a80aa730aadd51a52 Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Tue, 22 Mar 2022 15:06:54 -0400 Subject: [PATCH 10/12] Raft back to public dep --- cpp/CMakeLists.txt | 4 ++-- cpp/cmake/thirdparty/get_raft.cmake | 1 + cpp/tests/CMakeLists.txt | 11 ----------- 3 files changed, 3 insertions(+), 13 deletions(-) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 52eeae000a9..85e6df5d774 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -292,10 +292,10 @@ target_include_directories(cugraph target_link_libraries(cugraph PUBLIC cugraphops::cugraphops - PRIVATE raft::raft cuco::cuco cugraph::Thrust + PRIVATE cugraph::cuHornet NCCL::NCCL ) @@ -404,10 +404,10 @@ target_link_libraries(cugraph_c CUDA::curand CUDA::cusolver CUDA::cusparse - PRIVATE cugraph::Thrust raft::raft cuco::cuco + PRIVATE cugraph::cugraph ) diff --git a/cpp/cmake/thirdparty/get_raft.cmake b/cpp/cmake/thirdparty/get_raft.cmake index 9abf0d5d431..a89c661d1c4 100644 --- a/cpp/cmake/thirdparty/get_raft.cmake +++ b/cpp/cmake/thirdparty/get_raft.cmake @@ -32,6 +32,7 @@ function(find_and_configure_raft) BUILD_EXPORT_SET cugraph-exports INSTALL_EXPORT_SET cugraph-exports CPM_ARGS + EXCLUDE_FROM_ALL TRUE GIT_REPOSITORY https://github.com/${PKG_FORK}/raft.git GIT_TAG ${PKG_PINNED_TAG} SOURCE_SUBDIR cpp diff --git a/cpp/tests/CMakeLists.txt b/cpp/tests/CMakeLists.txt index ab9a986f87c..b7826bceeec 100644 --- a/cpp/tests/CMakeLists.txt +++ b/cpp/tests/CMakeLists.txt @@ -41,8 +41,6 @@ target_include_directories(cugraphtestutil target_link_libraries(cugraphtestutil PUBLIC - raft::raft - cugraph::Thrust cugraph::cugraph NCCL::NCCL ) @@ -62,7 +60,6 @@ target_include_directories(cugraphmgtestutil target_link_libraries(cugraphmgtestutil PUBLIC - cugraph::Thrust cugraph::cugraph NCCL::NCCL ) @@ -75,8 +72,6 @@ function(ConfigureTest CMAKE_TEST_NAME) target_link_libraries(${CMAKE_TEST_NAME} PRIVATE - raft::raft - cugraph::Thrust cugraphtestutil cugraph::cugraph GTest::gtest @@ -153,8 +148,6 @@ function(ConfigureTestMG CMAKE_TEST_NAME) target_link_libraries(${CMAKE_TEST_NAME} PRIVATE - raft::raft - cugraph::Thrust cugraphmgtestutil cugraphtestutil cugraph::cugraph @@ -240,8 +233,6 @@ function(ConfigureCTest CMAKE_TEST_NAME) target_link_libraries(${CMAKE_TEST_NAME} PRIVATE - raft::raft - cugraph::Thrust cugraph::cugraph_c cugraph_c_testutil GTest::gtest @@ -266,8 +257,6 @@ function(ConfigureCTestMG CMAKE_TEST_NAME) target_link_libraries(${CMAKE_TEST_NAME} PRIVATE - raft::raft - cugraph::Thrust cugraph::cugraph_c cugraph_c_testutil GTest::gtest From 684eec35d089397545f694d0435bd302f16027d0 Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Wed, 23 Mar 2022 14:12:37 -0400 Subject: [PATCH 11/12] Using raft pin to turn off cuco depenency in RAFT --- cpp/CMakeLists.txt | 3 --- cpp/cmake/thirdparty/get_raft.cmake | 4 ++-- cpp/cmake/thirdparty/get_rmm.cmake | 22 ---------------------- cpp/cmake/thirdparty/get_thrust.cmake | 23 ----------------------- 4 files changed, 2 insertions(+), 50 deletions(-) delete mode 100644 cpp/cmake/thirdparty/get_rmm.cmake delete mode 100644 cpp/cmake/thirdparty/get_thrust.cmake diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 85e6df5d774..e70e4860b02 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -144,8 +144,6 @@ rapids_cpm_init() ### # Putting this before raft to override RAFT from pulling them in. -include(cmake/thirdparty/get_thrust.cmake) -include(cmake/thirdparty/get_rmm.cmake) include(cmake/thirdparty/get_libcudacxx.cmake) include(cmake/thirdparty/get_cuco.cmake) @@ -294,7 +292,6 @@ target_link_libraries(cugraph cugraphops::cugraphops raft::raft cuco::cuco - cugraph::Thrust PRIVATE cugraph::cuHornet NCCL::NCCL diff --git a/cpp/cmake/thirdparty/get_raft.cmake b/cpp/cmake/thirdparty/get_raft.cmake index a89c661d1c4..f9eb9e44fa4 100644 --- a/cpp/cmake/thirdparty/get_raft.cmake +++ b/cpp/cmake/thirdparty/get_raft.cmake @@ -55,8 +55,8 @@ endfunction() # 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 cjnolet + PINNED_TAG build_2206_cuco_distance_component # When PINNED_TAG above doesn't match cugraph, # force local raft clone in build directory diff --git a/cpp/cmake/thirdparty/get_rmm.cmake b/cpp/cmake/thirdparty/get_rmm.cmake deleted file mode 100644 index d97985e9a99..00000000000 --- a/cpp/cmake/thirdparty/get_rmm.cmake +++ /dev/null @@ -1,22 +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_rmm) - include(${rapids-cmake-dir}/cpm/rmm.cmake) - rapids_cpm_rmm(BUILD_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 60fd7313ec0..00000000000 --- a/cpp/cmake/thirdparty/get_thrust.cmake +++ /dev/null @@ -1,23 +0,0 @@ -# ============================================================================= -# 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. -# ============================================================================= - -# Use CPM to find or clone thrust -function(find_and_configure_thrust) - include(${rapids-cmake-dir}/cpm/thrust.cmake) - - rapids_cpm_thrust(NAMESPACE cugraph) - rapids_export_package(BUILD Thrust cugraph-exports) -endfunction() - -find_and_configure_thrust() From 14ad3d296a6e681d77916c1dd3f43631e853c74c Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Wed, 23 Mar 2022 14:45:46 -0400 Subject: [PATCH 12/12] Removing references to cugraph::Thrust --- cpp/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index e70e4860b02..5aeb6c09944 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -401,7 +401,6 @@ target_link_libraries(cugraph_c CUDA::curand CUDA::cusolver CUDA::cusparse - cugraph::Thrust raft::raft cuco::cuco PRIVATE