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

[FEA] Add a convenience alias in RMM for cuda::mr::async_resource_ref<cuda::mr::device_accessible> #1442

Closed
Tracked by #16 ...
harrism opened this issue Jan 30, 2024 · 0 comments · Fixed by #1441
Closed
Tracked by #16 ...
Assignees
Labels
feature request New feature or request

Comments

@harrism
Copy link
Member

harrism commented Jan 30, 2024

To make it easier for other libraries to use resource_refs instead of device_memory_resource pointers, add a new header with alias for the commonly used cuda::mr::async_resource_ref<cuda::mr::device_accessible>.

@harrism harrism added the feature request New feature or request label Jan 30, 2024
@harrism harrism self-assigned this Jan 30, 2024
rapids-bot bot pushed a commit that referenced this issue Jan 31, 2024
Adds a new header `include/rmm/resource_ref.hpp` that currently just contains a single `using` alias to make it easier to spell a device-accessible async_resource_ref.  

Closes #1442 

`rmm::device_async_resource_ref` is an alias for `cuda::mr::async_resource_ref<cuda::mr::device_accessible>`.

This is 30 characters vs. 57. It is shorter than the currently used resource pointer spelling: `rmm::mr::device_memory_resource*`.

Also updates tests to use this alias. 

Also makes one unrelated doc change, I noticed `pinned_host_memory_resource` was not added to a doxygen group, so I fixed that.

I was going to put this in cuDF, but @bdice [suggested maybe it would be useful to have it in RMM](rapidsai/cudf#14873 (comment)).

Authors:
  - Mark Harris (https://github.com/harrism)
  - Michael Schellenberger Costa (https://github.com/miscco)

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

URL: #1441
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant