﻿# Ring all-reduce: how reduced chunks circulate between ranks

Ring all-reduce pipelines chunked reduction and distribution; judge its behavior by message size, pipeline depth, and the slowest relevant link.

Author: Retrivium editorial team
Updated: 2026-11-03
Canonical URL: https://retrivium.ai/journal/learn-ring-allreduce-chunks/
Language: en

A ring is a useful way to understand how an all-reduce can distribute communication and reduction across participants. Data is divided into chunks that circulate through neighbors, with partial results accumulated along the way. This is a conceptual algorithm, not a promise that a communication library always chooses a ring. Libraries can select different plans for different sizes and topologies.

## All-reduce specifies a result, not a topology

The operation combines corresponding elements across ranks and makes the combined result available to every rank. This semantic contract is separate from the transport algorithm. A ring connects each participant to neighbors in a logical order that may be chosen to suit the hardware. Confusing the operation name with the implementation can lead to incorrect explanations of a profiler trace or an unjustified attempt to force one algorithm universally.

Primary reference: [NCCL User Guide: Collective Operations](https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/usage/collectives.html).

## Chunks let different stages progress together

Dividing a large tensor lets a participant reduce one chunk while other chunks occupy other links or stages. The pipeline needs enough useful payload to amortize coordination and movement overhead. Tiny chunks can create excessive scheduling work, while overly large chunks reduce opportunities for overlap. Think of chunking as a balance between transport efficiency and pipeline progress rather than a change to the mathematical result of the reduction.

Primary reference: [CUDA Programming Guide: Asynchronous Execution](https://docs.nvidia.com/cuda/cuda-programming-guide/02-basics/asynchronous-execution.html).

## Reduction and distribution are distinct phases

A helpful decomposition first leaves each participant with a reduced portion and then distributes those portions so everyone receives the complete result. The phases explain why a rank forwards data that it does not ultimately own exclusively. Draw a small symbolic example using named chunks and named participants. Track where each chunk is fully reduced and where copies of that result travel; this reveals the purpose of otherwise repetitive-looking transfers.

Primary reference: [CUDA C++ Best Practices Guide](https://docs.nvidia.com/cuda/cuda-c-best-practices-guide/).

## One slow participant affects the pipeline

Ranks must enter matching collective operations with compatible counts and types. A delayed rank or a slow link can hold back progress elsewhere, even when most devices have spare local compute capacity. Measure collective start skew as well as transfer duration. An apparent communication problem can originate in a preceding imbalanced computation that causes participants to arrive at the collective at very different times in the application timeline.

## Explain a measurement without promising a winner

Compare representative message sizes and actual topologies rather than declaring rings categorically fastest. Small messages, hierarchical systems, and different network characteristics can favor another plan. Preserve library version and configuration in the experiment record. Validate results with an appropriate numerical tolerance, since floating-point reduction order can differ between implementations. The useful conclusion identifies why the observed workload benefits from a particular communication structure under stated conditions.

Related reading: [A GPU inference benchmark you can trust](/journal/inference-benchmark-method/); [Reproducible inference stacks: preserving a GPU pilot’s result](/journal/software-stack-reproducibility/).
