From 8857d5fd75fe390f19382e745c0e28235e266dc0 Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Tue, 1 Sep 2026 05:56:27 -0500 Subject: [PATCH 1/2] Adapt pooled stream access to cuda::stream_ref --- cpp/include/nvforest/detail/owning_buffer/gpu.hpp | 3 ++- cpp/include/nvforest/handle.hpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cpp/include/nvforest/detail/owning_buffer/gpu.hpp b/cpp/include/nvforest/detail/owning_buffer/gpu.hpp index ba6030f..1ac708b 100644 --- a/cpp/include/nvforest/detail/owning_buffer/gpu.hpp +++ b/cpp/include/nvforest/detail/owning_buffer/gpu.hpp @@ -10,6 +10,7 @@ #include +#include #include #include @@ -26,7 +27,7 @@ struct owning_buffer { cudaStream_t stream) noexcept(false) : data_{[&device_id, &size, &stream]() { auto device_context = device_setter{device_id}; - return rmm::device_buffer{size * sizeof(value_type), rmm::cuda_stream_view{stream}}; + return rmm::device_buffer{size * sizeof(value_type), cuda::stream_ref{stream}}; }()} { } diff --git a/cpp/include/nvforest/handle.hpp b/cpp/include/nvforest/handle.hpp index fd1f3bb..34e7d79 100644 --- a/cpp/include/nvforest/handle.hpp +++ b/cpp/include/nvforest/handle.hpp @@ -18,7 +18,7 @@ struct handle_t { handle_t(raft::handle_t const& raft_handle) : raft_handle_{&raft_handle} {} auto get_next_usable_stream() const { - return cuda_stream{raft_handle_->get_next_usable_stream().value()}; + return cuda_stream{raft_handle_->get_next_usable_stream().get()}; } auto get_stream_pool_size() const { return raft_handle_->get_stream_pool_size(); } auto get_usable_stream_count() const { return std::max(get_stream_pool_size(), std::size_t{1}); } From 4a4cd6b972d9ccdc008b5c89e484ce2e59db9a5b Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Wed, 2 Sep 2026 17:48:54 -0500 Subject: [PATCH 2/2] Use the CUDA stream umbrella header --- cpp/include/nvforest/detail/owning_buffer/gpu.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/include/nvforest/detail/owning_buffer/gpu.hpp b/cpp/include/nvforest/detail/owning_buffer/gpu.hpp index 1ac708b..360dfde 100644 --- a/cpp/include/nvforest/detail/owning_buffer/gpu.hpp +++ b/cpp/include/nvforest/detail/owning_buffer/gpu.hpp @@ -10,7 +10,7 @@ #include -#include +#include #include #include