Part O · The three abstractions › Interconnect: memory at a longer distance

Module 4·Part O — The three abstractions·18 min

Interconnect: memory at a longer distance

An interconnect is a memory level you cannot store anything in. The same four numbers, topology in place of capacity, collectives as the access primitives — and the beachfront limit that drives everything else in the series.

The core mental model

The cleanest way to think about an interconnect is that it is a memory level you cannot store anything in. It has bandwidth, latency and granularity exactly as the levels in Module 3 do, it sits on the same continuous ladder, and it obeys the same rule — the mapping’s job is to touch it as rarely as possible and in units as large as possible. What replaces capacity is topology: instead of asking how many bytes fit, you ask which endpoints can reach which others and at what aggregate rate. And what replaces load and store is a small set of collectives — all-reduce, all-gather, reduce-scatter, all-to-all —

register file100k GB/sSRAM / NoC10k GB/sHBM3.4k GB/sdie-to-die (UCIe)1k GB/sNVLink 4 — scale-up900 GB/sInfiniBand — scale-out50 GB/s1001k10k100kbandwidth per endpoint, GB/s (log)
One ladder, not two subjects. Each rung is roughly an order of magnitude down in bandwidth from the one above, and the interconnect rungs continue the same curve the on-chip ones started. The cliff worth noticing is at the package boundary — die-to-die is cheaper per byte than HBM, and everything past the chassis falls off hard.

Seeing it as one ladder rather than as a separate discipline is what makes the framework pay off, because the numbers really do continue smoothly. From SRAM at ~10 TB/s, to HBM at 3–8 TB/s, to NVLink at ~1 TB/s per GPU, to InfiniBand at tens of GB/s, each step is roughly an order of magnitude down in bandwidth and up in latency and energy per byte — the same shape as the on-chip steps, extended. Which means the analysis is the same analysis. There is an arithmetic intensity for the network (FLOPs performed per byte communicated), there is a ridge point (the compute-to-communication ratio above which the network is not your bottleneck), and there is a tiling decision (how much work to do between communication rounds). Module 11 is that argument in full; this module is the resource.

The one genuinely new physical fact is the beachfront limit, and it deserves to be stated plainly because it drives more of ML systems design than anything else. Compute and memory capacity can be added by making a package bigger or stacking more of it. Bandwidth off a package cannot: it is bounded by the die perimeter available for SerDes, the achievable signalling rate per lane, and the power budget for driving signals across a board or a cable. So every generation, off-package bandwidth per FLOP gets worse — the same trend as HBM versus compute in Module 3, one level out and steeper. This is why NVLink domains keep growing (put more GPUs inside the high-bandwidth region so fewer transfers cross the cheap one), why co-packaged optics is being pursued so hard, and why the scale-up/scale-out distinction exists at all. It is not two kinds of network; it is one ladder with a sharp cliff at the package boundary.

The design space, quantified

The ladder continued past the package — the same table as Module 3, extended right:

LevelBandwidth (per endpoint)LatencyEnergy/byteGranularity
On-chip NoC~10 TB/s~10 ns~1 pJflit, ~32 B
Die-to-die (UCIe)~1 TB/s per link~20 ns~0.5 pJflit
HBM3.35–8 TB/s~400 ns~50 pJ32 B sector
Scale-up (NVLink 4/5)900 GB/s / 1.8 TB/s~2 µs~200 pJlarge message
TPU ICI (per link)45–90 GB/s one-way~2 µslarge message
Scale-out (IB NDR)~50 GB/s per NIC~5 µs~1 nJMTU
Ethernet, 400 GbE~50 GB/s~10 µs~1 nJMTU

Die-to-die is worth noticing: it is cheaper per byte than HBM, which is why chiplets work and why the interesting packaging designs put compute next to compute rather than only next to memory.

Topologies and what they cost, which is the property capacity is replaced by:

TopologyUsed byBisectionCost
Ringearly NVLink, ICI dimO(1)O(1) linkscheapest, worst scaling
2D / 3D torusTPU podsO(N2/3)O(N^{2/3})no switches, nearest-neighbour only
Fat tree / ClosInfiniBand clustersfull, if provisionedswitches dominate cost
Fully switchedNVSwitch domainfull, all-to-allexpensive, limited radix

