single collective to parallelism

From Single Collective to Parallelism Benchmark – Part 2

✅ Part 1: DP — Data Parallel traffic pattern under 3D parallelism
✅ Part 2: TP — Why Tensor Parallelism has to stay inside the scale-up domain (this post)
🔜 Coming next: PP — the Send/Recv traffic pattern of pipeline parallelism

Why Tensor Parallelism has to stay inside the scale-up domain

A Llama-70B-class model (80 layers) running Tensor Parallel (TP) = 8 fires 320 AllReduce calls per micro-batch. Everyone sits on the critical path. None can be hidden behind another micro-batch's compute the way Pipeline Parallelism (PP) traffic can.

That count is why TP is the first parallelism dimension that any scale-up fabric, NVLink or Ethernet, must get right.

What is Tensor Parallel

Here’s a worked example (h=2, d_ff=3): x=[1,2] through up-projection matrix A gives y=[1,2,3],

then through down-projection matrix B gives z=[4,5].

tensor parallel example

tensor cut example

Same example under TP=3: each GPU owns one column of A and one row of B - one AllReduce at the end.

tp3 exmaple

Where the 320 comes from

TP splits the weight matrices inside each layer. It cuts width, not depth. Layer count is PP's job.

In an MLP block, the first matrix is split by column and the second by row. Each GPU computes a partial sum, and one AllReduce is needed to produce the full output. Backward needs one more AllReduce on the input gradient. Attention follows the same pattern, so the count per layer is fixed:

The count does not depend on head count or hidden size. Head count only changes local compute granularity. Layer count is what multiplies the calls.

With Sequence Parallelism (the default pairing in modern Megatron), each AllReduce becomes a ReduceScatter + AllGather. The call count roughly doubles, but the byte volume stays the same.

Each message is one activation tensor, b × s × h.

symbol table

At b=1, s=4096, h=8192 in bf16, that is 64 MiB.

transformer tp

What happens if TP leaves the node

Back-of-envelope, with the assumptions stated: ring AllReduce, TP=8, line-rate links, no latency term, no overlap.

For the same micro-batch, the compute is about 0.5 s per GPU. This assumes about 400 TFLOPS achieved and 6 × 70B × 4096 tokens spread across 8 GPUs. On NVLink, TP communication is a fraction of compute and can be partly overlapped. Across the NIC, it is larger than compute and mostly exposed.

The gap is roughly 9× on bandwidth alone. Latency makes it worse, because 320 serialized collectives pay the per-hop cost 320 times.

tp completion time

Inference makes this harder. Decode has no backward pass, so the call counts halves. But the message shrinks to b × 1 × h, which is 16 KiB at b=1, h=8192 in bf16, and one AllReduce fires per layer per generated token. That is a pure latency problem, and SP stops helping because s=1.

inference tp

The evidence matches the arithmetic

The Megatron-LM scaling study (Narayanan et al., 2021) gives the same guidance: use TP up to the number of GPUs in a server and use PP to go across servers.

DeepSeek-V3 shows the opposite path. It avoids TP in training altogether by engineering per-layer memory down, using fine-grained experts, FP8 and DualPipe. Teams that can avoid TP do, because of this cost.

What does this mean for your benchmark

TP traffic has a different shape from the single big AllReduce that most collective benchmarks measure. It is hundreds of serialized, latency-critical collectives per step.

limit
3