Broadcasting lets values with compatible shapes participate in a larger tensor operation without requiring repeated copies. In a PyTorch view, a stride of zero means an index can advance along a logical dimension without changing the memory address. For example, adding a vector of shape (N,) to a matrix of shape (M, N) treats the vector as a view of shape (M, N) with strides (0, 1): every row reuses the same stored vector. section 5.2.3
In Triton, broadcasting also builds multidimensional index and pointer tensors. Given row offsets of shape (BLOCK_M,) and column offsets of shape (BLOCK_N,), add a dimension to each to obtain shapes (BLOCK_M, 1) and (1, BLOCK_N). Broadcasting their stride-scaled values produces a (BLOCK_M, BLOCK_N) array of offsets, with one address for each tile element. section 5.3.2
Figure 5.6 Constructing the 2D pointer offset table by broadcasting. row_offs × stride_m has shape BLOCK_M × 1, and col_offs × stride_n has shape 1 × BLOCK_N. Broadcasting adds the two contributions at every position in the BLOCK_M × BLOCK_N offset table. For a row-major tile at the origin with stride_m = 4 and stride_n = 1, element (1, 2) receives offset 4 + 2 = 6.
The offset table shows how row and column contributions broadcast to form a two-dimensional pointer array. section 5.3.2




