Chris Collins

Tools · ai

Collectives and cluster topology

Ring and tree all-reduce one step at a time, the α–β time model with the ring/tree crossover and SHARP, the scale-up vs scale-out bandwidth cliff, how an NVL72 rack's 72 GPUs and 18 NVSwitch chips are wired, fat-tree and rail-optimised switch counts, and on-chip ring, mesh and torus hop counts and bisection.

Added

How to use it

How to use it

⛶ Full screen (or F) gives the tool the whole screen — the browser’s full screen where it is allowed, otherwise a full-window layer (iPhone). The ring or tree in the step view and the NVL72 wiring diagram grow to fill it and follow the window; on a wide screen the NVL72 figures sit in a column beside the wiring, and ◫ Panels hides them. Escape leaves.

Ring & tree, step by step — pick 2 to 16 GPUs and step through an all-reduce. In the ring, every GPU’s tensor is cut into n chunks (a, b, c, …); the grid shows which GPUs' contributions each chunk already holds (a0+a1+a2), shading darker as it fills and outlined green when it is fully reduced. Reduce-scatter takes n − 1 steps, all-gather another n − 1, and every ring link is busy on every step. Chunk indexing runs either the book’s Python exactly as printed (rank r ends reduce-scatter holding chunk (r + 1) mod n) or the shifted version where rank r owns chunk r. The tree reduces up a binomial tree in ⌈log₂ n⌉ steps and broadcasts back down in as many again, with most links idle.

Time model — the α–β model: each step costs a fixed α (launch, synchronisation, first byte) plus bytes ÷ β (one link’s bandwidth, one way). Ring: 2(n − 1)·α + 2(n − 1)/n · S/β; tree: 2⌈log₂ n⌉ · (α + S/β). The plot shows both against message size with the crossover marked; the tree wins small messages, the ring large ones. Tick SHARP to add in-network reduction: each GPU sends its tensor once and the switch returns the sum, 2α + S/β, about half the ring’s bytes. Bus bandwidth is NCCL’s convention (algorithm bandwidth × 2(n − 1)/n).

Scale-up vs scale-out — a hierarchical all-reduce over several NVLink domains: reduce-scatter inside each rack, an all-reduce of each 1/n shard across racks on its rail, then all-gather inside the rack, against a flat ring that runs at the network’s speed. Below it, the per-GPU bandwidth ladder from HBM to a 400 Gb/s NIC shows the cliff.

NVL72 wiring — the GB200 NVL72 rack drawn to its real counts: 18 compute trays (4 Blackwell GPUs and 2 Grace CPUs each) and 9 switch trays (2 NVSwitch chips each). Click a GPU to see its 18 links, one to every switch chip, or a switch chip to see its 72 ports, one to every GPU.

Fat tree & rails — switch counts for a given number of hosts and switch radix k, two tiers while they fit (k²/2 hosts) and three beyond (k³/4), with oversubscription, bisection, and the optical transceivers the switch-to-switch links need. The rail-optimised view wires GPU r of every node to rail r’s leaf.

On-chip networks — a ring, 2D mesh, 2D torus, crossbar or bus of rows × columns tiles: diameter, average hops, bisection in links and GB/s, and a hop-count map from any tile (click one). The plot shows bisection per tile shrinking as √N/N for a mesh as the chip grows.

Limits

  • The step view draws up to 16 GPUs; the time model takes any n.

  • The time model is the textbook α–β model: no congestion, no pipelining of the tree (NCCL’s double binary tree pipelines, bringing its bandwidth term near the ring’s), a single α per step.

  • The tree shown is binomial; the book describes a binary tree. Both take 2⌈log₂ n⌉ steps.

  • Hierarchical all-reduce assumes one NIC per GPU (rail-aligned) and equal domains.

  • NVL72 numbers are for the GB200/GB300 generation (NVLink 5); Rubin’s NVLink 6 doubles the per-link rate.

  • Fat-tree counts use the k-ary construction with ceiling rounding for partly filled tiers; real designs also round to whole pods and leave spare ports.

  • On-chip hop maps are drawn up to 400 tiles; the figures are exact up to 4 million.

