Make internal host_allocator stream ordered - #23574
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
|
/ok to test 8ebdb6c |
|
Summary This PR attempted to replace the cudaMallocHost-backed pinned pool with a CUDA native host memory pool
The implementation compiled and all local tests passed on CUDA 12.8 / sm_86 (Ampere). However, CI exposed three Root cause cudaMallocFromPoolAsync with cudaMemLocationTypeHost does not behave as a drop-in replacement for cudaMallocHost.
Specific failures Failure: cudaMemPoolCreate Future path There is a device attribute — cudaDevAttrHostMemoryPoolsSupported (144, added in CUDA 13.x headers) — that correctly |
|
We do need to replace cudaMemcpyDeviceToDevice with cudaMemcpyDefault. Where is that source code? Thrust or cuDF? |
|
For CUDA 12.x we need to use a different set of APIs for pinned memory, I think. There is a bit of nuance here. See rapidsai/rmm#2054. |
|
I opened #23605 to use |
|
/ok to test |
Description
Changes the
cudf::detail::rmm_host_allocatorimplementation to make it stream-ordered. Uses the feature ofcudaMemPoolCreatewhich allows creating a pinned host memory pool that can be used appropriately withcudaMemcpyAsyncto keep the host memory alive in the scope of the stream.This will allow usages of the various
cudf::detail::host_vectorto not require a stream synchronize when copying to the device. Several synchronize calls added recently can likely be removed with this change.Checklist