Collective costs, for NN endpoints and SS bytes per endpoint — the formulas worth memorizing:

CollectiveBytes moved per endpointLatency termNote
Ring all-reduce2S(N1)/N2S2S(N-1)/N \approx 2SO(N)O(N) hopsbandwidth-optimal
Tree all-reduce2S\approx 2SO(logN)O(\log N) hopsbetter for small SS
All-gatherS(N1)/NSS(N-1)/N \approx SO(N)O(N) or O(logN)O(\log N)half of all-reduce
Reduce-scatterS(N1)/NSS(N-1)/N \approx Ssameall-reduce = the two composed
All-to-allS(N1)/NS(N-1)/NO(1)O(1) if switchedsizes may be data-dependent

The single most useful line: a ring all-reduce moves about 2S2S bytes per endpoint no matter how many endpoints there are. Bandwidth cost is independent of NN; only the latency term grows.

Critical thinking

Why treat the interconnect as a memory level rather than as its own discipline?

Because every technique that works on the memory hierarchy transfers, and treating them separately means rediscovering each one twice with different vocabulary.

Run the correspondence explicitly:

Memory techniqueInterconnect equivalent
Tiling for reusemore compute per communication round
Double bufferingoverlapping compute with communication
Coalescing to granularitybatching small messages; bucketing gradient all-reduces
Keeping a tensor residentreplicating a tensor rather than re-fetching it
Recompute instead of storerecompute instead of communicate
Lower precision to cut bytesBF16/FP8 gradients and activations on the wire
Arithmetic intensityFLOPs per byte communicated
Ridge pointthe compute/communication ratio the network requires

Every row is the same idea at a different constant. Gradient bucketing in DDP is coalescing. Overlapping the backward pass with the gradient all-reduce is double buffering. ZeRO’s choice to shard optimiser state and all-gather parameters on demand is a capacity-versus-traffic tiling decision, decided by exactly the reasoning of Module 7. FSDP’s reshard_after_forward flag is literally a keep-resident-or-refetch choice.

The framing also produces a genuinely useful design number. Ask: what is the arithmetic intensity my network requires? An H100 at ~1 PFLOP/s BF16 with 900 GB/s of NVLink needs roughly 1100 FLOP per byte crossing NVLink to stay compute-bound, and about 20,000 FLOP per byte crossing a 50 GB/s NIC. Those two numbers explain the entire parallelism strategy landscape at a glance: tensor parallelism communicates activations every layer and therefore needs the 1100-class link, while data parallelism communicates gradients once per step and comfortably tolerates the 20,000-class one. That is not a heuristic anybody had to invent — it falls straight out of roofline applied one level down the ladder.

Where the analogy genuinely breaks, and it is worth being precise rather than pretending it does not: memory is passive and point-to-point, while a network has contention between independent endpoints and topology-dependent effective bandwidth. Two GPUs can each be doing something sensible and collide in a shared switch, and that failure has no memory-hierarchy analogue. It is also why a collective’s real cost depends on how the algorithm maps onto the physical topology, which is Module 11.

Why does the scale-up / scale-out distinction exist, and where is it going?

It exists because of a discontinuity in the ladder at the package and chassis boundary, and it is being attacked from both sides because that discontinuity is expensive.

Inside a node, links are short, electrical, and can run wide and fast: NVLink 4 gives 900 GB/s per GPU and NVLink 5 gives 1.8 TB/s, with an NVSwitch fabric providing full all-to-all inside the domain. Leave the chassis and you are on a NIC, through a switch, over a cable, with error handling, a protocol stack and roughly 20× less bandwidth at 3–5× the latency. That is not a gradual decline, it is a cliff, and it is a cliff for physical reasons: the number of SerDes you can put on a die perimeter, the power to drive a signal a metre versus a centimetre, and the cost of the optics or cabling.

Everything about how large models are parallelised is a response to this cliff. The rule that has emerged, and it is worth stating as a rule:

Put the communication-intensive parallelism inside the high-bandwidth domain, and the communication-light parallelism across it.