Related: links, optics and energy per bit (bandwidth and pJ/bit for every link named here), AI hardware calculator, graph algorithms (BFS hop counts), latency numbers.

Sources

Linking to an example

Every setting can be written into a link by hand. Put the tab after : ring, time, cliff, nvl72, fattree or noc; with example= and no , the example’s own tab opens. Sizes take SI units (25MB = 25 × 106 bytes, 1GiB = 230); 1e9 works too — in a URL write ` as `%2B` (`1e%2B9`), although a ` typed into the address bar (read back as a space) is understood.

Parameter Meaning Example

example

one of the presets below; parameters written beside it override it

example=p03-ring-4

n

GPUs (step view 2–16; time model any)

n=8

algo

step view: ring or tree

algo=tree

step

step view: frame to show, 0 = start

step=3

idx

ring chunk indexing: book (as printed) or owner (rank r owns chunk r)

idx=owner

s

message size (time model, scale-up vs scale-out)

s=25MB

a, b

time model: α in µs, β in GB/s one way

a=5&b=50

sharp

time model: 1 to show SHARP

sharp=1

nu, no

GPUs per scale-up domain, number of domains

nu=72&no=16

bu, bo

scale-up and scale-out GB/s per GPU, one way

bu=900&bo=100

au, ao

α in µs inside and between domains

au=2&ao=5

pick

NVL72: highlight GPU g0–g71 or switch chip s0–s17; empty for none

pick=s3

k, h, o

fat tree: switch radix, hosts, oversubscription (down:up)

k=64&h=2048&o=1

g, w

GPUs per node (rails); watts per optical transceiver

g=8&w=15

topo

on-chip: ring, mesh, torus, xbar, bus

topo=torus

r, c, src, lbw

on-chip: rows, columns, source tile (row-major), GB/s per link

r=10&c=12

Presets:

example= Shows

p03-ring-4

Figure 17a: ring all-reduce on 4 GPUs from the start (open)

p03-ring-code

The book’s Python reduce-scatter after its 3 steps: rank r holds chunk (r + 1) mod n (open)

p03-ring-8

Ring all-reduce on 8 GPUs: 14 steps (open)

p03-tree-8

Tree all-reduce on 8 GPUs: 6 steps, most links idle (open)

p03-ring-vs-tree-8

14 ring steps against 6 tree steps, and the crossover size (open)

p03-ring-bytes

2(n − 1)/n = 1.75 × the tensor per GPU at n = 8 (open)

p03-sharp

SHARP: the tensor sent once, about double the throughput (open)

p03-scale-cliff

900 GB/s inside the rack against 100 GB/s between racks (open)

p03-nvl72

The NVL72 rack, one GPU’s 18 links highlighted (open)

p03-nvswitch

One NVSwitch chip’s 72 ports: 3.6 TB/s each way, 7.2 TB/s total (open)

p03-fat-tree-k64

2,048 hosts on 96 64-port switches (open)

p03-fat-tree-k64-3tier

65,536 hosts on 5,120 switches (open)

p03-oversubscribed

3:1 oversubscription: 54 switches instead of 96 (open)

p03-rail

Rail-optimised wiring, 32 nodes × 8 GPUs (open)

p16-nccl-choice

On 64 GPUs the tree wins small messages, the ring large ones (open)

p17-bucket-25mb

A 25 MB gradient bucket over 1,024 GPUs (open)

p17-grad-allreduce

140 GB of gradients inside one rack and across 16 (open)

p10-noc-ring

A 64-tile ring: diameter 32, bisection 2 (open)

p10-noc-mesh

An 8 × 8 mesh: diameter 14, bisection 8 (open)

p10-noc-torus

An 8 × 8 torus: diameter 8, bisection 16 (open)

p10-wormhole

Tenstorrent Wormhole’s 10 × 12 grid as a torus (open)

p10-cerebras

~900,000 elements on a 950 × 950 mesh (open)

Sharing

Share link copies a URL that opens this tool with your current settings. Opening a link replaces your saved settings for this tool; Restore my settings undoes it.

Runs entirely in your browser; nothing you type leaves this page.