diff --git a/include/rmm/mr/device/device_memory_resource.hpp b/include/rmm/mr/device/device_memory_resource.hpp index 5d7894995..97ae85449 100644 --- a/include/rmm/mr/device/device_memory_resource.hpp +++ b/include/rmm/mr/device/device_memory_resource.hpp @@ -304,21 +304,32 @@ class device_memory_resource { /** * @brief Query whether the resource supports the get_mem_info API. * + * @deprecated Use rmm::available_device_memory instead. + * * @return bool true if the resource supports get_mem_info, false otherwise. */ - [[nodiscard]] virtual bool supports_get_mem_info() const noexcept { return false; }; + [[deprecated("Use rmm::available_device_memory instead.")]] // + [[nodiscard]] virtual bool + supports_get_mem_info() const noexcept + { + return false; + }; /** * @brief Queries the amount of free and total memory for the resource. * + * @deprecated Use rmm::available_device_memory instead. + * * @param stream the stream whose memory manager we want to retrieve * * @returns a pair containing the free memory in bytes in .first and total amount of memory in * .second */ - [[nodiscard]] std::pair get_mem_info(cuda_stream_view stream) const + [[deprecated("Use rmm::available_device_memory instead.")]] // + [[nodiscard]] std::pair + get_mem_info(cuda_stream_view stream) const { - return do_get_mem_info(stream); + return {0, 0}; } /** @@ -374,20 +385,6 @@ class device_memory_resource { { return this == &other; } - - /** - * @brief Get free and available memory for memory resource - * - * @throws std::runtime_error if we could not get free / total memory - * - * @param stream the stream being executed on - * @return std::pair with available and free memory for resource - */ - [[nodiscard]] virtual std::pair do_get_mem_info( - cuda_stream_view stream) const - { - return {0, 0}; - } }; static_assert(cuda::mr::async_resource_with); /** @} */ // end of group diff --git a/include/rmm/mr/pinned_host_memory_resource.hpp b/include/rmm/mr/pinned_host_memory_resource.hpp index c51af4182..0748302c2 100644 --- a/include/rmm/mr/pinned_host_memory_resource.hpp +++ b/include/rmm/mr/pinned_host_memory_resource.hpp @@ -177,26 +177,6 @@ class pinned_host_memory_resource { */ bool operator!=(const pinned_host_memory_resource&) const { return false; } - /** - * @brief Query whether the resource supports reporting free and available memory. - * - * @return false - */ - static bool supports_get_mem_info() { return false; } - - /** - * @brief Query the total amount of memory and free memory available for allocation by this - * resource. - * - * @throws nothing - * - * @return std::pair containing 0 for both total and free memory. - */ - [[nodiscard]] static std::pair get_mem_info(cuda::stream_ref) noexcept - { - return {0, 0}; - } - /** * @brief Enables the `cuda::mr::device_accessible` property *