# Direct memory transfer from GPU to GPU?

**URL:** <https://forums.developer.nvidia.com/t/direct-memory-transfer-from-gpu-to-gpu/21169>\
**Category:** CUDA Programming and Performance\
**Created:** [February 22, 2011, 2:20am UTC](https://forums.developer.nvidia.com/t/direct-memory-transfer-from-gpu-to-gpu/21169 "2011-02-22T02:20:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bendudu](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@Bendudu](https://forums.developer.nvidia.com/u/Bendudu)\
**Post date:** [February 22, 2011, 2:20am UTC](https://forums.developer.nvidia.com/t/direct-memory-transfer-from-gpu-to-gpu/21169/1 "2011-02-22T02:20:15Z")

</div>

Hi all

I am developing a dual-GPU system, where a data set is processed first by GPU-1 and then by GPU-2.

I opened a buffer in the host to put the processed data by GPU-1, using Device-to-Host copy, and then transfer them to GPU-2 by Host-to-Device copy.

This seems not that efficient due to the PCI-E bandwidth limit. So is there some direct way to transfer memory from GPU to GPU? How about SLI? Does CUDA support SLI?

Thanks

Ben

---

<div class="post-metadata">

**Author:** ![Sarnath](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/sarnath/32/9742_2.png) [@Sarnath](https://forums.developer.nvidia.com/u/Sarnath)\
**Post date:** [February 22, 2011, 6:08am UTC](https://forums.developer.nvidia.com/t/direct-memory-transfer-from-gpu-to-gpu/21169/2 "2011-02-22T06:08:25Z")

</div>

GPUDirect Technology can help you if your system satisfies its requirement.  
It uses a shared-pinned memory-buffer to do the copy.

---

<div class="post-metadata">

**Author:** ![tmurray](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@tmurray](https://forums.developer.nvidia.com/u/tmurray)\
**Post date:** [February 22, 2011, 6:56am UTC](https://forums.developer.nvidia.com/t/direct-memory-transfer-from-gpu-to-gpu/21169/3 "2011-02-22T06:56:57Z")

</div>

GPUDirect wouldn’t help here, as both targets are GPUs and thus both can already share pinned system memory via the CUDA API.

As for the original question… you can’t do a direct transfer in CUDA today.

---

<div class="post-metadata">

**Author:** ![Sarnath](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/sarnath/32/9742_2.png) [@Sarnath](https://forums.developer.nvidia.com/u/Sarnath)\
**Post date:** [February 22, 2011, 7:26am UTC](https://forums.developer.nvidia.com/t/direct-memory-transfer-from-gpu-to-gpu/21169/4 "2011-02-22T07:26:06Z")

</div>

Oops… Thanks for correcting. GPUDirect has more relevance in a cluster envmt…where the infiniband adapter and GPU share a pinned buffer to reduce buffer copies for GPU-GPU communication.
