Why it matters

DDP is baseline multi-GPU. Understanding shapes design.

Advertisement

The architecture

Each GPU has full model copy.

Batch split across GPUs.

Grads all-reduced.

Optimizer step per replica.

DDP flowReplica per GPUfull modelLocal forward + backon batch shardAll-reduce gradssyncPyTorch DDP; simple + effective when model fits on single GPU
DDP.
Advertisement

How it works end to end

All-reduce: ring or tree.

Overlap comm with backward.

Effective batch = per-GPU batch * world size.