trunk/b262babb27246aa174c74289e5624b3ccfe7e3f5: Make the softshrink decompositions match eager bitwise (#200802)
- PyTorch 近 90 天出现 2543 次
- PyTorch 近 90 天第 2510 次发版
- 上一次:同一天稍早 · trunk/d63e42924525bba2e0c88952ace805c786c3e299: [Testcase Refactoring] Classify getitem tests by hardware (#193071)
发生了什么
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…
摘要按规则整理自下方来源原文