Skip to content

Commit

Permalink
Deprecate rmm::mr::device_memory_resource::supports_streams()
Browse files Browse the repository at this point in the history
  • Loading branch information
harrism committed Jan 31, 2024
1 parent d32e665 commit 6bb0ef2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
9 changes: 8 additions & 1 deletion include/rmm/mr/device/device_memory_resource.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,16 @@ class device_memory_resource {
* @brief Query whether the resource supports use of non-null CUDA streams for
* allocation/deallocation.
*
* @deprecated Functionality removed in favor of cuda::mr::async_memory_resource.
*
* @returns bool true if the resource supports non-null CUDA streams.
*/
[[nodiscard]] virtual bool supports_streams() const noexcept { return false; }
[[deprecated("Functionality removed in favor of cuda::mr::async_memory_resource.")]] //
[[nodiscard]] virtual bool
supports_streams() const noexcept
{
return false;
}

/**
* @brief Query whether the resource supports the get_mem_info API.
Expand Down
3 changes: 1 addition & 2 deletions tests/mock_resource.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, 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.
Expand All @@ -23,7 +23,6 @@ namespace rmm::test {

class mock_resource : public rmm::mr::device_memory_resource {
public:
MOCK_METHOD(bool, supports_streams, (), (const, override, noexcept));
MOCK_METHOD(void*, do_allocate, (std::size_t, cuda_stream_view), (override));
MOCK_METHOD(void, do_deallocate, (void*, std::size_t, cuda_stream_view), (override));
using size_pair = std::pair<std::size_t, std::size_t>;
Expand Down

0 comments on commit 6bb0ef2

Please sign in to comment.