Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make device_memory_resource::supports_streams() not pure virtual. Remove derived implementations and calls in RMM #1437

Merged

Conversation

harrism
Copy link
Member

@harrism harrism commented Jan 24, 2024

Closes #1432. Part of #1389

  • Make supports_streams() nonpure
  • Remove supports_streams() from all MRs and tests.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@harrism harrism added feature request New feature or request breaking Breaking change labels Jan 24, 2024
@harrism harrism self-assigned this Jan 24, 2024
@harrism harrism requested a review from a team as a code owner January 24, 2024 02:10
@harrism harrism requested review from wence- and bdice January 24, 2024 02:10
@github-actions github-actions bot added the cpp Pertains to C++ code label Jan 24, 2024
Copy link
Contributor

@wence- wence- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Looks good to me.

For my own understanding, what does "nonpure" mean in this context (I am assuming it isn't the usual functional mathematical meaning of side-effectful).

@@ -299,7 +299,7 @@ class device_memory_resource {
*
* @returns bool true if the resource supports non-null CUDA streams.
*/
[[nodiscard]] virtual bool supports_streams() const noexcept = 0;
[[nodiscard]] virtual bool supports_streams() const noexcept { return false; }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question (non-blocking): This remains virtual so that downstream users don't immediately break? (I must admit that inheritance in C++ is not one of my strong suits)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly. And it's being deprecated as soon as the two downstream PRs (already approved) merge. Then removed in the next release. Nobody uses this, and it's not part of cuda::mr::async_memory_resource

@harrism
Copy link
Member Author

harrism commented Jan 25, 2024

"Pure virtual" means that there is no implementation in the base class. Corrected PR title.

@harrism harrism changed the title Make device_memory_resource::supports_streams() nonpure. Remove derived implementations and calls in RMM Make device_memory_resource::supports_streams() not pure virtual. Remove derived implementations and calls in RMM Jan 25, 2024
@harrism
Copy link
Member Author

harrism commented Jan 26, 2024

/merge

@rapids-bot rapids-bot bot merged commit 19d8ef9 into rapidsai:branch-24.04 Jan 26, 2024
47 checks passed
rapids-bot bot pushed a commit to rapidsai/cudf that referenced this pull request Jan 26, 2024
Part of rapidsai/rmm#1389. This removes now-optional and soon-to-be deprecated `supports_streams()` from cuDF's custom `device_memory_resource` implementations.

Depends on rapidsai/rmm#1437

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

Approvers:
  - Nghia Truong (https://github.com/ttnghia)
  - Bradley Dice (https://github.com/bdice)
  - Yunsong Wang (https://github.com/PointKernel)
  - Michael Schellenberger Costa (https://github.com/miscco)

URL: #14857
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Breaking change cpp Pertains to C++ code feature request New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Make rmm::mr::device_memory_resource::supports_streams() not pure virtual, remove derived implementations.
3 participants