Vector addition adds corresponding elements of two equal-sized vectors: for inputs X and Y of size N, each output element is zᵢ = xᵢ + yᵢ. section 2.2
The element-wise definition makes clear that each output depends on the matching elements of the two inputs. section 2.2
On a GPU, Triton divides the elements into contiguous blocks handled by independent program instances. Each instance calculates offsets, loads its input slices, adds them, and stores the matching output slice; masks handle elements beyond the vector length. section 2.4
The operation is a clear way to learn kernel construction, but a library operation is preferable for basic addition. Triton’s advantage is combining multiple steps in one kernel to reduce memory movement and launches. section 2.2
Benchmarking implementations
For 98,432-element vectors, compare Python, PyTorch, and Triton. Check the Triton result against PyTorch, then benchmark with GPU synchronization or Triton’s benchmarking utility so asynchronous launches and first-call compilation do not distort timing. section 2.2.10

