-
Notifications
You must be signed in to change notification settings - Fork 233
Open
Labels
? - Needs TriageNeed team to review and classifyNeed team to review and classifyfeature requestNew feature or requestNew feature or request
Description
Is your feature request related to a problem? Please describe.
Currently RMM device buffers underlying data ptr ownership can not be released/ transferred.
Describe the solution you'd like
I suggest a util method like,
template<typename BufferT>
static std::unique_ptr<BufferT> device_buffer::move_buffer(std::unique_ptr<rmm::device_buffer> src) {
auto dest = std::make_unique<BufferT>(src->_data, src->_size, src->_stream, src->_mr);
src->_size = 0;
src->_capacity = 0;
src->_data = nullptr;
return dest;
}OR a release method that releases the contents. (I prefer the former, because the it will be clear that the src buffer needs to be moved into the util method. this will prevent usages-after-move).
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context, code examples, or references to existing implementations about the feature request here.
Metadata
Metadata
Assignees
Labels
? - Needs TriageNeed team to review and classifyNeed team to review and classifyfeature requestNew feature or requestNew feature or request
Type
Projects
Status
To-do