[inductor] Fix reciprocal to use float32 for division_rounding#174751
[inductor] Fix reciprocal to use float32 for division_rounding#174751mlazos wants to merge 29 commits intogh/mlazos/97/basefrom
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/174751
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (2 Unrelated Failures)As of commit 119e900 with merge base 197c376 ( FLAKY - The following job failed but was likely due to flakiness present on trunk:
UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Use float32 constant instead of int for reciprocal to ensure proper floating-point division when emulating eager division rounding. The OpDecompositions.reciprocal method decomposes reciprocal(x) to 1 / x. When eager_numerics.division_rounding is enabled, truediv checks if both operands are float32 before using div_rn. With an int32 constant, this check fails and regular division is used, causing ~13% of values to differ from eager. Test: test_reciprocal_precision_rounding in test_cuda_repro.py ghstack-source-id: a658442 Pull-Request: #174751
Merge startedYour change will be merged while ignoring the following 3 checks: inductor / unit-test / inductor-test / test (inductor, 2, 2, linux.g5.4xlarge.nvidia.gpu), inductor / unit-test / inductor-test / test (inductor, 1, 2, linux.g5.4xlarge.nvidia.gpu), trunk / win-vs2022-cuda12.8-py3 / build Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Merge failedReason: 1 jobs have failed, first few of them are: linux-aarch64 / linux-jammy-aarch64-py3.10 / test (openreg, 1, 1, lf.linux.arm64.m8g.4xlarge) Details for Dev Infra teamRaised by workflow job |
|
@pytorchbot merge -f "unrelated failures" |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
#174751)" This reverts commit 1b9046a. Reverted #174751 on behalf of https://github.com/jeanschmidt due to Need to revert in order to revert #175555 - see D94699526 ([comment](#174933 (comment)))
|
@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 |
PR #174751 fixed reciprocal to use float32 for division_rounding, which makes these xfails stale under the inductor_numerics backend. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
PR #174751 fixed reciprocal to use float32 for division_rounding, which makes these xfails stale under the inductor_numerics backend.
Use float32 constant instead of int for reciprocal to ensure proper floating-point division when emulating eager division rounding. The OpDecompositions.reciprocal method decomposes reciprocal(x) to 1 / x. When eager_numerics.division_rounding is enabled, truediv checks if both operands are float32 before using div_rn. With an int32 constant, this check fails and regular division is used, causing ~13% of values to differ from eager. Test: test_reciprocal_precision_rounding in test_cuda_repro.py ghstack-source-id: 67e2eb4 Pull-Request: pytorch/pytorch#174751
Use float32 constant instead of int for reciprocal to ensure proper floating-point division when emulating eager division rounding. The OpDecompositions.reciprocal method decomposes reciprocal(x) to 1 / x. When eager_numerics.division_rounding is enabled, truediv checks if both operands are float32 before using div_rn. With an int32 constant, this check fails and regular division is used, causing ~13% of values to differ from eager. Test: test_reciprocal_precision_rounding in test_cuda_repro.py ghstack-source-id: 9bf7138 Pull-Request: pytorch/pytorch#174751
Use float32 constant instead of int for reciprocal to ensure proper floating-point division when emulating eager division rounding. The OpDecompositions.reciprocal method decomposes reciprocal(x) to 1 / x. When eager_numerics.division_rounding is enabled, truediv checks if both operands are float32 before using div_rn. With an int32 constant, this check fails and regular division is used, causing ~13% of values to differ from eager. Test: test_reciprocal_precision_rounding in test_cuda_repro.py ghstack-source-id: 4f8ac82 Pull-Request: pytorch/pytorch#174751
…ch#174751) Use float32 constant instead of int for reciprocal to ensure proper floating-point division when emulating eager division rounding. Test: test_div_precision_rounding in test_cuda_repro.py Pull Request resolved: pytorch#174751 Approved by: https://github.com/v0i0 ghstack dependencies: pytorch#174749, pytorch#174933
pytorch#174751)" This reverts commit 1b9046a. Reverted pytorch#174751 on behalf of https://github.com/jeanschmidt due to Need to revert in order to revert pytorch#175555 - see D94699526 ([comment](pytorch#174933 (comment)))
…ch#174751) Use float32 constant instead of int for reciprocal to ensure proper floating-point division when emulating eager division rounding. Test: test_div_precision_rounding in test_cuda_repro.py Pull Request resolved: pytorch#174751 Approved by: https://github.com/v0i0 ghstack dependencies: pytorch#174749, pytorch#174933
Stack from ghstack (oldest at bottom):
Use float32 constant instead of int for reciprocal to ensure proper
floating-point division when emulating eager division rounding.
Test: test_div_precision_rounding in test_cuda_repro.py
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @kadeng @muchulee8 @amjames @chauhang @aakhundov @coconutruben @jataylo