From 2fb6db47804d2c38bf51260f8fcc329ae13027d5 Mon Sep 17 00:00:00 2001 From: tarangj Date: Fri, 28 Aug 2026 16:36:53 -0700 Subject: [PATCH 01/13] Use async resources for prefetch benchmarks --- cpp/bench/ann/src/cuvs/cuvs_ann_bench_utils.h | 12 ++++++++++-- cpp/bench/ann/src/cuvs/cuvs_cagra_wrapper.h | 2 +- cpp/bench/ann/src/cuvs/cuvs_ivf_flat_wrapper.h | 2 +- cpp/bench/ann/src/cuvs/cuvs_ivf_pq_wrapper.h | 2 +- cpp/bench/ann/src/cuvs/cuvs_ivf_rabitq_wrapper.h | 2 +- cpp/bench/ann/src/cuvs/cuvs_ivf_sq_wrapper.h | 2 +- 6 files changed, 15 insertions(+), 7 deletions(-) diff --git a/cpp/bench/ann/src/cuvs/cuvs_ann_bench_utils.h b/cpp/bench/ann/src/cuvs/cuvs_ann_bench_utils.h index 1a276e8cc8..74bc60d8f8 100644 --- a/cpp/bench/ann/src/cuvs/cuvs_ann_bench_utils.h +++ b/cpp/bench/ann/src/cuvs/cuvs_ann_bench_utils.h @@ -18,10 +18,11 @@ #include #include +#include #include #include +#include #include -#include #include #include #include @@ -31,6 +32,13 @@ namespace cuvs::bench { +/** Create streams that do not implicitly synchronize with the default stream. */ +inline auto make_non_blocking_stream_pool(size_t n_streams) + -> std::shared_ptr +{ + return std::make_shared(n_streams, rmm::cuda_stream::flags::non_blocking); +} + inline auto parse_metric_type(cuvs::bench::Metric metric) -> cuvs::distance::DistanceType { if (metric == cuvs::bench::Metric::kInnerProduct) { @@ -67,7 +75,7 @@ inline auto rmm_oom_callback(std::size_t bytes, void*) -> bool */ class shared_raft_resources { public: - using large_mr_type = rmm::mr::managed_memory_resource; + using large_mr_type = rmm::mr::cuda_async_managed_memory_resource; shared_raft_resources() try : large_mr_() { diff --git a/cpp/bench/ann/src/cuvs/cuvs_cagra_wrapper.h b/cpp/bench/ann/src/cuvs/cuvs_cagra_wrapper.h index ed067fac39..a076021c46 100644 --- a/cpp/bench/ann/src/cuvs/cuvs_cagra_wrapper.h +++ b/cpp/bench/ann/src/cuvs/cuvs_cagra_wrapper.h @@ -679,7 +679,7 @@ void cuvs_cagra::search_base( raft::resources composite_handle(handle_); size_t n_streams = cagra_indices.size(); raft::resource::set_cuda_stream_pool(composite_handle, - std::make_shared(n_streams)); + make_non_blocking_stream_pool(n_streams)); cuvs::neighbors::composite::composite_index composite( cagra_indices); diff --git a/cpp/bench/ann/src/cuvs/cuvs_ivf_flat_wrapper.h b/cpp/bench/ann/src/cuvs/cuvs_ivf_flat_wrapper.h index ae334f70d7..1d92c688c8 100644 --- a/cpp/bench/ann/src/cuvs/cuvs_ivf_flat_wrapper.h +++ b/cpp/bench/ann/src/cuvs/cuvs_ivf_flat_wrapper.h @@ -90,7 +90,7 @@ void cuvs_ivf_flat::build(const T* dataset, size_t nrow) { // Create a CUDA stream pool with 1 stream (besides main stream) for kernel/copy overlapping. size_t n_streams = 1; - raft::resource::set_cuda_stream_pool(handle_, std::make_shared(n_streams)); + raft::resource::set_cuda_stream_pool(handle_, make_non_blocking_stream_pool(n_streams)); index_ = std::make_shared>( std::move(cuvs::neighbors::ivf_flat::build( handle_, diff --git a/cpp/bench/ann/src/cuvs/cuvs_ivf_pq_wrapper.h b/cpp/bench/ann/src/cuvs/cuvs_ivf_pq_wrapper.h index 161563d8fe..b8b1c49f79 100644 --- a/cpp/bench/ann/src/cuvs/cuvs_ivf_pq_wrapper.h +++ b/cpp/bench/ann/src/cuvs/cuvs_ivf_pq_wrapper.h @@ -120,7 +120,7 @@ void cuvs_ivf_pq::build(const T* dataset, size_t nrow) { // Create a CUDA stream pool with 1 stream (besides main stream) for kernel/copy overlapping. size_t n_streams = 1; - raft::resource::set_cuda_stream_pool(handle_, std::make_shared(n_streams)); + raft::resource::set_cuda_stream_pool(handle_, make_non_blocking_stream_pool(n_streams)); auto dataset_v = raft::make_device_matrix_view(dataset, IdxT(nrow), dim_); std::make_shared>( std::move(cuvs::neighbors::ivf_pq::build(handle_, index_params_, dataset_v))) diff --git a/cpp/bench/ann/src/cuvs/cuvs_ivf_rabitq_wrapper.h b/cpp/bench/ann/src/cuvs/cuvs_ivf_rabitq_wrapper.h index ca8f77b808..5198d1c84b 100644 --- a/cpp/bench/ann/src/cuvs/cuvs_ivf_rabitq_wrapper.h +++ b/cpp/bench/ann/src/cuvs/cuvs_ivf_rabitq_wrapper.h @@ -100,7 +100,7 @@ void cuvs_ivf_rabitq::build(const T* dataset, size_t nrow) { // Create a CUDA stream pool with 1 stream (besides main stream) for kernel/copy overlapping. size_t n_streams = 1; - raft::resource::set_cuda_stream_pool(handle_, std::make_shared(n_streams)); + raft::resource::set_cuda_stream_pool(handle_, make_non_blocking_stream_pool(n_streams)); auto dataset_v = raft::make_device_matrix_view(dataset, IdxT(nrow), dim_); std::make_shared>( std::move(cuvs::neighbors::ivf_rabitq::build(handle_, index_params_, dataset_v))) diff --git a/cpp/bench/ann/src/cuvs/cuvs_ivf_sq_wrapper.h b/cpp/bench/ann/src/cuvs/cuvs_ivf_sq_wrapper.h index 1503e6bb84..42adad542b 100644 --- a/cpp/bench/ann/src/cuvs/cuvs_ivf_sq_wrapper.h +++ b/cpp/bench/ann/src/cuvs/cuvs_ivf_sq_wrapper.h @@ -84,7 +84,7 @@ template void cuvs_ivf_sq::build(const T* dataset, size_t nrow) { size_t n_streams = 1; - raft::resource::set_cuda_stream_pool(handle_, std::make_shared(n_streams)); + raft::resource::set_cuda_stream_pool(handle_, make_non_blocking_stream_pool(n_streams)); index_ = std::make_shared>( std::move(cuvs::neighbors::ivf_sq::build( handle_, From 4a7f4f5e6c34e04a3dd9f8b18cd533dd855d3b8c Mon Sep 17 00:00:00 2001 From: tarangj Date: Fri, 28 Aug 2026 17:06:18 -0700 Subject: [PATCH 02/13] style --- cpp/bench/ann/src/cuvs/cuvs_ann_bench_utils.h | 2 +- cpp/bench/ann/src/cuvs/cuvs_ivf_flat_wrapper.h | 2 +- cpp/bench/ann/src/cuvs/cuvs_ivf_pq_wrapper.h | 2 +- cpp/bench/ann/src/cuvs/cuvs_ivf_rabitq_wrapper.h | 2 +- cpp/bench/ann/src/cuvs/cuvs_ivf_sq_wrapper.h | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cpp/bench/ann/src/cuvs/cuvs_ann_bench_utils.h b/cpp/bench/ann/src/cuvs/cuvs_ann_bench_utils.h index 74bc60d8f8..bb0376a6af 100644 --- a/cpp/bench/ann/src/cuvs/cuvs_ann_bench_utils.h +++ b/cpp/bench/ann/src/cuvs/cuvs_ann_bench_utils.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2023-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2023-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ #pragma once diff --git a/cpp/bench/ann/src/cuvs/cuvs_ivf_flat_wrapper.h b/cpp/bench/ann/src/cuvs/cuvs_ivf_flat_wrapper.h index 1d92c688c8..68f8f95481 100644 --- a/cpp/bench/ann/src/cuvs/cuvs_ivf_flat_wrapper.h +++ b/cpp/bench/ann/src/cuvs/cuvs_ivf_flat_wrapper.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2023-2024, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2023-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ #pragma once diff --git a/cpp/bench/ann/src/cuvs/cuvs_ivf_pq_wrapper.h b/cpp/bench/ann/src/cuvs/cuvs_ivf_pq_wrapper.h index b8b1c49f79..b4a81714c6 100644 --- a/cpp/bench/ann/src/cuvs/cuvs_ivf_pq_wrapper.h +++ b/cpp/bench/ann/src/cuvs/cuvs_ivf_pq_wrapper.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2023-2025, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2023-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ #pragma once diff --git a/cpp/bench/ann/src/cuvs/cuvs_ivf_rabitq_wrapper.h b/cpp/bench/ann/src/cuvs/cuvs_ivf_rabitq_wrapper.h index 5198d1c84b..7efb43e3dc 100644 --- a/cpp/bench/ann/src/cuvs/cuvs_ivf_rabitq_wrapper.h +++ b/cpp/bench/ann/src/cuvs/cuvs_ivf_rabitq_wrapper.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ #pragma once diff --git a/cpp/bench/ann/src/cuvs/cuvs_ivf_sq_wrapper.h b/cpp/bench/ann/src/cuvs/cuvs_ivf_sq_wrapper.h index 42adad542b..787e945f71 100644 --- a/cpp/bench/ann/src/cuvs/cuvs_ivf_sq_wrapper.h +++ b/cpp/bench/ann/src/cuvs/cuvs_ivf_sq_wrapper.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ #pragma once From fd4f3f11773a852332787fec5772e78bd37709b7 Mon Sep 17 00:00:00 2001 From: tarangj Date: Tue, 1 Sep 2026 09:18:52 -0700 Subject: [PATCH 03/13] address pr reviews --- cpp/bench/ann/src/cuvs/cuvs_ann_bench_utils.h | 10 +++------- cpp/bench/ann/src/cuvs/cuvs_cagra_wrapper.h | 3 ++- cpp/bench/ann/src/cuvs/cuvs_ivf_flat_wrapper.h | 3 --- cpp/bench/ann/src/cuvs/cuvs_ivf_pq_wrapper.h | 3 --- cpp/bench/ann/src/cuvs/cuvs_ivf_rabitq_wrapper.h | 3 --- cpp/bench/ann/src/cuvs/cuvs_ivf_sq_wrapper.h | 2 -- 6 files changed, 5 insertions(+), 19 deletions(-) diff --git a/cpp/bench/ann/src/cuvs/cuvs_ann_bench_utils.h b/cpp/bench/ann/src/cuvs/cuvs_ann_bench_utils.h index bb0376a6af..8c785cf368 100644 --- a/cpp/bench/ann/src/cuvs/cuvs_ann_bench_utils.h +++ b/cpp/bench/ann/src/cuvs/cuvs_ann_bench_utils.h @@ -15,6 +15,7 @@ #include #include #include +#include #include #include @@ -32,13 +33,6 @@ namespace cuvs::bench { -/** Create streams that do not implicitly synchronize with the default stream. */ -inline auto make_non_blocking_stream_pool(size_t n_streams) - -> std::shared_ptr -{ - return std::make_shared(n_streams, rmm::cuda_stream::flags::non_blocking); -} - inline auto parse_metric_type(cuvs::bench::Metric metric) -> cuvs::distance::DistanceType { if (metric == cuvs::bench::Metric::kInnerProduct) { @@ -140,6 +134,8 @@ class configured_raft_resources { /** Default constructor creates all resources anew. */ configured_raft_resources() : configured_raft_resources{std::make_shared()} { + raft::resource::set_cuda_stream_pool( + *res_, std::make_shared(1, rmm::cuda_stream::flags::non_blocking)); } configured_raft_resources(configured_raft_resources&&); diff --git a/cpp/bench/ann/src/cuvs/cuvs_cagra_wrapper.h b/cpp/bench/ann/src/cuvs/cuvs_cagra_wrapper.h index a076021c46..7e95d181c4 100644 --- a/cpp/bench/ann/src/cuvs/cuvs_cagra_wrapper.h +++ b/cpp/bench/ann/src/cuvs/cuvs_cagra_wrapper.h @@ -679,7 +679,8 @@ void cuvs_cagra::search_base( raft::resources composite_handle(handle_); size_t n_streams = cagra_indices.size(); raft::resource::set_cuda_stream_pool(composite_handle, - make_non_blocking_stream_pool(n_streams)); + std::make_shared( + n_streams, rmm::cuda_stream::flags::non_blocking)); cuvs::neighbors::composite::composite_index composite( cagra_indices); diff --git a/cpp/bench/ann/src/cuvs/cuvs_ivf_flat_wrapper.h b/cpp/bench/ann/src/cuvs/cuvs_ivf_flat_wrapper.h index 68f8f95481..9d73990986 100644 --- a/cpp/bench/ann/src/cuvs/cuvs_ivf_flat_wrapper.h +++ b/cpp/bench/ann/src/cuvs/cuvs_ivf_flat_wrapper.h @@ -88,9 +88,6 @@ class cuvs_ivf_flat : public algo, public algo_gpu { template void cuvs_ivf_flat::build(const T* dataset, size_t nrow) { - // Create a CUDA stream pool with 1 stream (besides main stream) for kernel/copy overlapping. - size_t n_streams = 1; - raft::resource::set_cuda_stream_pool(handle_, make_non_blocking_stream_pool(n_streams)); index_ = std::make_shared>( std::move(cuvs::neighbors::ivf_flat::build( handle_, diff --git a/cpp/bench/ann/src/cuvs/cuvs_ivf_pq_wrapper.h b/cpp/bench/ann/src/cuvs/cuvs_ivf_pq_wrapper.h index b4a81714c6..0ddb41d19e 100644 --- a/cpp/bench/ann/src/cuvs/cuvs_ivf_pq_wrapper.h +++ b/cpp/bench/ann/src/cuvs/cuvs_ivf_pq_wrapper.h @@ -118,9 +118,6 @@ void cuvs_ivf_pq::load(const std::string& file) template void cuvs_ivf_pq::build(const T* dataset, size_t nrow) { - // Create a CUDA stream pool with 1 stream (besides main stream) for kernel/copy overlapping. - size_t n_streams = 1; - raft::resource::set_cuda_stream_pool(handle_, make_non_blocking_stream_pool(n_streams)); auto dataset_v = raft::make_device_matrix_view(dataset, IdxT(nrow), dim_); std::make_shared>( std::move(cuvs::neighbors::ivf_pq::build(handle_, index_params_, dataset_v))) diff --git a/cpp/bench/ann/src/cuvs/cuvs_ivf_rabitq_wrapper.h b/cpp/bench/ann/src/cuvs/cuvs_ivf_rabitq_wrapper.h index 7efb43e3dc..d9b12da607 100644 --- a/cpp/bench/ann/src/cuvs/cuvs_ivf_rabitq_wrapper.h +++ b/cpp/bench/ann/src/cuvs/cuvs_ivf_rabitq_wrapper.h @@ -98,9 +98,6 @@ void cuvs_ivf_rabitq::load(const std::string& file) template void cuvs_ivf_rabitq::build(const T* dataset, size_t nrow) { - // Create a CUDA stream pool with 1 stream (besides main stream) for kernel/copy overlapping. - size_t n_streams = 1; - raft::resource::set_cuda_stream_pool(handle_, make_non_blocking_stream_pool(n_streams)); auto dataset_v = raft::make_device_matrix_view(dataset, IdxT(nrow), dim_); std::make_shared>( std::move(cuvs::neighbors::ivf_rabitq::build(handle_, index_params_, dataset_v))) diff --git a/cpp/bench/ann/src/cuvs/cuvs_ivf_sq_wrapper.h b/cpp/bench/ann/src/cuvs/cuvs_ivf_sq_wrapper.h index 787e945f71..8a96951803 100644 --- a/cpp/bench/ann/src/cuvs/cuvs_ivf_sq_wrapper.h +++ b/cpp/bench/ann/src/cuvs/cuvs_ivf_sq_wrapper.h @@ -83,8 +83,6 @@ class cuvs_ivf_sq : public algo, public algo_gpu { template void cuvs_ivf_sq::build(const T* dataset, size_t nrow) { - size_t n_streams = 1; - raft::resource::set_cuda_stream_pool(handle_, make_non_blocking_stream_pool(n_streams)); index_ = std::make_shared>( std::move(cuvs::neighbors::ivf_sq::build( handle_, From 39100a2587b7033651f393b180df8acaf4ea56f0 Mon Sep 17 00:00:00 2001 From: tarang-jain Date: Wed, 2 Sep 2026 11:40:16 -0700 Subject: [PATCH 04/13] pdate behavior --- cpp/bench/ann/src/common/util.hpp | 24 ------------------- cpp/bench/ann/src/cuvs/cuvs_ann_bench_utils.h | 3 +-- cpp/bench/ann/src/cuvs/cuvs_cagra_wrapper.h | 3 +-- 3 files changed, 2 insertions(+), 28 deletions(-) diff --git a/cpp/bench/ann/src/common/util.hpp b/cpp/bench/ann/src/common/util.hpp index 6e4c57b35e..cb23206e11 100644 --- a/cpp/bench/ann/src/common/util.hpp +++ b/cpp/bench/ann/src/common/util.hpp @@ -144,30 +144,6 @@ struct cuda_timer { } }; -#ifndef BUILD_CPU_ONLY -// ATM, rmm::stream does not support passing in flags; hence this helper type. -struct non_blocking_stream { - non_blocking_stream() { cudaStreamCreateWithFlags(&stream_, cudaStreamNonBlocking); } - ~non_blocking_stream() noexcept - { - if (stream_ != nullptr) { cudaStreamDestroy(stream_); } - } - non_blocking_stream(non_blocking_stream const&) = delete; - non_blocking_stream(non_blocking_stream&& other) noexcept { std::swap(stream_, other.stream_); } - auto operator=(non_blocking_stream const&) -> non_blocking_stream& = delete; - auto operator=(non_blocking_stream&&) -> non_blocking_stream& = delete; - [[nodiscard]] auto view() const noexcept -> cudaStream_t { return stream_; } - - private: - cudaStream_t stream_{nullptr}; -}; - -namespace detail { -inline std::vector global_stream_pool(0); -inline std::mutex gsp_mutex; -} // namespace detail -#endif - /** * Get a stream associated with the current benchmark thread. * diff --git a/cpp/bench/ann/src/cuvs/cuvs_ann_bench_utils.h b/cpp/bench/ann/src/cuvs/cuvs_ann_bench_utils.h index 8c785cf368..0ca96cb3c0 100644 --- a/cpp/bench/ann/src/cuvs/cuvs_ann_bench_utils.h +++ b/cpp/bench/ann/src/cuvs/cuvs_ann_bench_utils.h @@ -134,8 +134,7 @@ class configured_raft_resources { /** Default constructor creates all resources anew. */ configured_raft_resources() : configured_raft_resources{std::make_shared()} { - raft::resource::set_cuda_stream_pool( - *res_, std::make_shared(1, rmm::cuda_stream::flags::non_blocking)); + raft::resource::set_cuda_stream_pool(*res_, std::make_shared(1)); } configured_raft_resources(configured_raft_resources&&); diff --git a/cpp/bench/ann/src/cuvs/cuvs_cagra_wrapper.h b/cpp/bench/ann/src/cuvs/cuvs_cagra_wrapper.h index 7e95d181c4..ed067fac39 100644 --- a/cpp/bench/ann/src/cuvs/cuvs_cagra_wrapper.h +++ b/cpp/bench/ann/src/cuvs/cuvs_cagra_wrapper.h @@ -679,8 +679,7 @@ void cuvs_cagra::search_base( raft::resources composite_handle(handle_); size_t n_streams = cagra_indices.size(); raft::resource::set_cuda_stream_pool(composite_handle, - std::make_shared( - n_streams, rmm::cuda_stream::flags::non_blocking)); + std::make_shared(n_streams)); cuvs::neighbors::composite::composite_index composite( cagra_indices); From 5e203e0e5dca65f87f2302df2cbae98e91d6bee0 Mon Sep 17 00:00:00 2001 From: tarang-jain Date: Wed, 2 Sep 2026 11:50:10 -0700 Subject: [PATCH 05/13] style --- cpp/bench/ann/src/common/util.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/bench/ann/src/common/util.hpp b/cpp/bench/ann/src/common/util.hpp index cb23206e11..bb9a1dead7 100644 --- a/cpp/bench/ann/src/common/util.hpp +++ b/cpp/bench/ann/src/common/util.hpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2023-2025, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2023-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ #pragma once From 6a637e5108791c79bc2a6c4d52283536fd02b332 Mon Sep 17 00:00:00 2001 From: tarang-jain Date: Wed, 2 Sep 2026 22:23:49 -0700 Subject: [PATCH 06/13] fix compilation --- cpp/bench/ann/src/common/util.hpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/cpp/bench/ann/src/common/util.hpp b/cpp/bench/ann/src/common/util.hpp index bb9a1dead7..069d257717 100644 --- a/cpp/bench/ann/src/common/util.hpp +++ b/cpp/bench/ann/src/common/util.hpp @@ -7,6 +7,10 @@ #include "ann_types.hpp" #include "cuda_stub.hpp" // cuda-related utils +#ifndef BUILD_CPU_ONLY +#include +#endif + #if __has_include() #define ANN_BENCH_NVTX3_HEADERS_FOUND #include @@ -144,6 +148,13 @@ struct cuda_timer { } }; +#ifndef BUILD_CPU_ONLY +namespace detail { +inline std::vector global_stream_pool(0); +inline std::mutex gsp_mutex; +} // namespace detail +#endif + /** * Get a stream associated with the current benchmark thread. * @@ -156,7 +167,9 @@ inline auto get_stream_from_global_pool() -> cudaStream_t #ifndef BUILD_CPU_ONLY std::lock_guard guard(detail::gsp_mutex); if (static_cast(detail::global_stream_pool.size()) < benchmark_n_threads) { - detail::global_stream_pool.resize(benchmark_n_threads); + while (static_cast(detail::global_stream_pool.size()) < benchmark_n_threads) { + detail::global_stream_pool.emplace_back(rmm::cuda_stream::flags::non_blocking); + } } return detail::global_stream_pool[benchmark_thread_id].view(); #else From 0e26ee5d2835aa83998d31a85ce6a20cdbe0e6db Mon Sep 17 00:00:00 2001 From: tarang-jain Date: Thu, 3 Sep 2026 13:49:17 -0700 Subject: [PATCH 07/13] try linking rmm --- cpp/bench/ann/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/cpp/bench/ann/CMakeLists.txt b/cpp/bench/ann/CMakeLists.txt index 90d23d9aef..786d45ccc1 100644 --- a/cpp/bench/ann/CMakeLists.txt +++ b/cpp/bench/ann/CMakeLists.txt @@ -181,6 +181,7 @@ function(ConfigureAnnBench) sqlite3 Threads::Threads $<$:CUDA::cudart_static> + $<$:rmm::rmm> $ $ ) From b7a0a65dfad98f0408b346b7a6966fd1ee3c18e1 Mon Sep 17 00:00:00 2001 From: tarang-jain Date: Thu, 3 Sep 2026 14:08:36 -0700 Subject: [PATCH 08/13] move to upper constructor --- cpp/bench/ann/CMakeLists.txt | 2 +- cpp/bench/ann/src/cuvs/cuvs_ann_bench_utils.h | 2 +- cpp/bench/ann/src/cuvs/cuvs_ivf_flat_wrapper.h | 1 - cpp/bench/ann/src/cuvs/cuvs_ivf_pq_wrapper.h | 1 - cpp/bench/ann/src/cuvs/cuvs_ivf_rabitq_wrapper.h | 1 - cpp/bench/ann/src/cuvs/cuvs_ivf_sq_wrapper.h | 2 -- 6 files changed, 2 insertions(+), 7 deletions(-) diff --git a/cpp/bench/ann/CMakeLists.txt b/cpp/bench/ann/CMakeLists.txt index 786d45ccc1..50bfa3a1e7 100644 --- a/cpp/bench/ann/CMakeLists.txt +++ b/cpp/bench/ann/CMakeLists.txt @@ -1,6 +1,6 @@ # ============================================================================= # cmake-format: off -# SPDX-FileCopyrightText: Copyright (c) 2024-2026, NVIDIA CORPORATION. +# SPDX-FileCopyrightText: Copyright (c) 2024-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # cmake-format: on # ============================================================================= diff --git a/cpp/bench/ann/src/cuvs/cuvs_ann_bench_utils.h b/cpp/bench/ann/src/cuvs/cuvs_ann_bench_utils.h index 0ca96cb3c0..539cc37a30 100644 --- a/cpp/bench/ann/src/cuvs/cuvs_ann_bench_utils.h +++ b/cpp/bench/ann/src/cuvs/cuvs_ann_bench_utils.h @@ -129,12 +129,12 @@ class configured_raft_resources { { raft::resource::set_large_workspace_resource( *res_, raft::mr::device_resource{shared_res_->get_large_memory_resource()}); + raft::resource::set_cuda_stream_pool(*res_, std::make_shared(1)); } /** Default constructor creates all resources anew. */ configured_raft_resources() : configured_raft_resources{std::make_shared()} { - raft::resource::set_cuda_stream_pool(*res_, std::make_shared(1)); } configured_raft_resources(configured_raft_resources&&); diff --git a/cpp/bench/ann/src/cuvs/cuvs_ivf_flat_wrapper.h b/cpp/bench/ann/src/cuvs/cuvs_ivf_flat_wrapper.h index 9d73990986..8ed5adee26 100644 --- a/cpp/bench/ann/src/cuvs/cuvs_ivf_flat_wrapper.h +++ b/cpp/bench/ann/src/cuvs/cuvs_ivf_flat_wrapper.h @@ -15,7 +15,6 @@ #include #include #include -#include #include #include diff --git a/cpp/bench/ann/src/cuvs/cuvs_ivf_pq_wrapper.h b/cpp/bench/ann/src/cuvs/cuvs_ivf_pq_wrapper.h index 0ddb41d19e..363d065e91 100644 --- a/cpp/bench/ann/src/cuvs/cuvs_ivf_pq_wrapper.h +++ b/cpp/bench/ann/src/cuvs/cuvs_ivf_pq_wrapper.h @@ -20,7 +20,6 @@ #include #include #include -#include #include diff --git a/cpp/bench/ann/src/cuvs/cuvs_ivf_rabitq_wrapper.h b/cpp/bench/ann/src/cuvs/cuvs_ivf_rabitq_wrapper.h index d9b12da607..0c41ee1c96 100644 --- a/cpp/bench/ann/src/cuvs/cuvs_ivf_rabitq_wrapper.h +++ b/cpp/bench/ann/src/cuvs/cuvs_ivf_rabitq_wrapper.h @@ -18,7 +18,6 @@ #include #include #include -#include #include diff --git a/cpp/bench/ann/src/cuvs/cuvs_ivf_sq_wrapper.h b/cpp/bench/ann/src/cuvs/cuvs_ivf_sq_wrapper.h index 8a96951803..5bf0098eaa 100644 --- a/cpp/bench/ann/src/cuvs/cuvs_ivf_sq_wrapper.h +++ b/cpp/bench/ann/src/cuvs/cuvs_ivf_sq_wrapper.h @@ -12,9 +12,7 @@ #include #include #include -#include #include -#include #include #include From 90d9e40091fbd274574649f10fc36639119bc7f1 Mon Sep 17 00:00:00 2001 From: tarang-jain Date: Fri, 4 Sep 2026 01:50:01 +0000 Subject: [PATCH 09/13] Use regular managed memory resource in ANN benchmarks --- cpp/bench/ann/src/cuvs/cuvs_ann_bench_utils.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/bench/ann/src/cuvs/cuvs_ann_bench_utils.h b/cpp/bench/ann/src/cuvs/cuvs_ann_bench_utils.h index 539cc37a30..f699bdad1a 100644 --- a/cpp/bench/ann/src/cuvs/cuvs_ann_bench_utils.h +++ b/cpp/bench/ann/src/cuvs/cuvs_ann_bench_utils.h @@ -22,8 +22,8 @@ #include #include #include -#include #include +#include #include #include #include @@ -69,7 +69,7 @@ inline auto rmm_oom_callback(std::size_t bytes, void*) -> bool */ class shared_raft_resources { public: - using large_mr_type = rmm::mr::cuda_async_managed_memory_resource; + using large_mr_type = rmm::mr::managed_memory_resource; shared_raft_resources() try : large_mr_() { From 7aedce9b0820476a5d11513e229a848a74fc1fbd Mon Sep 17 00:00:00 2001 From: tarang-jain Date: Fri, 4 Sep 2026 18:44:08 +0000 Subject: [PATCH 10/13] Fix CPU-only single-exe benchmark build --- cpp/bench/ann/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/bench/ann/CMakeLists.txt b/cpp/bench/ann/CMakeLists.txt index 50bfa3a1e7..9e3b69fdbe 100644 --- a/cpp/bench/ann/CMakeLists.txt +++ b/cpp/bench/ann/CMakeLists.txt @@ -427,8 +427,8 @@ if(CUVS_ANN_BENCH_SINGLE_EXE) target_include_directories(ANN_BENCH PRIVATE ${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES}) target_link_libraries( - ANN_BENCH PRIVATE raft::raft nlohmann_json::nlohmann_json sqlite3 benchmark::benchmark dl - $<$:CUDA::nvtx3> + ANN_BENCH PRIVATE $ nlohmann_json::nlohmann_json sqlite3 + benchmark::benchmark dl $<$:CUDA::nvtx3> ) set_target_properties( ANN_BENCH From b7ba413579ebe121ac961b65dc42e40b7e825034 Mon Sep 17 00:00:00 2001 From: Michael Sarahan Date: Tue, 8 Sep 2026 12:07:25 -0500 Subject: [PATCH 11/13] Revert "Prepare release/26.10" This reverts commit db37fa3b29b6657f835c84c580cfb27dee54f572. --- .github/workflows/build.yaml | 38 +++++++------- .github/workflows/pr.yaml | 50 +++++++++---------- .github/workflows/test.yaml | 14 +++--- .../trigger-breaking-change-alert.yaml | 2 +- RAPIDS_BRANCH | 2 +- README.md | 4 +- examples/go/README.md | 2 +- python/cuvs_bench/cuvs_bench/plot/__main__.py | 2 +- 8 files changed, 57 insertions(+), 57 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 6c18e9f97a..bdd46b298f 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -36,7 +36,7 @@ permissions: {} jobs: build-details: - uses: rapidsai/shared-workflows/.github/workflows/compute-build-details.yaml@release/26.10 + uses: rapidsai/shared-workflows/.github/workflows/compute-build-details.yaml@main cpp-build: needs: [build-details] permissions: @@ -46,7 +46,7 @@ jobs: packages: read pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@release/26.10 + uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@main with: build_type: ${{ inputs.build_type || 'branch' }} build-datetime: ${{ needs.build-details.outputs.build-datetime }} @@ -59,7 +59,7 @@ jobs: rocky8-clib-standalone-build-matrix: permissions: contents: read - uses: rapidsai/shared-workflows/.github/workflows/compute-matrix.yaml@release/26.10 + uses: rapidsai/shared-workflows/.github/workflows/compute-matrix.yaml@main with: build_type: pull-request matrix_name: conda-cpp-build @@ -72,7 +72,7 @@ jobs: packages: read pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@release/26.10 + uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@main strategy: fail-fast: false matrix: ${{ fromJSON(needs.rocky8-clib-standalone-build-matrix.outputs.matrix) }} @@ -93,7 +93,7 @@ jobs: needs: cpp-build permissions: contents: read - uses: rapidsai/shared-workflows/.github/workflows/compute-matrix.yaml@release/26.10 + uses: rapidsai/shared-workflows/.github/workflows/compute-matrix.yaml@main with: build_type: pull-request matrix_name: conda-cpp-build @@ -107,7 +107,7 @@ jobs: packages: read pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@release/26.10 + uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@main # Artifacts are not published from these jobs, so it's safe to run for multiple CUDA versions. # If these jobs start producing artifacts, the names will have to differentiate between CUDA versions. strategy: @@ -126,7 +126,7 @@ jobs: needs: cpp-build permissions: contents: read - uses: rapidsai/shared-workflows/.github/workflows/compute-matrix.yaml@release/26.10 + uses: rapidsai/shared-workflows/.github/workflows/compute-matrix.yaml@main with: build_type: pull-request matrix_name: conda-cpp-build @@ -140,7 +140,7 @@ jobs: packages: read pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@release/26.10 + uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@main # Artifacts are not published from these jobs, so it's safe to run for multiple CUDA versions. # If these jobs start producing artifacts, the names will have to differentiate between CUDA versions. strategy: @@ -159,7 +159,7 @@ jobs: needs: cpp-build permissions: contents: read - uses: rapidsai/shared-workflows/.github/workflows/compute-matrix.yaml@release/26.10 + uses: rapidsai/shared-workflows/.github/workflows/compute-matrix.yaml@main with: build_type: pull-request matrix_name: conda-cpp-build @@ -173,7 +173,7 @@ jobs: packages: read pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@release/26.10 + uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@main # Artifacts are not published from these jobs, so it's safe to run for multiple CUDA versions. # If these jobs start producing artifacts, the names will have to differentiate between CUDA versions. strategy: @@ -199,7 +199,7 @@ jobs: packages: read pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@release/26.10 + uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@main # Artifacts are not published from these jobs, so it's safe to run for multiple CUDA versions. # If these jobs start producing artifacts, the names will have to differentiate between CUDA versions. strategy: @@ -224,7 +224,7 @@ jobs: packages: read pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@release/26.10 + uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@main with: build_type: ${{ inputs.build_type || 'branch' }} build-datetime: ${{ needs.build-details.outputs.build-datetime }} @@ -242,7 +242,7 @@ jobs: id-token: write packages: read pull-requests: read - uses: rapidsai/shared-workflows/.github/workflows/conda-upload-packages.yaml@release/26.10 + uses: rapidsai/shared-workflows/.github/workflows/conda-upload-packages.yaml@main secrets: CONDA_RAPIDSAI_NIGHTLY_TOKEN: ${{ secrets.CONDA_RAPIDSAI_NIGHTLY_TOKEN }} CONDA_RAPIDSAI_TOKEN: ${{ secrets.CONDA_RAPIDSAI_TOKEN }} @@ -268,7 +268,7 @@ jobs: packages: read pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@release/26.10 + uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@main with: arch: "amd64" branch: ${{ inputs.branch }} @@ -287,7 +287,7 @@ jobs: packages: read pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@release/26.10 + uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@main with: build_type: ${{ inputs.build_type || 'branch' }} build-datetime: ${{ needs.build-details.outputs.build-datetime }} @@ -308,7 +308,7 @@ jobs: id-token: write packages: read pull-requests: read - uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@release/26.10 + uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@main secrets: CONDA_RAPIDSAI_WHEELS_NIGHTLY_TOKEN: ${{ secrets.CONDA_RAPIDSAI_WHEELS_NIGHTLY_TOKEN }} RAPIDSAI_PYPI_TOKEN: ${{ secrets.RAPIDSAI_PYPI_TOKEN }} @@ -329,7 +329,7 @@ jobs: packages: read pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@release/26.10 + uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@main with: build_type: ${{ inputs.build_type || 'branch' }} build-datetime: ${{ needs.build-details.outputs.build-datetime }} @@ -350,7 +350,7 @@ jobs: id-token: write packages: read pull-requests: read - uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@release/26.10 + uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@main secrets: CONDA_RAPIDSAI_WHEELS_NIGHTLY_TOKEN: ${{ secrets.CONDA_RAPIDSAI_WHEELS_NIGHTLY_TOKEN }} RAPIDSAI_PYPI_TOKEN: ${{ secrets.RAPIDSAI_PYPI_TOKEN }} @@ -365,7 +365,7 @@ jobs: devcontainers: name: Build devcontainers secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/build-devcontainers.yaml@release/26.10 + uses: rapidsai/shared-workflows/.github/workflows/build-devcontainers.yaml@main permissions: packages: write with: diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index dff6eff137..dc5a1e1852 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -38,7 +38,7 @@ jobs: - wheel-tests-cuvs - devcontainer - telemetry-setup - uses: rapidsai/shared-workflows/.github/workflows/pr-builder.yaml@release/26.10 + uses: rapidsai/shared-workflows/.github/workflows/pr-builder.yaml@main permissions: contents: read if: always() @@ -56,7 +56,7 @@ jobs: if: ${{ vars.TELEMETRY_ENABLED == 'true' }} uses: rapidsai/shared-actions/telemetry-dispatch-stash-base-env-vars@main build-details: - uses: rapidsai/shared-workflows/.github/workflows/compute-build-details.yaml@release/26.10 + uses: rapidsai/shared-workflows/.github/workflows/compute-build-details.yaml@main check-nightly-ci: runs-on: ubuntu-latest permissions: @@ -83,7 +83,7 @@ jobs: contents: read packages: read pull-requests: read - uses: rapidsai/shared-workflows/.github/workflows/changed-files.yaml@release/26.10 + uses: rapidsai/shared-workflows/.github/workflows/changed-files.yaml@main with: files_yaml: | build_docs: @@ -439,7 +439,7 @@ jobs: - '!thirdparty/LICENSES/**' checks: needs: telemetry-setup - uses: rapidsai/shared-workflows/.github/workflows/checks.yaml@release/26.10 + uses: rapidsai/shared-workflows/.github/workflows/checks.yaml@main permissions: contents: read with: @@ -469,7 +469,7 @@ jobs: packages: read pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@release/26.10 + uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@main with: build_type: pull-request build-datetime: ${{ needs.build-details.outputs.build-datetime }} @@ -484,7 +484,7 @@ jobs: packages: read pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@release/26.10 + uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@main if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_cpp with: build_type: pull-request @@ -497,7 +497,7 @@ jobs: id-token: write packages: read pull-requests: read - uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-post-build-checks.yaml@release/26.10 + uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-post-build-checks.yaml@main with: build_type: pull-request symbol_exclusions: (void (thrust::|cub::)) @@ -511,7 +511,7 @@ jobs: packages: read pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@release/26.10 + uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@main with: build_type: pull-request build-datetime: ${{ needs.build-details.outputs.build-datetime }} @@ -527,7 +527,7 @@ jobs: packages: read pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@release/26.10 + uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@main if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python_conda with: build_type: pull-request @@ -536,7 +536,7 @@ jobs: needs: checks permissions: contents: read - uses: rapidsai/shared-workflows/.github/workflows/compute-matrix.yaml@release/26.10 + uses: rapidsai/shared-workflows/.github/workflows/compute-matrix.yaml@main with: build_type: pull-request matrix_name: conda-cpp-build @@ -549,7 +549,7 @@ jobs: packages: read pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@release/26.10 + uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@main strategy: fail-fast: false matrix: ${{ fromJSON(needs.rocky8-clib-standalone-build-matrix.outputs.matrix) }} @@ -569,7 +569,7 @@ jobs: needs: [rocky8-clib-standalone-build, changed-files] permissions: contents: read - uses: rapidsai/shared-workflows/.github/workflows/compute-matrix.yaml@release/26.10 + uses: rapidsai/shared-workflows/.github/workflows/compute-matrix.yaml@main if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_cpp with: build_type: pull-request @@ -583,7 +583,7 @@ jobs: packages: read pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@release/26.10 + uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@main strategy: fail-fast: false matrix: ${{ fromJSON(needs.rocky8-clib-tests-matrix.outputs.matrix) }} @@ -599,7 +599,7 @@ jobs: needs: [conda-cpp-build, changed-files] permissions: contents: read - uses: rapidsai/shared-workflows/.github/workflows/compute-matrix.yaml@release/26.10 + uses: rapidsai/shared-workflows/.github/workflows/compute-matrix.yaml@main if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_java || fromJSON(needs.changed-files.outputs.changed_file_groups).test_cpp with: build_type: pull-request @@ -614,7 +614,7 @@ jobs: packages: read pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@release/26.10 + uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@main # Artifacts are not published from these jobs, so it's safe to run for multiple CUDA versions. # If these jobs start producing artifacts, the names will have to differentiate between CUDA versions. strategy: @@ -639,7 +639,7 @@ jobs: packages: read pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@release/26.10 + uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@main # Artifacts are not published from these jobs, so it's safe to run for multiple CUDA versions. # If these jobs start producing artifacts, the names will have to differentiate between CUDA versions. strategy: @@ -657,7 +657,7 @@ jobs: needs: [conda-cpp-build, changed-files] permissions: contents: read - uses: rapidsai/shared-workflows/.github/workflows/compute-matrix.yaml@release/26.10 + uses: rapidsai/shared-workflows/.github/workflows/compute-matrix.yaml@main if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_rust || fromJSON(needs.changed-files.outputs.changed_file_groups).test_cpp with: build_type: pull-request @@ -672,7 +672,7 @@ jobs: packages: read pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@release/26.10 + uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@main # Artifacts are not published from these jobs, so it's safe to run for multiple CUDA versions. # If these jobs start producing artifacts, the names will have to differentiate between CUDA versions. strategy: @@ -688,7 +688,7 @@ jobs: needs: [conda-cpp-build, changed-files] permissions: contents: read - uses: rapidsai/shared-workflows/.github/workflows/compute-matrix.yaml@release/26.10 + uses: rapidsai/shared-workflows/.github/workflows/compute-matrix.yaml@main if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_go || fromJSON(needs.changed-files.outputs.changed_file_groups).test_cpp with: build_type: pull-request @@ -703,7 +703,7 @@ jobs: packages: read pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@release/26.10 + uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@main # Artifacts are not published from these jobs, so it's safe to run for multiple CUDA versions. # If these jobs start producing artifacts, the names will have to differentiate between CUDA versions. strategy: @@ -723,7 +723,7 @@ jobs: packages: read pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@release/26.10 + uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@main with: build_type: pull-request node_type: "gpu-l4-latest-1" @@ -739,7 +739,7 @@ jobs: packages: read pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@release/26.10 + uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@main with: build_type: pull-request build-datetime: ${{ needs.build-details.outputs.build-datetime }} @@ -758,7 +758,7 @@ jobs: packages: read pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@release/26.10 + uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@main with: build_type: pull-request build-datetime: ${{ needs.build-details.outputs.build-datetime }} @@ -777,7 +777,7 @@ jobs: packages: read pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@release/26.10 + uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@main if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python_wheels with: build_type: pull-request @@ -791,7 +791,7 @@ jobs: pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] needs: telemetry-setup - uses: rapidsai/shared-workflows/.github/workflows/build-in-devcontainer.yaml@release/26.10 + uses: rapidsai/shared-workflows/.github/workflows/build-in-devcontainer.yaml@main with: arch: '["amd64", "arm64"]' cuda: '["13.3"]' diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 16d967973b..c2ff71b3a2 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -32,7 +32,7 @@ jobs: id-token: write packages: read pull-requests: read - uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-post-build-checks.yaml@release/26.10 + uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-post-build-checks.yaml@main with: build_type: ${{ inputs.build_type }} branch: ${{ inputs.branch }} @@ -48,7 +48,7 @@ jobs: packages: read pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@release/26.10 + uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@main with: build_type: ${{ inputs.build_type }} branch: ${{ inputs.branch }} @@ -63,7 +63,7 @@ jobs: packages: read pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@release/26.10 + uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@main with: build_type: ${{ inputs.build_type }} branch: ${{ inputs.branch }} @@ -73,7 +73,7 @@ jobs: conda-java-build-and-tests-matrix: permissions: contents: read - uses: rapidsai/shared-workflows/.github/workflows/compute-matrix.yaml@release/26.10 + uses: rapidsai/shared-workflows/.github/workflows/compute-matrix.yaml@main with: build_type: ${{ inputs.build_type }} matrix_name: conda-cpp-build @@ -87,7 +87,7 @@ jobs: packages: read pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@release/26.10 + uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@main # Artifacts are not published from these jobs, so it's safe to run for multiple CUDA versions. # If these jobs start producing artifacts, the names will have to differentiate between CUDA versions. strategy: @@ -115,7 +115,7 @@ jobs: packages: read pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@release/26.10 + uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@main # Artifacts are not published from these jobs, so it's safe to run for multiple CUDA versions. # If these jobs start producing artifacts, the names will have to differentiate between CUDA versions. strategy: @@ -140,7 +140,7 @@ jobs: packages: read pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@release/26.10 + uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@main with: build_type: ${{ inputs.build_type }} branch: ${{ inputs.branch }} diff --git a/.github/workflows/trigger-breaking-change-alert.yaml b/.github/workflows/trigger-breaking-change-alert.yaml index 116531f088..5a92e2c761 100644 --- a/.github/workflows/trigger-breaking-change-alert.yaml +++ b/.github/workflows/trigger-breaking-change-alert.yaml @@ -18,7 +18,7 @@ jobs: if: contains(github.event.pull_request.labels.*.name, 'breaking') permissions: contents: read - uses: rapidsai/shared-workflows/.github/workflows/breaking-change-alert.yaml@release/26.10 + uses: rapidsai/shared-workflows/.github/workflows/breaking-change-alert.yaml@main secrets: slack-webhook-url: ${{ secrets.NV_SLACK_BREAKING_CHANGE_NOTIFIER_APP }} with: diff --git a/RAPIDS_BRANCH b/RAPIDS_BRANCH index b735ab15de..ba2906d066 100644 --- a/RAPIDS_BRANCH +++ b/RAPIDS_BRANCH @@ -1 +1 @@ -release/26.10 +main diff --git a/README.md b/README.md index 77d2466c6a..412b2e6b02 100755 --- a/README.md +++ b/README.md @@ -143,7 +143,7 @@ cuvsCagraIndexParamsDestroy(index_params); cuvsResourcesDestroy(res); ``` -For more code examples of the C APIs, including drop-in Cmake project templates, please refer to the [C examples](https://github.com/nvidia/cuvs/tree/release/26.10/examples/c) +For more code examples of the C APIs, including drop-in Cmake project templates, please refer to the [C examples](https://github.com/nvidia/cuvs/tree/main/examples/c) ### Rust API @@ -190,7 +190,7 @@ fn main() -> Result<(), Box> { } ``` -For more code examples of the Rust APIs, including a drop-in project templates, please refer to the [Rust examples](https://github.com/nvidia/cuvs/tree/release/26.10/examples/rust). +For more code examples of the Rust APIs, including a drop-in project templates, please refer to the [Rust examples](https://github.com/nvidia/cuvs/tree/main/examples/rust). ## Contributing diff --git a/examples/go/README.md b/examples/go/README.md index 0da8309e10..292ca66114 100644 --- a/examples/go/README.md +++ b/examples/go/README.md @@ -24,7 +24,7 @@ export CC=clang 2. Install the Go module: ```bash -go get github.com/nvidia/cuvs/go@v26.10.00 # 25.02.00 being your desired version, selected from https://github.com/nvidia/cuvs/tags +go get github.com/nvidia/cuvs/go@v26.08.00 # 25.02.00 being your desired version, selected from https://github.com/nvidia/cuvs/tags ``` Then you can build your project with the usual `go build`. diff --git a/python/cuvs_bench/cuvs_bench/plot/__main__.py b/python/cuvs_bench/cuvs_bench/plot/__main__.py index fd1b61ecb5..d88763b86c 100644 --- a/python/cuvs_bench/cuvs_bench/plot/__main__.py +++ b/python/cuvs_bench/cuvs_bench/plot/__main__.py @@ -6,7 +6,7 @@ # 1: https://github.com/erikbern/ann-benchmarks/blob/main/plot.py # 2: https://github.com/erikbern/ann-benchmarks/blob/main/ann_benchmarks/plotting/utils.py # noqa: E501 # 3: https://github.com/erikbern/ann-benchmarks/blob/main/ann_benchmarks/plotting/metrics.py # noqa: E501 -# License: https://github.com/nvidia/cuvs/blob/release/26.10/thirdparty/LICENSES/LICENSE.ann-benchmark # noqa: E501 +# License: https://github.com/nvidia/cuvs/blob/main/thirdparty/LICENSES/LICENSE.ann-benchmark # noqa: E501 import itertools import os From 329de99fd75f9d3d5d698d83e4a81f1ebaa75896 Mon Sep 17 00:00:00 2001 From: Tarang Jain <40517122+tarang-jain@users.noreply.github.com> Date: Tue, 8 Sep 2026 12:31:29 -0700 Subject: [PATCH 12/13] Reduce Size of Fused Reduction in Kmeans|| Iterations (#2438) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We already have computed the centroid assignment from the previous set of candidates in the previous iteration. We do not need the full PW reduction in the current iteration, but only across the newly added candidates. Profile on A6000 with changes from #2249: Case 1: 1M * 1536 dataset, with 1024 centroids. Here we profile only the scalable kmeans++ initialization 1. #2249 alone: Time | Total Time | Instances | Avg | Med | Min | Max | StdDev | Name -- | -- | -- | -- | -- | -- | -- | -- | -- 86.2% | 18.815 s | 16 | 1.176 s | 265.906 ms | 442.142 μs | 4.202 s | 1.493 s | fused_1nn_f_i32_relaxed 11.2% | 2.441 s | 1023 | 2.386 ms | 2.499 ms | 2.163 ms | 2.615 ms | 158.442 μs | cutlass gemm 2. #2249 + this PR: Time | Total Time | Instances | Avg | Med | Min | Max | StdDev | Name -- | -- | -- | -- | -- | -- | -- | -- | -- 72.0% | 7.994 s | 15 | 532.946 ms | 511.092 ms | 434.372 μs | 4.213 s | 1.052 s | fused_1nn_f_i32_relaxed 22.9% | 2.538 s | 1023 | 2.481 ms | 2.497 ms | 2.118 ms | 3.124 ms | 179.081 μs | cutlass gemm Authors: - Tarang Jain (https://github.com/tarang-jain) - Divye Gala (https://github.com/divyegala) Approvers: - Victor Lafargue (https://github.com/viclafargue) URL: https://github.com/NVIDIA/cuvs/pull/2438 --- cpp/src/cluster/detail/kmeans.cuh | 55 ++++++++++++++++++------------- 1 file changed, 33 insertions(+), 22 deletions(-) diff --git a/cpp/src/cluster/detail/kmeans.cuh b/cpp/src/cluster/detail/kmeans.cuh index e3ffb4a439..6787f9a421 100644 --- a/cpp/src/cluster/detail/kmeans.cuh +++ b/cpp/src/cluster/detail/kmeans.cuh @@ -394,34 +394,14 @@ void initScalableKMeansPlusPlus(raft::resources const& handle, int niter = std::min(8, (int)ceil(log(psi))); RAFT_LOG_DEBUG("KMeans||: psi = %g, log(psi) = %g, niter = %d ", psi, log(psi), niter); + auto newMinClusterDistanceVec = raft::make_device_vector(handle, n_samples); + // <<<< Step-3 >>> : for O( log(psi) ) times do for (int iter = 0; iter < niter; ++iter) { RAFT_LOG_DEBUG("KMeans|| - Iteration %d: # potential centroids sampled - %d", iter, potentialCentroids.extent(0)); - cuvs::cluster::kmeans::detail::minClusterDistanceCompute( - handle, - X, - potentialCentroids, - minClusterDistanceVec.view(), - L2NormX.view(), - L2NormBuf_OR_DistBuf, - params.metric, - params.batch_samples, - params.batch_centroids, - workspace); - - cuvs::cluster::kmeans::detail::computeClusterCost( - handle, - minClusterDistanceVec.view(), - workspace, - raft::make_device_scalar_view(clusterCost.data()), - raft::identity_op{}, - raft::add_op{}); - - psi = clusterCost.value(stream); - // <<<< Step-4 >>> : Sample each point x in X independently and identify new // potentialCentroids raft::random::uniform( @@ -458,6 +438,37 @@ void initScalableKMeansPlusPlus(raft::resources const& handle, potentialCentroids = raft::make_device_matrix_view(centroidsBuf.data(), tot_centroids, n_features); /// <<<< End of Step-5 >>> + + // Update d(x, C) using only the newly sampled candidates. + if (Cp.extent(0) > 0 && iter + 1 < niter) { + cuvs::cluster::kmeans::detail::minClusterDistanceCompute( + handle, + X, + Cp, + newMinClusterDistanceVec.view(), + L2NormX.view(), + L2NormBuf_OR_DistBuf, + params.metric, + params.batch_samples, + params.batch_centroids, + workspace); + + raft::linalg::map(handle, + minClusterDistanceVec.view(), + raft::min_op{}, + raft::make_const_mdspan(minClusterDistanceVec.view()), + raft::make_const_mdspan(newMinClusterDistanceVec.view())); + + cuvs::cluster::kmeans::detail::computeClusterCost( + handle, + minClusterDistanceVec.view(), + workspace, + raft::make_device_scalar_view(clusterCost.data()), + raft::identity_op{}, + raft::add_op{}); + + psi = clusterCost.value(stream); + } } /// <<<< Step-6 >>> RAFT_LOG_DEBUG("KMeans||: total # potential centroids sampled - %d", From a9e97a452a3e8ada792dc1075617f57577ac281d Mon Sep 17 00:00:00 2001 From: tarang-jain Date: Tue, 8 Sep 2026 13:47:57 -0700 Subject: [PATCH 13/13] fix rebase --- .github/workflows/build.yaml | 38 ++++++------- .github/workflows/pr.yaml | 50 ++++++++--------- .github/workflows/test.yaml | 14 ++--- .../trigger-breaking-change-alert.yaml | 2 +- RAPIDS_BRANCH | 2 +- README.md | 4 +- cpp/src/cluster/detail/kmeans.cuh | 55 ++++++++----------- examples/go/README.md | 2 +- python/cuvs_bench/cuvs_bench/plot/__main__.py | 2 +- 9 files changed, 79 insertions(+), 90 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index bdd46b298f..6c18e9f97a 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -36,7 +36,7 @@ permissions: {} jobs: build-details: - uses: rapidsai/shared-workflows/.github/workflows/compute-build-details.yaml@main + uses: rapidsai/shared-workflows/.github/workflows/compute-build-details.yaml@release/26.10 cpp-build: needs: [build-details] permissions: @@ -46,7 +46,7 @@ jobs: packages: read pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@main + uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@release/26.10 with: build_type: ${{ inputs.build_type || 'branch' }} build-datetime: ${{ needs.build-details.outputs.build-datetime }} @@ -59,7 +59,7 @@ jobs: rocky8-clib-standalone-build-matrix: permissions: contents: read - uses: rapidsai/shared-workflows/.github/workflows/compute-matrix.yaml@main + uses: rapidsai/shared-workflows/.github/workflows/compute-matrix.yaml@release/26.10 with: build_type: pull-request matrix_name: conda-cpp-build @@ -72,7 +72,7 @@ jobs: packages: read pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@main + uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@release/26.10 strategy: fail-fast: false matrix: ${{ fromJSON(needs.rocky8-clib-standalone-build-matrix.outputs.matrix) }} @@ -93,7 +93,7 @@ jobs: needs: cpp-build permissions: contents: read - uses: rapidsai/shared-workflows/.github/workflows/compute-matrix.yaml@main + uses: rapidsai/shared-workflows/.github/workflows/compute-matrix.yaml@release/26.10 with: build_type: pull-request matrix_name: conda-cpp-build @@ -107,7 +107,7 @@ jobs: packages: read pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@main + uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@release/26.10 # Artifacts are not published from these jobs, so it's safe to run for multiple CUDA versions. # If these jobs start producing artifacts, the names will have to differentiate between CUDA versions. strategy: @@ -126,7 +126,7 @@ jobs: needs: cpp-build permissions: contents: read - uses: rapidsai/shared-workflows/.github/workflows/compute-matrix.yaml@main + uses: rapidsai/shared-workflows/.github/workflows/compute-matrix.yaml@release/26.10 with: build_type: pull-request matrix_name: conda-cpp-build @@ -140,7 +140,7 @@ jobs: packages: read pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@main + uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@release/26.10 # Artifacts are not published from these jobs, so it's safe to run for multiple CUDA versions. # If these jobs start producing artifacts, the names will have to differentiate between CUDA versions. strategy: @@ -159,7 +159,7 @@ jobs: needs: cpp-build permissions: contents: read - uses: rapidsai/shared-workflows/.github/workflows/compute-matrix.yaml@main + uses: rapidsai/shared-workflows/.github/workflows/compute-matrix.yaml@release/26.10 with: build_type: pull-request matrix_name: conda-cpp-build @@ -173,7 +173,7 @@ jobs: packages: read pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@main + uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@release/26.10 # Artifacts are not published from these jobs, so it's safe to run for multiple CUDA versions. # If these jobs start producing artifacts, the names will have to differentiate between CUDA versions. strategy: @@ -199,7 +199,7 @@ jobs: packages: read pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@main + uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@release/26.10 # Artifacts are not published from these jobs, so it's safe to run for multiple CUDA versions. # If these jobs start producing artifacts, the names will have to differentiate between CUDA versions. strategy: @@ -224,7 +224,7 @@ jobs: packages: read pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@main + uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@release/26.10 with: build_type: ${{ inputs.build_type || 'branch' }} build-datetime: ${{ needs.build-details.outputs.build-datetime }} @@ -242,7 +242,7 @@ jobs: id-token: write packages: read pull-requests: read - uses: rapidsai/shared-workflows/.github/workflows/conda-upload-packages.yaml@main + uses: rapidsai/shared-workflows/.github/workflows/conda-upload-packages.yaml@release/26.10 secrets: CONDA_RAPIDSAI_NIGHTLY_TOKEN: ${{ secrets.CONDA_RAPIDSAI_NIGHTLY_TOKEN }} CONDA_RAPIDSAI_TOKEN: ${{ secrets.CONDA_RAPIDSAI_TOKEN }} @@ -268,7 +268,7 @@ jobs: packages: read pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@main + uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@release/26.10 with: arch: "amd64" branch: ${{ inputs.branch }} @@ -287,7 +287,7 @@ jobs: packages: read pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@main + uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@release/26.10 with: build_type: ${{ inputs.build_type || 'branch' }} build-datetime: ${{ needs.build-details.outputs.build-datetime }} @@ -308,7 +308,7 @@ jobs: id-token: write packages: read pull-requests: read - uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@main + uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@release/26.10 secrets: CONDA_RAPIDSAI_WHEELS_NIGHTLY_TOKEN: ${{ secrets.CONDA_RAPIDSAI_WHEELS_NIGHTLY_TOKEN }} RAPIDSAI_PYPI_TOKEN: ${{ secrets.RAPIDSAI_PYPI_TOKEN }} @@ -329,7 +329,7 @@ jobs: packages: read pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@main + uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@release/26.10 with: build_type: ${{ inputs.build_type || 'branch' }} build-datetime: ${{ needs.build-details.outputs.build-datetime }} @@ -350,7 +350,7 @@ jobs: id-token: write packages: read pull-requests: read - uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@main + uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@release/26.10 secrets: CONDA_RAPIDSAI_WHEELS_NIGHTLY_TOKEN: ${{ secrets.CONDA_RAPIDSAI_WHEELS_NIGHTLY_TOKEN }} RAPIDSAI_PYPI_TOKEN: ${{ secrets.RAPIDSAI_PYPI_TOKEN }} @@ -365,7 +365,7 @@ jobs: devcontainers: name: Build devcontainers secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/build-devcontainers.yaml@main + uses: rapidsai/shared-workflows/.github/workflows/build-devcontainers.yaml@release/26.10 permissions: packages: write with: diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index dc5a1e1852..dff6eff137 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -38,7 +38,7 @@ jobs: - wheel-tests-cuvs - devcontainer - telemetry-setup - uses: rapidsai/shared-workflows/.github/workflows/pr-builder.yaml@main + uses: rapidsai/shared-workflows/.github/workflows/pr-builder.yaml@release/26.10 permissions: contents: read if: always() @@ -56,7 +56,7 @@ jobs: if: ${{ vars.TELEMETRY_ENABLED == 'true' }} uses: rapidsai/shared-actions/telemetry-dispatch-stash-base-env-vars@main build-details: - uses: rapidsai/shared-workflows/.github/workflows/compute-build-details.yaml@main + uses: rapidsai/shared-workflows/.github/workflows/compute-build-details.yaml@release/26.10 check-nightly-ci: runs-on: ubuntu-latest permissions: @@ -83,7 +83,7 @@ jobs: contents: read packages: read pull-requests: read - uses: rapidsai/shared-workflows/.github/workflows/changed-files.yaml@main + uses: rapidsai/shared-workflows/.github/workflows/changed-files.yaml@release/26.10 with: files_yaml: | build_docs: @@ -439,7 +439,7 @@ jobs: - '!thirdparty/LICENSES/**' checks: needs: telemetry-setup - uses: rapidsai/shared-workflows/.github/workflows/checks.yaml@main + uses: rapidsai/shared-workflows/.github/workflows/checks.yaml@release/26.10 permissions: contents: read with: @@ -469,7 +469,7 @@ jobs: packages: read pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@main + uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@release/26.10 with: build_type: pull-request build-datetime: ${{ needs.build-details.outputs.build-datetime }} @@ -484,7 +484,7 @@ jobs: packages: read pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@main + uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@release/26.10 if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_cpp with: build_type: pull-request @@ -497,7 +497,7 @@ jobs: id-token: write packages: read pull-requests: read - uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-post-build-checks.yaml@main + uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-post-build-checks.yaml@release/26.10 with: build_type: pull-request symbol_exclusions: (void (thrust::|cub::)) @@ -511,7 +511,7 @@ jobs: packages: read pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@main + uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@release/26.10 with: build_type: pull-request build-datetime: ${{ needs.build-details.outputs.build-datetime }} @@ -527,7 +527,7 @@ jobs: packages: read pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@main + uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@release/26.10 if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python_conda with: build_type: pull-request @@ -536,7 +536,7 @@ jobs: needs: checks permissions: contents: read - uses: rapidsai/shared-workflows/.github/workflows/compute-matrix.yaml@main + uses: rapidsai/shared-workflows/.github/workflows/compute-matrix.yaml@release/26.10 with: build_type: pull-request matrix_name: conda-cpp-build @@ -549,7 +549,7 @@ jobs: packages: read pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@main + uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@release/26.10 strategy: fail-fast: false matrix: ${{ fromJSON(needs.rocky8-clib-standalone-build-matrix.outputs.matrix) }} @@ -569,7 +569,7 @@ jobs: needs: [rocky8-clib-standalone-build, changed-files] permissions: contents: read - uses: rapidsai/shared-workflows/.github/workflows/compute-matrix.yaml@main + uses: rapidsai/shared-workflows/.github/workflows/compute-matrix.yaml@release/26.10 if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_cpp with: build_type: pull-request @@ -583,7 +583,7 @@ jobs: packages: read pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@main + uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@release/26.10 strategy: fail-fast: false matrix: ${{ fromJSON(needs.rocky8-clib-tests-matrix.outputs.matrix) }} @@ -599,7 +599,7 @@ jobs: needs: [conda-cpp-build, changed-files] permissions: contents: read - uses: rapidsai/shared-workflows/.github/workflows/compute-matrix.yaml@main + uses: rapidsai/shared-workflows/.github/workflows/compute-matrix.yaml@release/26.10 if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_java || fromJSON(needs.changed-files.outputs.changed_file_groups).test_cpp with: build_type: pull-request @@ -614,7 +614,7 @@ jobs: packages: read pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@main + uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@release/26.10 # Artifacts are not published from these jobs, so it's safe to run for multiple CUDA versions. # If these jobs start producing artifacts, the names will have to differentiate between CUDA versions. strategy: @@ -639,7 +639,7 @@ jobs: packages: read pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@main + uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@release/26.10 # Artifacts are not published from these jobs, so it's safe to run for multiple CUDA versions. # If these jobs start producing artifacts, the names will have to differentiate between CUDA versions. strategy: @@ -657,7 +657,7 @@ jobs: needs: [conda-cpp-build, changed-files] permissions: contents: read - uses: rapidsai/shared-workflows/.github/workflows/compute-matrix.yaml@main + uses: rapidsai/shared-workflows/.github/workflows/compute-matrix.yaml@release/26.10 if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_rust || fromJSON(needs.changed-files.outputs.changed_file_groups).test_cpp with: build_type: pull-request @@ -672,7 +672,7 @@ jobs: packages: read pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@main + uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@release/26.10 # Artifacts are not published from these jobs, so it's safe to run for multiple CUDA versions. # If these jobs start producing artifacts, the names will have to differentiate between CUDA versions. strategy: @@ -688,7 +688,7 @@ jobs: needs: [conda-cpp-build, changed-files] permissions: contents: read - uses: rapidsai/shared-workflows/.github/workflows/compute-matrix.yaml@main + uses: rapidsai/shared-workflows/.github/workflows/compute-matrix.yaml@release/26.10 if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_go || fromJSON(needs.changed-files.outputs.changed_file_groups).test_cpp with: build_type: pull-request @@ -703,7 +703,7 @@ jobs: packages: read pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@main + uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@release/26.10 # Artifacts are not published from these jobs, so it's safe to run for multiple CUDA versions. # If these jobs start producing artifacts, the names will have to differentiate between CUDA versions. strategy: @@ -723,7 +723,7 @@ jobs: packages: read pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@main + uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@release/26.10 with: build_type: pull-request node_type: "gpu-l4-latest-1" @@ -739,7 +739,7 @@ jobs: packages: read pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@main + uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@release/26.10 with: build_type: pull-request build-datetime: ${{ needs.build-details.outputs.build-datetime }} @@ -758,7 +758,7 @@ jobs: packages: read pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@main + uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@release/26.10 with: build_type: pull-request build-datetime: ${{ needs.build-details.outputs.build-datetime }} @@ -777,7 +777,7 @@ jobs: packages: read pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@main + uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@release/26.10 if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python_wheels with: build_type: pull-request @@ -791,7 +791,7 @@ jobs: pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] needs: telemetry-setup - uses: rapidsai/shared-workflows/.github/workflows/build-in-devcontainer.yaml@main + uses: rapidsai/shared-workflows/.github/workflows/build-in-devcontainer.yaml@release/26.10 with: arch: '["amd64", "arm64"]' cuda: '["13.3"]' diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index c2ff71b3a2..16d967973b 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -32,7 +32,7 @@ jobs: id-token: write packages: read pull-requests: read - uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-post-build-checks.yaml@main + uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-post-build-checks.yaml@release/26.10 with: build_type: ${{ inputs.build_type }} branch: ${{ inputs.branch }} @@ -48,7 +48,7 @@ jobs: packages: read pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@main + uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@release/26.10 with: build_type: ${{ inputs.build_type }} branch: ${{ inputs.branch }} @@ -63,7 +63,7 @@ jobs: packages: read pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@main + uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@release/26.10 with: build_type: ${{ inputs.build_type }} branch: ${{ inputs.branch }} @@ -73,7 +73,7 @@ jobs: conda-java-build-and-tests-matrix: permissions: contents: read - uses: rapidsai/shared-workflows/.github/workflows/compute-matrix.yaml@main + uses: rapidsai/shared-workflows/.github/workflows/compute-matrix.yaml@release/26.10 with: build_type: ${{ inputs.build_type }} matrix_name: conda-cpp-build @@ -87,7 +87,7 @@ jobs: packages: read pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@main + uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@release/26.10 # Artifacts are not published from these jobs, so it's safe to run for multiple CUDA versions. # If these jobs start producing artifacts, the names will have to differentiate between CUDA versions. strategy: @@ -115,7 +115,7 @@ jobs: packages: read pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@main + uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@release/26.10 # Artifacts are not published from these jobs, so it's safe to run for multiple CUDA versions. # If these jobs start producing artifacts, the names will have to differentiate between CUDA versions. strategy: @@ -140,7 +140,7 @@ jobs: packages: read pull-requests: read secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@main + uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@release/26.10 with: build_type: ${{ inputs.build_type }} branch: ${{ inputs.branch }} diff --git a/.github/workflows/trigger-breaking-change-alert.yaml b/.github/workflows/trigger-breaking-change-alert.yaml index 5a92e2c761..116531f088 100644 --- a/.github/workflows/trigger-breaking-change-alert.yaml +++ b/.github/workflows/trigger-breaking-change-alert.yaml @@ -18,7 +18,7 @@ jobs: if: contains(github.event.pull_request.labels.*.name, 'breaking') permissions: contents: read - uses: rapidsai/shared-workflows/.github/workflows/breaking-change-alert.yaml@main + uses: rapidsai/shared-workflows/.github/workflows/breaking-change-alert.yaml@release/26.10 secrets: slack-webhook-url: ${{ secrets.NV_SLACK_BREAKING_CHANGE_NOTIFIER_APP }} with: diff --git a/RAPIDS_BRANCH b/RAPIDS_BRANCH index ba2906d066..b735ab15de 100644 --- a/RAPIDS_BRANCH +++ b/RAPIDS_BRANCH @@ -1 +1 @@ -main +release/26.10 diff --git a/README.md b/README.md index 412b2e6b02..77d2466c6a 100755 --- a/README.md +++ b/README.md @@ -143,7 +143,7 @@ cuvsCagraIndexParamsDestroy(index_params); cuvsResourcesDestroy(res); ``` -For more code examples of the C APIs, including drop-in Cmake project templates, please refer to the [C examples](https://github.com/nvidia/cuvs/tree/main/examples/c) +For more code examples of the C APIs, including drop-in Cmake project templates, please refer to the [C examples](https://github.com/nvidia/cuvs/tree/release/26.10/examples/c) ### Rust API @@ -190,7 +190,7 @@ fn main() -> Result<(), Box> { } ``` -For more code examples of the Rust APIs, including a drop-in project templates, please refer to the [Rust examples](https://github.com/nvidia/cuvs/tree/main/examples/rust). +For more code examples of the Rust APIs, including a drop-in project templates, please refer to the [Rust examples](https://github.com/nvidia/cuvs/tree/release/26.10/examples/rust). ## Contributing diff --git a/cpp/src/cluster/detail/kmeans.cuh b/cpp/src/cluster/detail/kmeans.cuh index 6787f9a421..e3ffb4a439 100644 --- a/cpp/src/cluster/detail/kmeans.cuh +++ b/cpp/src/cluster/detail/kmeans.cuh @@ -394,14 +394,34 @@ void initScalableKMeansPlusPlus(raft::resources const& handle, int niter = std::min(8, (int)ceil(log(psi))); RAFT_LOG_DEBUG("KMeans||: psi = %g, log(psi) = %g, niter = %d ", psi, log(psi), niter); - auto newMinClusterDistanceVec = raft::make_device_vector(handle, n_samples); - // <<<< Step-3 >>> : for O( log(psi) ) times do for (int iter = 0; iter < niter; ++iter) { RAFT_LOG_DEBUG("KMeans|| - Iteration %d: # potential centroids sampled - %d", iter, potentialCentroids.extent(0)); + cuvs::cluster::kmeans::detail::minClusterDistanceCompute( + handle, + X, + potentialCentroids, + minClusterDistanceVec.view(), + L2NormX.view(), + L2NormBuf_OR_DistBuf, + params.metric, + params.batch_samples, + params.batch_centroids, + workspace); + + cuvs::cluster::kmeans::detail::computeClusterCost( + handle, + minClusterDistanceVec.view(), + workspace, + raft::make_device_scalar_view(clusterCost.data()), + raft::identity_op{}, + raft::add_op{}); + + psi = clusterCost.value(stream); + // <<<< Step-4 >>> : Sample each point x in X independently and identify new // potentialCentroids raft::random::uniform( @@ -438,37 +458,6 @@ void initScalableKMeansPlusPlus(raft::resources const& handle, potentialCentroids = raft::make_device_matrix_view(centroidsBuf.data(), tot_centroids, n_features); /// <<<< End of Step-5 >>> - - // Update d(x, C) using only the newly sampled candidates. - if (Cp.extent(0) > 0 && iter + 1 < niter) { - cuvs::cluster::kmeans::detail::minClusterDistanceCompute( - handle, - X, - Cp, - newMinClusterDistanceVec.view(), - L2NormX.view(), - L2NormBuf_OR_DistBuf, - params.metric, - params.batch_samples, - params.batch_centroids, - workspace); - - raft::linalg::map(handle, - minClusterDistanceVec.view(), - raft::min_op{}, - raft::make_const_mdspan(minClusterDistanceVec.view()), - raft::make_const_mdspan(newMinClusterDistanceVec.view())); - - cuvs::cluster::kmeans::detail::computeClusterCost( - handle, - minClusterDistanceVec.view(), - workspace, - raft::make_device_scalar_view(clusterCost.data()), - raft::identity_op{}, - raft::add_op{}); - - psi = clusterCost.value(stream); - } } /// <<<< Step-6 >>> RAFT_LOG_DEBUG("KMeans||: total # potential centroids sampled - %d", diff --git a/examples/go/README.md b/examples/go/README.md index 292ca66114..0da8309e10 100644 --- a/examples/go/README.md +++ b/examples/go/README.md @@ -24,7 +24,7 @@ export CC=clang 2. Install the Go module: ```bash -go get github.com/nvidia/cuvs/go@v26.08.00 # 25.02.00 being your desired version, selected from https://github.com/nvidia/cuvs/tags +go get github.com/nvidia/cuvs/go@v26.10.00 # 25.02.00 being your desired version, selected from https://github.com/nvidia/cuvs/tags ``` Then you can build your project with the usual `go build`. diff --git a/python/cuvs_bench/cuvs_bench/plot/__main__.py b/python/cuvs_bench/cuvs_bench/plot/__main__.py index d88763b86c..fd1b61ecb5 100644 --- a/python/cuvs_bench/cuvs_bench/plot/__main__.py +++ b/python/cuvs_bench/cuvs_bench/plot/__main__.py @@ -6,7 +6,7 @@ # 1: https://github.com/erikbern/ann-benchmarks/blob/main/plot.py # 2: https://github.com/erikbern/ann-benchmarks/blob/main/ann_benchmarks/plotting/utils.py # noqa: E501 # 3: https://github.com/erikbern/ann-benchmarks/blob/main/ann_benchmarks/plotting/metrics.py # noqa: E501 -# License: https://github.com/nvidia/cuvs/blob/main/thirdparty/LICENSES/LICENSE.ann-benchmark # noqa: E501 +# License: https://github.com/nvidia/cuvs/blob/release/26.10/thirdparty/LICENSES/LICENSE.ann-benchmark # noqa: E501 import itertools import os