From 9015bfddd918218a5cf954b437116fe094371337 Mon Sep 17 00:00:00 2001 From: Yunsong Wang Date: Mon, 5 Feb 2024 12:45:44 -0800 Subject: [PATCH 1/4] Custom cuco version --- fetch_rapids.cmake | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/fetch_rapids.cmake b/fetch_rapids.cmake index 1dca136c97..f5cd8dee77 100644 --- a/fetch_rapids.cmake +++ b/fetch_rapids.cmake @@ -1,5 +1,5 @@ # ============================================================================= -# Copyright (c) 2022-2023, NVIDIA CORPORATION. +# Copyright (c) 2022-2024, 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 @@ -11,10 +11,13 @@ # or implied. See the License for the specific language governing permissions and limitations under # the License. # ============================================================================= + +set(rapids-cmake-repo PointKernel/rapids-cmake) +set(rapids-cmake-branch cuco-experimental) + if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/RAFT_RAPIDS.cmake) file(DOWNLOAD https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-24.04/RAPIDS.cmake ${CMAKE_CURRENT_BINARY_DIR}/RAFT_RAPIDS.cmake ) endif() - include(${CMAKE_CURRENT_BINARY_DIR}/RAFT_RAPIDS.cmake) From 204a5424910314926d8d9694a8c62585e06fc665 Mon Sep 17 00:00:00 2001 From: Yunsong Wang Date: Mon, 5 Feb 2024 13:04:47 -0800 Subject: [PATCH 2/4] Update cuco-related code --- .../detail/coo_spmv_strategies/hash_strategy.cuh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cpp/include/raft/sparse/distance/detail/coo_spmv_strategies/hash_strategy.cuh b/cpp/include/raft/sparse/distance/detail/coo_spmv_strategies/hash_strategy.cuh index d21ae29a34..6f11a73002 100644 --- a/cpp/include/raft/sparse/distance/detail/coo_spmv_strategies/hash_strategy.cuh +++ b/cpp/include/raft/sparse/distance/detail/coo_spmv_strategies/hash_strategy.cuh @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2023, NVIDIA CORPORATION. + * Copyright (c) 2021-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -43,11 +43,11 @@ namespace detail { template class hash_strategy : public coo_spmv_strategy { public: - using insert_type = - typename cuco::static_map::device_mutable_view; + using insert_type = typename cuco::experimental:: + static_map::device_mutable_view; using smem_type = typename insert_type::slot_type*; - using find_type = - typename cuco::static_map::device_view; + using find_type = typename cuco::experimental:: + static_map::device_view; hash_strategy(const distances_config_t& config_, float capacity_threshold_ = 0.5, From 3334de7c9688b2558176ba82f05325f5d69ece4e Mon Sep 17 00:00:00 2001 From: Yunsong Wang Date: Mon, 5 Feb 2024 15:48:47 -0800 Subject: [PATCH 3/4] Fix typos --- .../distance/detail/coo_spmv_strategies/hash_strategy.cuh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cpp/include/raft/sparse/distance/detail/coo_spmv_strategies/hash_strategy.cuh b/cpp/include/raft/sparse/distance/detail/coo_spmv_strategies/hash_strategy.cuh index 6f11a73002..20c722f3e0 100644 --- a/cpp/include/raft/sparse/distance/detail/coo_spmv_strategies/hash_strategy.cuh +++ b/cpp/include/raft/sparse/distance/detail/coo_spmv_strategies/hash_strategy.cuh @@ -43,11 +43,11 @@ namespace detail { template class hash_strategy : public coo_spmv_strategy { public: - using insert_type = typename cuco::experimental:: + using insert_type = typename cuco::legacy:: static_map::device_mutable_view; using smem_type = typename insert_type::slot_type*; - using find_type = typename cuco::experimental:: - static_map::device_view; + using find_type = + typename cuco::legacy::static_map::device_view; hash_strategy(const distances_config_t& config_, float capacity_threshold_ = 0.5, From 9b49ec52a19396eed31d5ef3fae0042cbc4546ab Mon Sep 17 00:00:00 2001 From: Yunsong Wang Date: Thu, 15 Feb 2024 08:29:28 -0800 Subject: [PATCH 4/4] Revert CMake changes --- fetch_rapids.cmake | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/fetch_rapids.cmake b/fetch_rapids.cmake index f5cd8dee77..1dca136c97 100644 --- a/fetch_rapids.cmake +++ b/fetch_rapids.cmake @@ -1,5 +1,5 @@ # ============================================================================= -# Copyright (c) 2022-2024, NVIDIA CORPORATION. +# Copyright (c) 2022-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 @@ -11,13 +11,10 @@ # or implied. See the License for the specific language governing permissions and limitations under # the License. # ============================================================================= - -set(rapids-cmake-repo PointKernel/rapids-cmake) -set(rapids-cmake-branch cuco-experimental) - if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/RAFT_RAPIDS.cmake) file(DOWNLOAD https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-24.04/RAPIDS.cmake ${CMAKE_CURRENT_BINARY_DIR}/RAFT_RAPIDS.cmake ) endif() + include(${CMAKE_CURRENT_BINARY_DIR}/RAFT_RAPIDS.cmake)