I am currently working with GPUDirect RDMA and have created a test application to evaluate its performance. The application works fine when I use a buffer allocated with cuMemAlloc
. Here are the steps I followed successfully:
- Allocate memory using
cuMemAlloc
. - Set pointer attribute using
cuPointerSetAttribute
. - Pin the memory.
- Perform RDMA operations.
- Unpin the memory.
Now, I want to use surface memory (bound to arrays) as RDMA buffers. However, I’m facing issues with this approach. Here are the steps I attempted:
- Allocate memory using
cudaMallocArray
. - Bind the allocated array to a surface.
- Attempt to set the pointer attribute with
cuPointerSetAttribute
(this step fails as it requires aCUdeviceptr
). - Pin the memory.
- Perform RDMA operations.
- Unpin the memory.
It seems that cuPointerSetAttribute
does not accept memory allocated with cudaMallocArray
as it requires a CUdeviceptr
.
My Question: Is it possible to use surface memory (bound to arrays) as RDMA buffers, or only CUdeviceptr
buffers allowed for RDMA operations with GPUDirect RDMA? If it’s possible, what is the correct procedure to set this up?
Thank you for your assistance!