Which in practice means tensor and expert parallelism within an NVLink domain or a TPU pod slice, pipeline parallelism across the boundary (point-to-point, small, and overlappable), and data parallelism outermost (one all-reduce per step, latency-tolerant, bucketable). Once you have the FLOP-per-byte numbers above, this is not a rule of thumb — it is the only assignment that fits.

Where it is going, on both sides:

  • The scale-up domain keeps growing. 8 GPUs, then NVL72’s 72, with roadmaps beyond. Every GPU moved inside the domain is a set of transfers that no longer crosses the cliff. This is the single most consequential system-architecture trend of the last few years, and it is why rack-scale is suddenly the unit of design.
  • The cliff is being lowered. Co-packaged optics moves the electrical-to-optical conversion onto the package, cutting the power and the distance penalty. UCIe standardises die-to-die at sub-HBM energy per byte. Ultra Ethernet is bringing scale-out closer to scale-up semantics.
  • And a note on TPUs, which took a different route entirely: no switched fabric, a 2D or 3D torus with nearest-neighbour links only. That is much cheaper — no switches at all — and it works because the collectives that matter map beautifully onto a torus, at the cost of arbitrary point-to-point patterns being genuinely bad. A topology chosen for a known set of access patterns, which is precisely the scratchpad-versus-cache argument from Module 3 applied to the network.

Ring all-reduce moves 2S bytes regardless of N. Why is that not the end of the story?

Because bandwidth optimality is one of three terms, and the other two are what actually bite in practice.

The cost model for a collective is roughly

T=α(hops)+β(bytes)+γ(reduction work)T = \alpha \cdot (\text{hops}) + \beta \cdot (\text{bytes}) + \gamma \cdot (\text{reduction work})

with α\alpha the per-hop latency, β\beta the inverse bandwidth. Ring all-reduce minimises the β\beta term — 2S(N1)/N2S(N-1)/N bytes per endpoint, asymptotically 2S2S and independent of NN, which is provably optimal. But it takes 2(N1)2(N-1) steps, so the α\alpha term grows linearly in NN. At N=512N = 512 with a 2 µs per-hop latency, that is about 2 ms of pure latency before any bytes are considered. For a large gradient buffer that is negligible; for a small one it is the entire cost.

Hence the real behaviour:

  • Small SS: use a tree, or a latency-optimised algorithm. O(logN)O(\log N) steps instead of O(N)O(N), and the extra bandwidth is irrelevant because there was not much data. NCCL and similar libraries switch algorithm by message size at runtime, which is why their tuning tables exist.
  • Large SS: use a ring, or a hierarchical composition. Bandwidth dominates and ring is optimal.
  • In between, and in practice: hierarchical. Reduce-scatter within the node over NVLink, all-reduce across nodes over the slow network with 1/G1/G of the data (where GG is GPUs per node), then all-gather within the node. This is the standard construction and it is a direct application of the memory-hierarchy principle: do as much as possible at the cheap level so the expensive level sees less traffic.

Three further complications that the clean formula hides:

  • Topology mapping. A “ring” is a logical construct; its performance depends on whether consecutive logical ranks are physically adjacent. A ring embedded badly in a fat tree traverses the same congested switch repeatedly. This is why rank-to-node assignment measurably changes training throughput, and why libraries invest so much in topology detection.
  • Overlap changes the objective. If the collective overlaps with computation, its latency stops mattering and only its bandwidth consumption does, since it is now competing with nothing but itself. That flips the algorithm choice, and it is why bucketing granularity in DDP is a tuned parameter: too-small buckets are latency-dominated, too-large ones start after the compute they should have overlapped with has finished.
  • In-network reduction. Switches that can perform the reduction (SHARP and similar) change the formula rather than the constants, removing an entire traversal. When available it is a large win, and it is the network equivalent of processing-in-memory — with the advantage that here it actually shipped.

What is the beachfront limit and why does it drive so much of the field?

It is the observation that off-package bandwidth is bounded by the perimeter of the die and the package while compute is bounded by their area — and area grows faster than perimeter. That is a geometric constraint, not an engineering one, and it means the FLOPs-to-off-chip-bytes ratio degrades every generation no matter how well anyone executes.

