CUDA vs Vulkan Image Transfer Speed

Hello,

I’m trying to transfer images into GPU memory . I was wondering if CUDA or Vulkan would have a faster transfer. I have already tried it with Vulkan but it takes around 55ms (best case) to transfer images. I need to be less than 10ms.

I haven’t tried CUDA yet. So I was wondering whether CUDA would be faster since it can use DMA.

I would expect in a 10ms period, with appropriate coding techniques, on a current CUDA GPU connected via PCIE gen4x16 link, using cudaMemcpy from host (pinned) to device, you could transfer an image approximately of size 0.20 - 0.24GB. gen5x16 link should approximately double that.

I don’t know that CUDA or Vulkan should be faster. I would assume they are both doing roughly the same thing under the hood, but I don’t have much experience with Vulkan.

1 Like

What is the source of that data? What is the size (in bytes) of each image? If you are transferring data from the host system’s memory to the GPU, the PCIe interconnect will be the bottleneck. With a PCIe gen 4 x16 link you can reach a throughput of 25+ GB/sec one way. Since PCIe uses packetized transport, the effective throughput in terms of user payload is lower when transporting data in small chunks; the maximum throughput is achieved when the individual transfers are in the MB range.

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