Reordering a reduction changes floating-point results. Requiring bit-exact equality would reject almost every useful optimization, so validation needs tolerances that are principled rather than arbitrary.
Tolerances by dtype and operation
We derive tolerance bands from the dtype and the depth of the reduction, then test across randomized inputs, edge-case values, and multiple shapes. Outliers are reported, not averaged away.
Beyond a single kernel
Small per-kernel differences can compound. We also compare end-to-end model outputs on held-out inputs to catch drift that unit-level checks miss.