Exercises — NVLink and GPU interconnects
Before we start, one master reminder that all arithmetic below leans on:
Level 1 — Recognition
L1.1 — Which link, which speed?
State the usable payload bandwidth per direction for NVLink 2.0, given: 8 lanes, 25 GT/s per lane, 8b/10b encoding.
Recall Solution
WHAT we do: turn transfers-per-second into payload bytes-per-second. WHY: the wire ships symbols (transfers); only of each symbol is real data.
Per lane: .
All 8 lanes: .
Convert bits → bytes: .
L1.2 — Bidirectional vs unidirectional
NVLink 2.0 is full duplex. What is the bidirectional payload per link, and what does "full duplex" mean physically?
Recall Solution
Full duplex = separate wires carry each direction, so both directions run at full speed simultaneously — no time-sharing.
.
L1.3 — Spec-sheet trap number
NVIDIA's datasheet says "50 GB/s per link" for NVLink 2.0. Which quantity is that, and what is the honest payload?
Recall Solution
, using the raw 25 GT/s line rate treated as 25 GB/s — before stripping 8b/10b overhead. Honest payload bidirectional (multiply the line rate by ).
Level 2 — Application
L2.1 — Aggregate per-GPU bandwidth
An NVLink 2.0 GPU has 6 NVLink ports. Compute its total bidirectional payload aggregate.
Recall Solution
Each port: bidirectional. . This is the number to compare against a single PCIe Gen3 x16 slot ().
L2.2 — Speedup over PCIe
Using L2.1's vs PCIe Gen3 x16 at , compute the factor of improvement.
Recall Solution
.
L2.3 — NVLink 4.0 payload from scratch
NVLink 4.0 (H100): 9 lanes, 26.56 GT/s, PAM4 (2 bits per symbol), 128b/130b encoding. Compute payload per direction.
Recall Solution
WHY PAM4 changes the formula: each transfer now carries 2 bits (4 voltage levels), not 1. So we multiply by 2.
.
(NVIDIA rounds/derates this to a headline of depending on how they count; the method is what matters.)
Level 3 — Analysis
L3.1 — All-reduce time on the ring
8× V100, model = of weights. A ring all-reduce takes steps; each step moves over a link, all links busy in parallel. Compute total communication time.
Recall Solution
Per step: . Seven steps: .
WHY 7 steps for 8 GPUs: a ring passes each chunk around the circle; after hand-offs every GPU has seen every contribution. More GPUs = more steps, but per-step data stays chunk-sized, so it scales gracefully.
L3.2 — Bandwidth–delay product & buffer sizing
Link: , one-way latency . (a) Compute the bandwidth–delay product (BDP). (b) A receiver has only a buffer. Find the stall time per round and the link efficiency.

Recall Solution
(a) BDP = data "in flight" = bandwidth latency: Look at the figure: the credits must cover the whole in-flight region (the shaded tube) or the sender runs dry before the first ack returns.
(b) With a buffer the sender exhausts credits after The first ack only returns at , so the sender idles from to : Efficiency . Fix the design: buffer BDP → → ack arrives before draining → 100% efficiency.
Level 4 — Synthesis
L4.1 — Is the training run communication-bound?
An 8× V100 job has compute time per iteration. Two interconnect options:
- PCIe Gen3, effective after CPU serialization, and the naive scheme sends to each of 7 peers serially.
- NVLink ring all-reduce from L3.1 ().
For each option, compute communication time and decide whether the iteration is compute-bound or communication-bound.
Recall Solution
PCIe naive: . Compare to compute → communication-bound by . The GPUs sit idle most of the iteration.
NVLink: comm vs compute → still communication-bound, but only . If compute and comm overlap (pipelined), effective iteration instead of .
Synthesis takeaway: NVLink doesn't magically make you compute-bound here — it shrinks the comm wall from to (), turning a hopeless run into a merely-comm-limited one that overlap can hide.
L4.2 — Choose a generation to hit a deadline
You must get per-iteration all-reduce comm under for the same model, 8 GPUs, ring (7 steps). Which is the slowest NVLink generation that suffices: 1.0 (), 2.0 (), or 4.0 ( GB/s per direction)?
Recall Solution
Comm time seconds, needs , so
- 1.0 (): �— too slow.
- 2.0 (): �— too slow.
- 4.0 (): ✅.
Required excludes 1.0 and 2.0. Answer: NVLink 4.0 is the slowest listed generation that meets the deadline.
Level 5 — Mastery
L5.1 — Design an interconnect from a target
You are speccing a new NVLink generation. Requirements: payload per direction per link, and you may only choose the lane count (integer) and signaling rate (GT/s). You are locked into PAM4 (2 bits/symbol) and 128b/130b encoding. Silicon limits signaling to per lane and lanes. Find one valid pair and prove it meets the target.
Recall Solution
Payload per direction (bytes/s): Solve for the constraint : So we need lanes rate . Pick : need . Choose ( ✅). Check: ✅. A valid design: 9 lanes at 28 GT/s. (Many pairs work; e.g. 12 lanes at 21 GT/s gives .)
L5.2 — Buffer + BDP for a faster future link
Your L5.1 link runs at and, due to longer traces, one-way latency rises to . What minimum receiver buffer keeps efficiency at 100%? Express in KB.
Recall Solution
Need buffer BDP: Insight: faster + longer-latency links need bigger buffers. Doubling bandwidth or latency doubles the credits you must hold on-chip — a real silicon-area cost that bounds how fast interconnects can grow.
L5.3 — Why not just widen PCIe instead of inventing NVLink?
In one paragraph (no calculator), argue from the parent note's physics why NVIDIA built a point-to-point mesh rather than pushing everything through a wider PCIe tree.
Recall Solution
PCIe is a tree rooted at the CPU: every GPU-to-GPU byte must climb up to the root complex and back down, so all GPU pairs share the CPU's finite lanes and add hops of latency. Widening PCIe raises the trunk bandwidth but the trunk is still shared and CPU-serialized — 8 GPUs synchronizing gradients still collide there. NVLink instead gives each GPU dedicated point-to-point links in a mesh, so pairs communicate in parallel with no CPU in the path; aggregate bandwidth scales with the number of links, not with one shared root. Add differential signaling (noise cancels via ) to push per-lane rates far higher than a shared bus safely allows, and you get the jump the parent note reports.
Recall Self-test cloze recap
NVLink 2.0 payload per direction is 20 GB/s. The factor that removes 8b/10b overhead is 8/10 (0.8). PAM4 multiplies payload by 2 because it carries 2 bits per symbol. A receiver buffer must be at least the bandwidth–delay product (BDP) for 100% efficiency. Ring all-reduce across GPUs takes ==== steps.