Medium
cudaMemcpyPeerAsync versus staging through a pinned host buffer
Two GPUs sit in the same node. Version A calls cudaDeviceEnablePeerAccess and then cudaMemcpyPeerAsync to move data directly from GPU 0 to GPU 1. Version B (peer access not enabled/available) copies GPU 0 -> pinned host buffer -> GPU 1 using two separate cudaMemcpy calls. What's the expected performance difference, and why do multi-GPU libraries like NCCL prioritize the Version A path?
29 of 46 in GPU / CUDA