The consequences run through the entire series, and it is worth seeing them as consequences of one thing:

  • The rising ridge point (Module 2). Each generation needs more arithmetic per byte to reach peak, so the tile sizes that saturate the machine grow, and mappings that were fine become bandwidth-starved without anyone changing the code.
  • The push to lower precision (Module 10). Halving bytes is the most direct way to buy back effective bandwidth on a channel whose width you cannot increase. It is not fundamentally about arithmetic speed — that is the smaller half of the benefit.
  • The growth of on-die SRAM (Module 3). If bytes cannot cross the boundary quickly, keep more data on the correct side of it. Taken to its limit you get Cerebras: 44 GB of on-wafer SRAM at ~21 PB/s and no HBM at all, which is the beachfront limit answered by refusing to have a beachfront.
  • Chiplets and advanced packaging. UCIe at ~0.5 pJ/byte is cheaper than HBM, so aggregating several dies into one logical package extends the “inside” region. The package becomes the unit of design precisely because the boundary is what is expensive.
  • Growing scale-up domains. NVL72 exists so that more communication happens inside the high-bandwidth region. Every endpoint pulled inside is traffic that never pays the cliff.
  • Co-packaged optics. Attacks the constraint most directly by improving bandwidth density and energy per bit at the boundary itself — the only intervention that raises the ceiling rather than avoiding it.

And the software consequence, which is this series’ actual subject: as the ratio worsens, an increasing fraction of achievable performance is determined by the mapping rather than by the hardware. A chip with twice the FLOPs and 1.4× the bandwidth is not 2× faster on anything; it is 2× faster only on mappings good enough to exploit it, and those mappings did not exist when the chip was designed. That gap — between what the silicon can do and what the compiler can reach — is what Part R is about, and it widens every generation for reasons no hardware team can fix.

Self-check

In what sense is an interconnect a memory level, and what replaces capacity?

It has bandwidth, latency and granularity on the same continuous ladder, and the same rule applies — touch it rarely, in large units, with enough in flight to cover its latency. Topology replaces capacity: not how many bytes fit but which endpoints reach which others at what aggregate rate. And collectives replace load/store as the access primitives, because you move sharded tensors rather than values.

What arithmetic intensity does NVLink require versus a NIC, and what does that explain?

Roughly 1100 FLOP per byte crossing NVLink (1 PFLOP/s against 900 GB/s) and about 20,000 FLOP per byte crossing a 50 GB/s NIC. It explains the whole parallelism landscape: tensor parallelism communicates activations every layer and needs the 1100-class link, while data parallelism communicates gradients once per step and tolerates the 20,000-class one. Roofline, one level down the ladder.

Give the ring all-reduce cost and the two reasons it is not always the right algorithm.

It moves 2S(N1)/N2S2S(N-1)/N \approx 2S bytes per endpoint, independent of NN — bandwidth-optimal. But it takes 2(N1)2(N-1) steps, so the latency term grows linearly in NN (≈2 ms at N=512N=512 with 2 µs hops), making a tree better for small messages. And the logical ring must be embedded well in the physical topology, or it repeatedly traverses the same congested switch. In practice the answer is usually hierarchical: reduce-scatter on NVLink, all-reduce across nodes on 1/G1/G of the data, all-gather back.

State the placement rule for parallelism strategies and why it follows rather than being a heuristic.

Communication-intensive parallelism inside the high-bandwidth domain, communication-light across it — tensor and expert parallelism within NVLink or a pod slice, pipeline across the boundary, data parallelism outermost. It follows from the FLOP-per-byte requirement of each strategy against the 20× bandwidth cliff at the chassis boundary: once you have both numbers, it is the only assignment that fits.

What is the beachfront limit and name four things it causes.

Off-package bandwidth is bounded by die and package perimeter while compute is bounded by area, and area grows faster — so FLOPs per off-chip byte degrades every generation, geometrically rather than for want of engineering. It causes the rising ridge point, the push to lower precision, the growth of on-die SRAM (to Cerebras’ extreme of no HBM at all), chiplets and UCIe, growing scale-up domains like NVL72, and co-packaged optics. Its software consequence is that an increasing share of achievable performance is set by the mapping rather than the silicon.