trunk/b262babb27246aa174c74289e5624b3ccfe7e3f5: Make the softshrink decompositions match eager bitwise (#200802)
- PyTorch: 2540 events in the last 90 days
- PyTorch: 2507th Release in the last 90 days
- Previous: earlier the same day · trunk/d63e42924525bba2e0c88952ace805c786c3e299: [Testcase Refactoring] Classify getitem tests by hardware (#193071)
What happened
The softshrink reference did not match the ATen kernels, which made softshrink fail Inductor's strict-numerics checks (and led #200768 to add Inductor-only special cases for it). Fix it at the decomposition layer instead: Match each backend's kernel on NaN and signed zeros. CUDA returns NaN as is and +0 in the dead zone; MPS computes a * 0 , which is -0.0 for negative inputs. The CPU kernel is not consistent with it…
Summary assembled by rule from the sources below