viable/strict/1792407148: [Special] Improve accuracy of erfinv near 1 (#201187)
- PyTorch: 2546 events in the last 90 days
- PyTorch: 2513th Release in the last 90 days
- Previous: earlier the same day · trunk/277652eef64acabd6d493a9bf28a398a7c22a1dd: [Test] Port XPU for test_masked.py (#189683)
What happened
By using erfc instead of erf for the approximation and adding 3rd step of Newton-Raphson approximation for double Apply the same fix to MPS. Metal erfinv never had Newton-Raphson refinement: #101507 ported the CPU rational approximation but dropped the correction steps (Metal had no erf at the time), leaving it accurate to only ~8e-6 relative (~67 fp32 eps), which was masked by the 1e-4 float32 OpInfo tolerance. CUD…
Summary assembled by rule from the sources below