From 14a394cd4b7fc38498d04bcb7f2dc82468a97db4 Mon Sep 17 00:00:00 2001 From: Mark Harris <783069+harrism@users.noreply.github.com> Date: Wed, 24 Jan 2024 02:20:52 +0000 Subject: [PATCH 1/2] Remove supports_streams from custom MRs --- cpp/bench/ann/src/common/cuda_huge_page_resource.hpp | 10 +--------- cpp/bench/ann/src/common/cuda_pinned_resource.hpp | 12 +----------- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/cpp/bench/ann/src/common/cuda_huge_page_resource.hpp b/cpp/bench/ann/src/common/cuda_huge_page_resource.hpp index 9132db7c04..b88ef6113b 100644 --- a/cpp/bench/ann/src/common/cuda_huge_page_resource.hpp +++ b/cpp/bench/ann/src/common/cuda_huge_page_resource.hpp @@ -41,14 +41,6 @@ class cuda_huge_page_resource final : public rmm::mr::device_memory_resource { cuda_huge_page_resource& operator=(cuda_huge_page_resource const&) = default; cuda_huge_page_resource& operator=(cuda_huge_page_resource&&) = default; - /** - * @brief Query whether the resource supports use of non-null CUDA streams for - * allocation/deallocation. `cuda_huge_page_resource` does not support streams. - * - * @returns bool false - */ - [[nodiscard]] bool supports_streams() const noexcept override { return false; } - /** * @brief Query whether the resource supports the get_mem_info API. * @@ -129,4 +121,4 @@ class cuda_huge_page_resource final : public rmm::mr::device_memory_resource { return std::make_pair(free_size, total_size); } }; -} // namespace raft::mr \ No newline at end of file +} // namespace raft::mr diff --git a/cpp/bench/ann/src/common/cuda_pinned_resource.hpp b/cpp/bench/ann/src/common/cuda_pinned_resource.hpp index 28ca691f86..dc9905ecaa 100644 --- a/cpp/bench/ann/src/common/cuda_pinned_resource.hpp +++ b/cpp/bench/ann/src/common/cuda_pinned_resource.hpp @@ -45,14 +45,6 @@ class cuda_pinned_resource final : public rmm::mr::device_memory_resource { cuda_pinned_resource& operator=(cuda_pinned_resource const&) = default; cuda_pinned_resource& operator=(cuda_pinned_resource&&) = default; - /** - * @brief Query whether the resource supports use of non-null CUDA streams for - * allocation/deallocation. `cuda_pinned_resource` does not support streams. - * - * @returns bool false - */ - [[nodiscard]] bool supports_streams() const noexcept override { return false; } - /** * @brief Query whether the resource supports the get_mem_info API. * @@ -66,8 +58,6 @@ class cuda_pinned_resource final : public rmm::mr::device_memory_resource { * * The returned pointer has at least 256B alignment. * - * @note Stream argument is ignored - * * @throws `rmm::bad_alloc` if the requested allocation could not be fulfilled * * @param bytes The size, in bytes, of the allocation @@ -127,4 +117,4 @@ class cuda_pinned_resource final : public rmm::mr::device_memory_resource { return std::make_pair(free_size, total_size); } }; -} // namespace raft::mr \ No newline at end of file +} // namespace raft::mr From 0ed61fd4ede9a2580dba26f124a26ece7f11fbe6 Mon Sep 17 00:00:00 2001 From: Mark Harris <783069+harrism@users.noreply.github.com> Date: Wed, 24 Jan 2024 02:23:51 +0000 Subject: [PATCH 2/2] Add-back removed note --- cpp/bench/ann/src/common/cuda_pinned_resource.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cpp/bench/ann/src/common/cuda_pinned_resource.hpp b/cpp/bench/ann/src/common/cuda_pinned_resource.hpp index dc9905ecaa..4216a9a720 100644 --- a/cpp/bench/ann/src/common/cuda_pinned_resource.hpp +++ b/cpp/bench/ann/src/common/cuda_pinned_resource.hpp @@ -58,6 +58,8 @@ class cuda_pinned_resource final : public rmm::mr::device_memory_resource { * * The returned pointer has at least 256B alignment. * + * @note Stream argument is ignored + * * @throws `rmm::bad_alloc` if the requested allocation could not be fulfilled * * @param bytes The size, in bytes, of the allocation