From 090ef76ac492e13f5f88f46fbbbb4b37375fb5f6 Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Fri, 1 Dec 2023 17:01:01 -0600 Subject: [PATCH 01/13] Build with CCCL 2.2.0. --- fetch_rapids.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fetch_rapids.cmake b/fetch_rapids.cmake index 86d447acb..a40ecd3db 100644 --- a/fetch_rapids.cmake +++ b/fetch_rapids.cmake @@ -11,6 +11,8 @@ # or implied. See the License for the specific language governing permissions and limitations under # the License. # ============================================================================= +set(rapids-cmake-repo bdice/rapids-cmake) +set(rapids-cmake-branch rapids_cpm_cccl) if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/RMM_RAPIDS.cmake) file(DOWNLOAD https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-24.02/RAPIDS.cmake ${CMAKE_CURRENT_BINARY_DIR}/RMM_RAPIDS.cmake) From 2a3f87ba9b54e1df85686d42a3977d56aad8f3f4 Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Fri, 1 Dec 2023 17:04:42 -0600 Subject: [PATCH 02/13] Build with CCCL 2.2.0. --- CMakeLists.txt | 3 +-- .../{get_thrust.cmake => get_cccl.cmake} | 10 ++++---- cmake/thirdparty/get_libcudacxx.cmake | 23 ------------------- 3 files changed, 6 insertions(+), 30 deletions(-) rename cmake/thirdparty/{get_thrust.cmake => get_cccl.cmake} (82%) delete mode 100644 cmake/thirdparty/get_libcudacxx.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 795969a5c..8f1ae8cda 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -70,8 +70,7 @@ rapids_cpm_init() include(cmake/thirdparty/get_fmt.cmake) include(cmake/thirdparty/get_spdlog.cmake) -include(cmake/thirdparty/get_libcudacxx.cmake) -include(cmake/thirdparty/get_thrust.cmake) +include(cmake/thirdparty/get_cccl.cmake) # ################################################################################################## # * library targets -------------------------------------------------------------------------------- diff --git a/cmake/thirdparty/get_thrust.cmake b/cmake/thirdparty/get_cccl.cmake similarity index 82% rename from cmake/thirdparty/get_thrust.cmake rename to cmake/thirdparty/get_cccl.cmake index f4125e512..f19d2e882 100644 --- a/cmake/thirdparty/get_thrust.cmake +++ b/cmake/thirdparty/get_cccl.cmake @@ -1,5 +1,5 @@ # ============================================================================= -# Copyright (c) 2021, NVIDIA CORPORATION. +# 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 @@ -13,14 +13,14 @@ # ============================================================================= # Use CPM to find or clone thrust -function(find_and_configure_thrust) +function(find_and_configure_cccl) - include(${rapids-cmake-dir}/cpm/thrust.cmake) - rapids_cpm_thrust( + include(${rapids-cmake-dir}/cpm/cccl.cmake) + rapids_cpm_cccl( NAMESPACE rmm BUILD_EXPORT_SET rmm-exports INSTALL_EXPORT_SET rmm-exports) endfunction() -find_and_configure_thrust() +find_and_configure_cccl() diff --git a/cmake/thirdparty/get_libcudacxx.cmake b/cmake/thirdparty/get_libcudacxx.cmake deleted file mode 100644 index 14b0d492f..000000000 --- a/cmake/thirdparty/get_libcudacxx.cmake +++ /dev/null @@ -1,23 +0,0 @@ -# ============================================================================= -# 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. -# ============================================================================= - -# Use CPM to find or clone libcudacxx -function(find_and_configure_libcudacxx) - - include(${rapids-cmake-dir}/cpm/libcudacxx.cmake) - rapids_cpm_libcudacxx(BUILD_EXPORT_SET rmm-exports INSTALL_EXPORT_SET rmm-exports) - -endfunction() - -find_and_configure_libcudacxx() From 19e22cc5cac7aa99e9ee5849c57ad941d23c7929 Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Tue, 5 Dec 2023 11:49:05 -0600 Subject: [PATCH 03/13] Remove namespace. --- CMakeLists.txt | 2 +- cmake/thirdparty/get_cccl.cmake | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8f1ae8cda..89ee77029 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -90,7 +90,7 @@ else() endif() target_link_libraries(rmm INTERFACE libcudacxx::libcudacxx) -target_link_libraries(rmm INTERFACE rmm::Thrust) +target_link_libraries(rmm INTERFACE CCCL::Thrust) target_link_libraries(rmm INTERFACE fmt::fmt-header-only) target_link_libraries(rmm INTERFACE spdlog::spdlog_header_only) target_link_libraries(rmm INTERFACE dl) diff --git a/cmake/thirdparty/get_cccl.cmake b/cmake/thirdparty/get_cccl.cmake index f19d2e882..9e92bb211 100644 --- a/cmake/thirdparty/get_cccl.cmake +++ b/cmake/thirdparty/get_cccl.cmake @@ -17,7 +17,6 @@ function(find_and_configure_cccl) include(${rapids-cmake-dir}/cpm/cccl.cmake) rapids_cpm_cccl( - NAMESPACE rmm BUILD_EXPORT_SET rmm-exports INSTALL_EXPORT_SET rmm-exports) From 7a8d656de4657e7681b5ea6a7dbe528d4ce997c8 Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Thu, 7 Dec 2023 11:43:11 -0600 Subject: [PATCH 04/13] Remove testing changes. --- fetch_rapids.cmake | 2 -- 1 file changed, 2 deletions(-) diff --git a/fetch_rapids.cmake b/fetch_rapids.cmake index a40ecd3db..86d447acb 100644 --- a/fetch_rapids.cmake +++ b/fetch_rapids.cmake @@ -11,8 +11,6 @@ # or implied. See the License for the specific language governing permissions and limitations under # the License. # ============================================================================= -set(rapids-cmake-repo bdice/rapids-cmake) -set(rapids-cmake-branch rapids_cpm_cccl) if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/RMM_RAPIDS.cmake) file(DOWNLOAD https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-24.02/RAPIDS.cmake ${CMAKE_CURRENT_BINARY_DIR}/RMM_RAPIDS.cmake) From bb5782a89fd939ebc0dce40d1c7f0f6d98c27313 Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Sun, 10 Dec 2023 21:50:13 -0600 Subject: [PATCH 05/13] Fix cmake-format. --- cmake/thirdparty/get_cccl.cmake | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cmake/thirdparty/get_cccl.cmake b/cmake/thirdparty/get_cccl.cmake index 9e92bb211..3074f9ded 100644 --- a/cmake/thirdparty/get_cccl.cmake +++ b/cmake/thirdparty/get_cccl.cmake @@ -16,9 +16,7 @@ function(find_and_configure_cccl) include(${rapids-cmake-dir}/cpm/cccl.cmake) - rapids_cpm_cccl( - BUILD_EXPORT_SET rmm-exports - INSTALL_EXPORT_SET rmm-exports) + rapids_cpm_cccl(BUILD_EXPORT_SET rmm-exports INSTALL_EXPORT_SET rmm-exports) endfunction() From 310d02e35cbfb41686ceba7a8092afa4b675337b Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Sun, 10 Dec 2023 22:15:17 -0600 Subject: [PATCH 06/13] Update leftover CMake references to Thrust. --- CMakeLists.txt | 15 +++------------ scripts/load-pretty-printers.in | 2 +- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 89ee77029..17732fc0a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -151,20 +151,12 @@ The goal of the [RMM](https://github.com/rapidsai/rmm) is to provide: A collection of data structures that use the interface for memory allocation ]=]) -set(code_string - [=[ -if(NOT TARGET rmm::Thrust) - thrust_create_target(rmm::Thrust FROM_OPTIONS) -endif() -]=]) - rapids_export( INSTALL rmm EXPORT_SET rmm-exports GLOBAL_TARGETS rmm NAMESPACE rmm:: - DOCUMENTATION doc_string - FINAL_CODE_BLOCK code_string) + DOCUMENTATION doc_string) # ################################################################################################## # * build export ----------------------------------------------------------------------------------- @@ -174,8 +166,7 @@ rapids_export( EXPORT_SET rmm-exports GLOBAL_TARGETS rmm NAMESPACE rmm:: - DOCUMENTATION doc_string - FINAL_CODE_BLOCK code_string) + DOCUMENTATION doc_string) # ################################################################################################## # * make documentation ----------------------------------------------------------------------------- @@ -196,6 +187,6 @@ add_custom_target( # * make gdb helper scripts ------------------------------------------------------------------------ # optionally assemble Thrust pretty-printers -if(Thrust_SOURCE_DIR) +if(CCCL_SOURCE_DIR) configure_file(scripts/load-pretty-printers.in load-pretty-printers @ONLY) endif() diff --git a/scripts/load-pretty-printers.in b/scripts/load-pretty-printers.in index bd59968cc..a473bc5ad 100644 --- a/scripts/load-pretty-printers.in +++ b/scripts/load-pretty-printers.in @@ -1,2 +1,2 @@ -source @Thrust_SOURCE_DIR@/scripts/gdb-pretty-printers.py +source @CCCL_SOURCE_DIR@/thrust/scripts/gdb-pretty-printers.py source @PROJECT_SOURCE_DIR@/scripts/gdb-pretty-printers.py From c75120b28cafbb9486716ff8594f25ac662e378f Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Sun, 10 Dec 2023 22:16:59 -0600 Subject: [PATCH 07/13] Fix name. --- cmake/thirdparty/get_cccl.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/thirdparty/get_cccl.cmake b/cmake/thirdparty/get_cccl.cmake index 3074f9ded..ca6a8654e 100644 --- a/cmake/thirdparty/get_cccl.cmake +++ b/cmake/thirdparty/get_cccl.cmake @@ -12,7 +12,7 @@ # the License. # ============================================================================= -# Use CPM to find or clone thrust +# Use CPM to find or clone CCCL function(find_and_configure_cccl) include(${rapids-cmake-dir}/cpm/cccl.cmake) From 716e5b94c2bc3c164fb4610a4bb787bd38bbe5d5 Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Mon, 11 Dec 2023 10:58:03 -0600 Subject: [PATCH 08/13] Update target_link_libraries. --- CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 17732fc0a..744307a06 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -89,8 +89,7 @@ else() target_link_libraries(rmm INTERFACE CUDA::cudart) endif() -target_link_libraries(rmm INTERFACE libcudacxx::libcudacxx) -target_link_libraries(rmm INTERFACE CCCL::Thrust) +target_link_libraries(rmm INTERFACE CCCL::CCCL) target_link_libraries(rmm INTERFACE fmt::fmt-header-only) target_link_libraries(rmm INTERFACE spdlog::spdlog_header_only) target_link_libraries(rmm INTERFACE dl) From 778678848f433efeb3341e340b08abac6e1d7acb Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Mon, 11 Dec 2023 16:03:19 -0800 Subject: [PATCH 09/13] Try CCCL_TOPLEVEL_PROJECT. --- fetch_rapids.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fetch_rapids.cmake b/fetch_rapids.cmake index 86d447acb..b88a4dae4 100644 --- a/fetch_rapids.cmake +++ b/fetch_rapids.cmake @@ -11,6 +11,8 @@ # or implied. See the License for the specific language governing permissions and limitations under # the License. # ============================================================================= +set(rapids-cmake-repo bdice/rapids-cmake) +set(rapids-cmake-branch cccl-toplevel) if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/RMM_RAPIDS.cmake) file(DOWNLOAD https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-24.02/RAPIDS.cmake ${CMAKE_CURRENT_BINARY_DIR}/RMM_RAPIDS.cmake) From 536fd9948a40cbbb45faa7a5d45fc3d5d2a684b3 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Tue, 12 Dec 2023 18:15:15 -0800 Subject: [PATCH 10/13] Test manual component install --- fetch_rapids.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fetch_rapids.cmake b/fetch_rapids.cmake index b88a4dae4..4cfe130d2 100644 --- a/fetch_rapids.cmake +++ b/fetch_rapids.cmake @@ -11,8 +11,8 @@ # or implied. See the License for the specific language governing permissions and limitations under # the License. # ============================================================================= -set(rapids-cmake-repo bdice/rapids-cmake) -set(rapids-cmake-branch cccl-toplevel) +set(rapids-cmake-repo vyasr/rapids-cmake) +set(rapids-cmake-branch fix/cccl_component_install) if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/RMM_RAPIDS.cmake) file(DOWNLOAD https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-24.02/RAPIDS.cmake ${CMAKE_CURRENT_BINARY_DIR}/RMM_RAPIDS.cmake) From 0c7be894a7262cccd38226d12007bbb6a10fa330 Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Wed, 13 Dec 2023 18:33:03 -0600 Subject: [PATCH 11/13] Revert testing changes. --- fetch_rapids.cmake | 2 -- 1 file changed, 2 deletions(-) diff --git a/fetch_rapids.cmake b/fetch_rapids.cmake index 4cfe130d2..86d447acb 100644 --- a/fetch_rapids.cmake +++ b/fetch_rapids.cmake @@ -11,8 +11,6 @@ # or implied. See the License for the specific language governing permissions and limitations under # the License. # ============================================================================= -set(rapids-cmake-repo vyasr/rapids-cmake) -set(rapids-cmake-branch fix/cccl_component_install) if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/RMM_RAPIDS.cmake) file(DOWNLOAD https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-24.02/RAPIDS.cmake ${CMAKE_CURRENT_BINARY_DIR}/RMM_RAPIDS.cmake) From 6e5757ad95297c73e066319e1ee4b80c9a7406e1 Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Mon, 18 Dec 2023 20:44:30 -0800 Subject: [PATCH 12/13] Use cuCollections built with CCCL 2.2.0. --- fetch_rapids.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fetch_rapids.cmake b/fetch_rapids.cmake index 86d447acb..51484f029 100644 --- a/fetch_rapids.cmake +++ b/fetch_rapids.cmake @@ -11,6 +11,8 @@ # or implied. See the License for the specific language governing permissions and limitations under # the License. # ============================================================================= +set(rapids-cmake-repo bdice/rapids-cmake) +set(rapids-cmake-branch cuco-cccl-2.2.0) if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/RMM_RAPIDS.cmake) file(DOWNLOAD https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-24.02/RAPIDS.cmake ${CMAKE_CURRENT_BINARY_DIR}/RMM_RAPIDS.cmake) From a878022d066e003bf8a37b7ad3abf9ba983b5dff Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Tue, 19 Dec 2023 07:42:57 -0800 Subject: [PATCH 13/13] Revert testing changes. --- fetch_rapids.cmake | 2 -- 1 file changed, 2 deletions(-) diff --git a/fetch_rapids.cmake b/fetch_rapids.cmake index 51484f029..86d447acb 100644 --- a/fetch_rapids.cmake +++ b/fetch_rapids.cmake @@ -11,8 +11,6 @@ # or implied. See the License for the specific language governing permissions and limitations under # the License. # ============================================================================= -set(rapids-cmake-repo bdice/rapids-cmake) -set(rapids-cmake-branch cuco-cccl-2.2.0) if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/RMM_RAPIDS.cmake) file(DOWNLOAD https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-24.02/RAPIDS.cmake ${CMAKE_CURRENT_BINARY_DIR}/RMM_RAPIDS.cmake)