From 2962169ebf1fdd2f104c734058c06c5b5442fdfb Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Tue, 19 Dec 2023 14:48:31 -0600 Subject: [PATCH] Update to CCCL 2.2.0. (#2049) This PR updates RAFT to CCCL 2.2.0. Do not merge until all of RAPIDS is ready to update. Depends on #2048. Replaces #1464. Authors: - Bradley Dice (https://github.com/bdice) Approvers: - Vyas Ramasubramani (https://github.com/vyasr) - Robert Maynard (https://github.com/robertmaynard) URL: https://github.com/rapidsai/raft/pull/2049 --- cpp/CMakeLists.txt | 16 +++------------- .../{get_thrust.cmake => get_cccl.cmake} | 13 +++++-------- 2 files changed, 8 insertions(+), 21 deletions(-) rename cpp/cmake/thirdparty/{get_thrust.cmake => get_cccl.cmake} (70%) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index bccbc8c471..dbce46abfe 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -177,8 +177,8 @@ include(cmake/modules/ConfigureCUDA.cmake) rapids_cpm_init() if(NOT BUILD_CPU_ONLY) - # thrust before rmm/cuco so we get the right version of thrust/cub - include(cmake/thirdparty/get_thrust.cmake) + # CCCL before rmm/cuco so we get the right version of CCCL + include(cmake/thirdparty/get_cccl.cmake) include(cmake/thirdparty/get_rmm.cmake) include(cmake/thirdparty/get_cutlass.cmake) @@ -206,7 +206,7 @@ target_include_directories( if(NOT BUILD_CPU_ONLY) # Keep RAFT as lightweight as possible. Only CUDA libs and rmm should be used in global target. - target_link_libraries(raft INTERFACE rmm::rmm cuco::cuco nvidia::cutlass::cutlass raft::Thrust) + target_link_libraries(raft INTERFACE rmm::rmm cuco::cuco nvidia::cutlass::cutlass CCCL::CCCL) endif() target_compile_features(raft INTERFACE cxx_std_17 $) @@ -628,16 +628,6 @@ Imported Targets: set(code_string ${nvtx_export_string}) -string( - APPEND - code_string - [=[ -if(NOT TARGET raft::Thrust) - thrust_create_target(raft::Thrust FROM_OPTIONS) -endif() -]=] -) - string( APPEND code_string diff --git a/cpp/cmake/thirdparty/get_thrust.cmake b/cpp/cmake/thirdparty/get_cccl.cmake similarity index 70% rename from cpp/cmake/thirdparty/get_thrust.cmake rename to cpp/cmake/thirdparty/get_cccl.cmake index 6e37aab40d..c608ee4630 100644 --- a/cpp/cmake/thirdparty/get_thrust.cmake +++ b/cpp/cmake/thirdparty/get_cccl.cmake @@ -12,13 +12,10 @@ # 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 raft - BUILD_EXPORT_SET raft-exports - INSTALL_EXPORT_SET raft-exports) +# Use CPM to find or clone CCCL +function(find_and_configure_cccl) + include(${rapids-cmake-dir}/cpm/cccl.cmake) + rapids_cpm_cccl(BUILD_EXPORT_SET raft-exports INSTALL_EXPORT_SET raft-exports) endfunction() -find_and_configure_thrust() +find_and_configure_cccl()