Expand description
P2P (peer-to-peer) topology + cross-device async memcpy.
cudarc 0.19 exposes peer access only at the sys layer:
cuDeviceCanAccessPeer, cuCtxEnablePeerAccess,
cuMemcpyPeerAsync. This module wraps those with explicit
unsafe blocks behind an actor surface.
Lifecycle:
- Construct with N
ActorRef<DeviceMsg>siblings. - Send
EnableAll— actor snapshots each device’sArc<CudaContext>, probescuDeviceCanAccessPeerfor every pair, callscuCtxEnablePeerAccesson directions that succeed, and replies with the resultingP2pGraph. - Send
CopyF32 { src, src_device, dst, dst_device }— actor issuescuMemcpyPeerAsyncon a fresh destination-side stream and replies aftercudaStreamSynchronize.