DMA to/from GPU memory

This is with regards to Jetson Nano
I have a CUDA program that performs cudaHostAlloc(). The app. also sets CU_POINTER_ATTRIBUTE_SYNC_MEMOPS for this memory region. Further this memory is pinned using nvidia_p2p_get_pages and then mapped with nvidia_p2p_dma_map_pages. At a later stage a GPU updates this memory region and asks the host to DMA out of it.

If a device is going to DMA to/from this pinned memory is there a need to perform dma_sync_sg_for_{device,cpu} at the kernel level before and after outgoing and incoming DMA transfers to this region, respectively or can the region be considered coherent.



Just want to check do you use Orin Nano or Jetson Nano?

Our RDMA feature is not available for the Jetson Nano.
You will need to user a newer platform to get the support.

Below is the sample for your reference:



I am using a Orin Nano. Thank you pointing me to the sample.


In our official sample, there is a cudaDeviceSynchronize call before DMA process.



Thank you for pointing that out. Truly, appreciate your input.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.