Up nextNext guide
Using AI for Teacher-Parent Communication
Applications
Technical GUIDE
Collective communication coordinates data across a group of participating devices.
Listen to this guideAI-narrated · ~2 min
NCCL implements GPU communication operations such as all-reduce, all-gather and broadcast; their performance depends on message size, topology, hardware and configuration.
Training a large model means each GPU computes gradients on its own slice of data, then all GPUs must agree on a combined result before the next step. That coordination is done with collective operations: all-reduce sums values across GPUs and gives everyone the result; all-gather collects each GPU's piece into a full copy on all of them; broadcast sends one GPU's data to the rest; reduce-scatter combines then splits. NCCL (NVIDIA Collective Communications Library) implements these efficiently across GPUs in a server and across servers, using topology-aware algorithms like ring and tree all-reduce. It exploits NVLink inside a node and InfiniBand or RoCE between nodes, and is the communication backbone under PyTorch DDP, FSDP, DeepSpeed, and Megatron.
Synchronizing gradients every training step across all GPUs using all-reduce in PyTorch DistributedDataParallel
Sharding optimizer states and gathering parameters on demand with all-gather and reduce-scatter in FSDP or DeepSpeed ZeRO
Broadcasting initial model weights from one GPU to all others at the start of a training run
Using ring all-reduce over NVLink and InfiniBand to keep bandwidth high across multi-node GPU clusters
Larger models and clusters motivate work on computation/communication overlap, topology-aware routing and network offloads. These can improve some workloads while adding configuration and debugging needs. Compare algorithms with representative tensor sizes and record versions and topology. Correct participation and buffer handling remain essential even when a library automates much of the routing. A link-bandwidth claim alone cannot establish end-to-end training speed.
Free newsletter
One short email each weekday with the three AI stories that actually matter. Free forever, no ads.
One email each weekday. Unsubscribe in one click. We never sell or share your address.
Test yourself
Instant feedback on every answer, and a shareable certificate with a verifiable ID once you pass a course.
Support free AI education. AI Understanding is a 501(c)(3) nonprofit — no ads, no paywall, ever. Make a donation
Collective communication coordinates data across a group of participating devices. NCCL implements GPU communication operations such as all-reduce, all-gather and broadcast; their performance depends on message size, topology, hardware and configuration.
All-reduce sums (or otherwise combines) a value across every GPU and distributes the identical result back to all of them, which is how gradients are synchronized.
NCCL is the NVIDIA Collective Communications Library, which implements fast multi-GPU and multi-node collective operations.
A ring organizes chunk movement, but performance still depends on the network and workload.
All-gather collects the distinct pieces from every GPU and assembles the complete set on all of them, used heavily in sharded training like FSDP.
Offload capability is configuration-dependent and must be evaluated.
Keep learning
More guides picked for this topic
Up nextNext guide
Using AI for Teacher-Parent Communication
Applications