Improve the precision of abs() and sign() for large values#99550
Improve the precision of abs() and sign() for large values#99550lezcano wants to merge 3 commits intogh/Lezcano/190/basefrom
Conversation
@ev-br found in Quansight-Labs/numpy_pytorch_interop#117 (comment) that the precision of `abs()` for large values in the vectorised case is less-than-good. This PR fixes this issue. While doing that, we are able to comment out a few tests on extremal values. [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/99550
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ✅ No FailuresAs of commit 92cbe49: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
ev-br found in Quansight-Labs/numpy_pytorch_interop#117 (comment) that the precision of `abs()` for large values in the vectorised case is less-than-good. This PR fixes this issue. While doing that, we are able to comment out a few tests on extremal values. ghstack-source-id: 96a8b77 Pull Request resolved: #99550
ev-br found in Quansight-Labs/numpy_pytorch_interop#117 (comment) that the precision of `abs()` for large values in the vectorised case is less-than-good. This PR fixes this issue. While doing that, we are able to comment out a few tests on extremal values. cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 [ghstack-poisoned]
|
@peterbell10, addressed the review. I also cleaned |
ev-br found in Quansight-Labs/numpy_pytorch_interop#117 (comment) that the precision of `abs()` for large values in the vectorised case is less-than-good. This PR fixes this issue. While doing that, we are able to comment out a few tests on extremal values. Fixes #53958 #48486 cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 [ghstack-poisoned]
ev-br found in Quansight-Labs/numpy_pytorch_interop#117 (comment) that the precision of `abs()` for large values in the vectorised case is less-than-good. This PR fixes this issue. While doing that, we are able to comment out a few tests on extremal values. ghstack-source-id: c3ca417 Pull Request resolved: #99550
|
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
|
Unfortunately the VSX code hasn't been updated and produces NaNs where inf is expected for those test_reference_numerics_extremal__refs_abs_cpu_complex* tests |
|
Feel free to send a PR |
|
Done: #116859 |
Use a similar approach with Sleef as in pytorch#99550 to improve the precision and extremal value handling of the `abs` function for complex tensors. This fixes - test_reference_numerics_extremal__refs_abs_cpu_float64 - test_reference_numerics_extremal__refs_abs_cpu_float128 which failed on PPC.
Use a similar approach with Sleef as in #99550 to improve the precision and extremal value handling of the `abs` function for complex tensors. This fixes - test_reference_numerics_extremal__refs_abs_cpu_float64 - test_reference_numerics_extremal__refs_abs_cpu_float128 which failed on PPC. Pull Request resolved: #116859 Approved by: https://github.com/lezcano
Stack from ghstack (oldest at bottom):
@ev-br found in
Quansight-Labs/numpy_pytorch_interop#117 (comment)
that the precision of
abs()for large values in the vectorised case is less-than-good.This PR fixes this issue. While doing that, we are able to comment out a
few tests on extremal values.
Fixes #53958 #48486
cc @jgong5 @mingfeima @XiaobingSuper @sanchitintel @ashokei @jingxu10