Commit 776489a
committed
Loosen test_point_face_distance grad_faces tolerance to 5e-6
DistanceBackwardCuda accumulates per-face gradient contributions via atomicAdd and explicitly calls `at::globalContext().alertNotDeterministic("DistanceBackwardCuda")`. The FP add order is platform-dependent — different wavefront/warp widths and scheduling produce different rounding errors. On AMD gfx90a (warpSize=64, MI250X) the resulting grad_faces value differs from the CPU autograd naive reference by a bit-stable 7.67e-7 max abs (4e-5 max rel), which exceeds the previous `atol=5e-7` but is well within float32 noise.
The sibling test `test_face_point_distance` (5 lines below) already uses `atol=5e-6` for exactly the same kind of comparison on grad_tris; the asymmetric `5e-7` for this test was an inconsistency rather than a hardware-specific requirement. Bumping both grad_faces asserts (cuda and cpu paths) to `5e-6` brings the two tests into alignment and accepts platforms with different atomic-ordering behaviour.
Co-Authored-By: Claude Opus 4.7 (1M context)1 parent 5bb00d0 commit 776489a
1 file changed
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
707 | 707 | | |
708 | 708 | | |
709 | 709 | | |
710 | | - | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
711 | 716 | | |
712 | | - | |
| 717 | + | |
713 | 718 | | |
714 | 719 | | |
715 | 720 | | |
| |||
0 commit comments