CPU, GPU AND RAM

GPU peer copies: transfer capability and execution path

In this article
THE QUICK TAKE

Peer-copy performance follows the actual device pair and transport path; successful transfer and shared pointer syntax do not prove direct local-speed access.

A device-to-device transfer can use different physical paths depending on peer capability and system topology. A copy call that succeeds does not prove that the bytes travelled directly between GPUs. Understanding the distinction between peer mapping, bulk copy, and fine-grained remote access helps explain why similar-looking transfers behave differently across a workstation and a connected GPU server.

Peer support is a relationship between devices

A machine can contain several GPUs without every pair exposing the same peer capabilities. Query the intended source and destination relationship rather than inferring it from identical product names. Placement behind switches and other platform details matter. Record the logical device identifiers alongside the physical topology. Otherwise a benchmark can compare different paths after a device-order change while appearing to test the same source-code configuration.

Primary reference: CUDA Programming Guide: Programming Systems with Multiple GPUs.

A bulk copy differs from remote loads

A bulk transfer moves a range for later local use. Remote kernel loads fetch data through a peer-access path during computation. The latter can save an initial copy but can repeatedly pay interconnect access costs. A reused tensor and a sparsely sampled control structure may favor different choices. Evaluate the access pattern and reuse count rather than treating every operation involving a peer pointer as the same transport primitive.

Primary reference: CUDA Programming Guide.

Ordering crosses device boundaries explicitly

A consumer kernel on the destination must not read a buffer before the relevant transfer has completed. Independent default streams on separate devices do not provide a universal global sequence. Use documented stream and event relationships appropriate to the transfer path. Similarly, a source producer must finish before its output is copied. Draw both dependencies: production before transport, and transport before consumption, rather than synchronizing only the final reader.

Primary reference: CUDA C++ Best Practices Guide.

A direct path still shares hardware resources with other traffic. Simultaneous transfers, kernel memory accesses, and collective communication can change effective performance. Test one direction, the reverse direction, and representative concurrent work separately. Do not interpret a concurrent slowdown as proof that peer access is disabled. First distinguish capability, selected path, and contention; each is a different explanation requiring different evidence and potentially a different remedy.

Benchmark a transport phase rather than an enqueue

Host submission time can be much shorter than transfer completion time. Measure an appropriate completed interval and report useful bytes, direction, device pair, and concurrent activity. Separate setup costs from repeated copies while retaining both in the application budget where relevant. Validate copied contents using deterministic test data. A fast enqueue with a missing dependency can otherwise look like an excellent transfer benchmark while the actual consumer reads incomplete data.

Related reading: A GPU inference benchmark you can trust; Reproducible inference stacks: preserving a GPU pilot’s result.

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles