Skip to content

Commit

Permalink
Deprecate rmm::mr::device_memory_resource::supports_streams() (#1452)
Browse files Browse the repository at this point in the history
Deprecates now unused `device_memory_resource::supports_streams()`. Will be removed in next release (24.06).

Merge after:
* rapidsai/raft#2121
* rapidsai/cudf#14857

Closes #1433

Authors:
  - Mark Harris (https://github.com/harrism)

Approvers:
  - Michael Schellenberger Costa (https://github.com/miscco)
  - Bradley Dice (https://github.com/bdice)

URL: #1452
  • Loading branch information
harrism authored Feb 1, 2024
1 parent d32e665 commit c583fa1
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 c583fa1

Please sign in to comment.