-
Notifications
You must be signed in to change notification settings - Fork 201
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 host_buffer
class
#260
Comments
I assume this would be a crazy effort to backport to C++14? We typically get pushback from requiring newer compiler versions / system libraries. |
Yeah, it's not really possible to backport. You'd be better off just re-implementing all of the memory pool logic or using some other open source host memory pool. That said, we can probably insulate user libraries from needing C++17. We can wrap the C++17 bits in include guards and throw an error if someone tries to use the host memory pools pre-c++17. Note that providing a host memory pool is orthogonal to providing a |
I would leave host memory pools to future work. |
Yea I understand, just that there likely will be enterprise customers that want the memory pool and C++14 support, but beggars can't be choosers 😄. |
Would using Boost help? |
We don't want RMM to depend on Boost. |
Yeah that makes sense. Just thinking about what alternatives we might have 🙂 |
What if we take this as an opportunity to start using the Conda compilers? That would put us on GCC 7.3.0, which has C++17 support (unless I've missed something). Besides this was something we were planning to do anyways. ( rapidsai/cudf#1210 ) |
I think we should just stick to C++14, and leave host memory pools for future work. |
That's only for conda packages though. We have people wanting to build from source themselves without conda and can't necessarily guarantee a new enough compiler for C++17. We've already had pushback for C++14 😄. |
Agreed host memory pool is future work, just wanted to bring it up since we're talking about adding host memory management to RMM. |
Ok makes sense. Thanks for the context and thanks for putting up with suggestions you likely have already considered 🙂 |
Can this issue be closed now that host_memory_resource exists and rmm::alloc/free are going to be dropped? |
We still need a |
Ah yes, I got that confused. |
This issue has been marked rotten due to no recent activity in the past 90d. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed. |
This issue has been marked stale due to no recent activity in the past 30d. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed. This issue will be marked rotten if there is no activity in the next 60d. |
Still desired |
(for context this came up today when discussing how to improve spilling and serialization performance) cc @quasiben (for awareness) |
There's unlikely to be any movement here until NVIDIA/libcudacxx#158 is complete in the next month or so. |
Thanks for the update Jake 🙂 |
This conversation is quite stale now, so I'll give a quick update on the status quo:
|
Would you distinguish between async and synchronous host_buffer and device_buffer classes (so there would be 4 classes)? Or would you have two classes with both sync and async methods? Or would host_buffer always be synchronous and device_buffer always async? |
Is your feature request related to a problem? Please describe.
It has come up in several independent conversations w/ @jakirkham and others that it would be nice to have RMM provide a corollary to
device_buffer
for host allocated memory. See conversation in #141 and #216In short, it would be convenient to have a common abstraction for host memory allocations used by RAPIDS libraries. This would allow for things like having pinned host memory allocations for use in more performant device to host memory spilling.
Describe the solution you'd like
Add a
rmm::host_buffer
class to act as a host memory corollary todevice_buffer
, i.e., untyped, uninitialized host memory allocation.Additional context
Note that this opens a (few) sizable can of worms of questions that will eventually need to be answered. From my comment here
rmm::alloc
be renamed tormm::device_alloc
and we add armm::host_alloc
?Here's what I think the simplest and least effort path forward is:
host_memory_resource
base class mirrored fromdevice_memory_resource
.host_buffer
that accepts ahost_memory_resource*
to use for allocationget_default_resource/set_default_resource()
)rmm::alloc/free
for host memory allocationsThe text was updated successfully, but these errors were encountered: