Deterministic PyTorch regression tests

PyTorch has a surprising amount of non-determinism baked into operations that look like they should be exact. index_add_ in particular accumulates floating-point values across threads, and the summation order changes between runs depending on how the OS schedules those threads. The result: regression tests that pass locally, fail in CI, pass again on retry, and generally make everyone question…