Distributed Training: NCCL, Collectives & Parallelism

AllReduce, AllGather, ReduceScatter, and Broadcast collective operations. NCCL topology awareness, ring vs tree algorithms. Overlapping computation with communication. Data, tensor, pipeline, and sequence parallelism strategies.

Overview

Why communication decides scaling

Training large models across hundreds or thousands of GPUs means coordinating gradient exchange, weight distribution and activation movement. The volume and latency of collective operations decide how well training scales. NCCL (NVIDIA Collective Communications Library) is the standard collective library for GPU clusters.

NCCL sits between the training framework and the wires. PyTorch DDP or FSDP calls NCCL collectives. NCCL detects the topology (NVLink, PCIe and InfiniBand), chooses an algorithm (ring, tree, or flat on NVSwitch), and runs it over NVLink and NVSwitch inside a node, or over InfiniBand with SHARP between nodes. This chapter follows that stack from the top: first the collectives, then the algorithms, then how training hides the communication and splits the model.

Interview questions

  • Compare FSDP and DDP for distributed training. When would you choose each?
  • How do you overlap communication with computation in distributed training?

Sign up free to read the full topic

More AI Infrastructure topics

Start free on Cariara · Coding problems · System design studio