The smallest workload that exposes the entire GPU model
A vector is an array. Two vectors of the same length, added: w[i] = u[i] + v[i] for every i. One arithmetic op per element, no dependencies between elements — the textbook definition of embarrassingly parallel.
'Embarrassing' here is praise. Embarrassingly parallel workloads have:
- No cross-element communication — each output depends only on its own inputs.
- Trivially load-balanced work — every element costs the same.
- Linear memory access — fully coalesced, full bandwidth.
- Zero synchronization — no
__syncthreadsneeded.
That's why we start here. Every later workload (matrix add, GEMM, attention, softmax) inherits this skeleton and adds complications: 2-D indexing, shared-memory reuse, reductions, masks. Master the skeleton first.
Why GPUs love it specifically: a vector add saturates DRAM bandwidth without ever needing the L2 cache. It's the simplest test of 'is my memory subsystem alive?' — if your hand-rolled kernel hits 80% of theoretical bandwidth here, your toolchain and launch geometry are healthy.