Every synchronization in multi-GPU training reduces to collective primitives. Let each rank hold a data shard of
S bytes and there be N ranks: ①
AllGather (each rank broadcasts its shard to the other N−1 ranks; at the end every rank holds all
NS bytes): each rank must receive N−1 shards, volume
(N−1)S — every rank's data is read once by each of the other N−1 ranks; ②
ReduceScatter (reduce, then keep only one's own part of the result):
NN−1S per rank; ③
AllReduce (reduce then distribute to all) =
ReduceScatter + AllGather: the ring implementation costs
2NN−1S→2S per rank (for large N each rank transmits only about twice its own data; bandwidth independent of N); ④
AllToAll (every rank sends to and receives from every other) — exactly what MoE expert-parallel token routing does: with uniform load,
NN−1S per rank. Hardware bandwidth: NVLink 4.0 (H100) 900GB/s per GPU, NVLink 5.0 (B200/GB200) 1.8TB/s per GPU; InfiniBand 800Gbps (XDR) = 100GB/s, 400Gbps (NDR) = 50GB/s — NVLink 5.0 is about 18× a single 800Gbps IB link.
Rail-optimized topology: the i-th GPU NIC of every node plugs into the same leaf switch (the i-th “rail”), so cross-node traffic only happens between same-index GPUs, preventing AllReduce/AllGather flows from hopping across rails and causing hotspots/congestion; together with NVSwitch full-mesh (intra-node) and leaf-spine/3D-Torus (inter-node), this forms NCCL's top-level topology design.