For an elementwise condition, different lanes may need different values. tl.where(mask, a, b) selects a or b independently for each lane, keeping the warp on one control-flow path instead of serializing divergent branches. section 3.4.2 section 3.7
output = tl.where(x > 0, x, tl.zeros_like(x))
A ReLU selects each positive input value and otherwise selects zero. section 3.4.2
Selection does not make candidate computation conditional: both candidate expressions are often evaluated before the select. When they require substantial work, producing them can cost more than the select itself. section 3.4.2
