Repository navigation
Conversation
[ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/199663
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (6 Unrelated Failures)As of commit 5fe72c8 with merge base dd5cbc4 ( 🟡 GREEN LIGHT - PR requires human review:
reason: FLAKY - The following jobs failed but were likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
jansel
approved these changes
Oct 4, 2026
Contributor
Author
|
@pytorchbot merge |
Collaborator
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 |
cyyever
pushed a commit
to BakeLab/pytorch
that referenced
this pull request
Oct 11, 2026
pytorch#199663) The three test_interpolate_mutated_input_backward tests added in pytorch#185876 fail consistently in the periodic nogpu_NO_AVX2 config: ``` AssertionError: Tensor-likes are not close! Mismatched elements: 1 / 3 (33.3%) Greatest absolute difference: 0.0005950927734375 at index (0, 0, 0) (up to 1e-05 allowed) Greatest relative difference: 3.6538310723699396e-06 at index (0, 0, 0) (up to 1.3e-06 allowed) ``` This is float32 summation error, not a correctness bug. The mismatching tensor is mean.grad, where each element is a sum of 256 float32 values (about 313 in magnitude). Eager computes it with ATen's cascade_sum and is accurate to about 2e-8 relative. nogpu_NO_AVX2 sets ATEN_CPU_CAPABILITY=default, which Inductor also uses to pick its vector ISA, so the compiled kernel is scalar. Inductor's scalar reductions are a single running sum (its CascadeSumHelper is only used by vectorized kernels, in 4096-element chunks), which is about 2e-6 relative off here, just over assertEqual's default float32 rtol of 1.3e-6. Vectorized builds keep one accumulator per lane and pass. The fix compares with atol=1e-4 and rtol=1e-4, as the neighboring gradient tests in this file do. The alternative, giving Inductor's scalar CPU reductions cascade summation, would be a codegen change with performance cost and is out of scope for a test failure. Test Plan: ``` ATEN_CPU_CAPABILITY=default python -m pytest test/inductor/test_cpu_repro.py -k test_interpolate_mutated_input_backward python -m pytest test/inductor/test_cpu_repro.py -k test_interpolate_mutated_input_backward ``` All three pass in both configurations; before the change they failed with ATEN_CPU_CAPABILITY=default with the same numbers as CI. With pytorch#185876's torch/ changes reverted, all three still fail with "one of the variables needed for gradient computation has been modified by an inplace operation", so the looser tolerance doesn't hide the bug the tests guard against. This PR was authored with the help of an AI assistant. Pull Request resolved: pytorch#199663 Approved by: https://github.com/jansel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack from ghstack (oldest at bottom):
The three test_interpolate_mutated_input_backward tests added in #185876 fail
consistently in the periodic nogpu_NO_AVX2 config:
This is float32 summation error, not a correctness bug. The mismatching tensor
is mean.grad, where each element is a sum of 256 float32 values (about 313 in
magnitude). Eager computes it with ATen's cascade_sum and is accurate to about
2e-8 relative. nogpu_NO_AVX2 sets ATEN_CPU_CAPABILITY=default, which Inductor
also uses to pick its vector ISA, so the compiled kernel is scalar. Inductor's
scalar reductions are a single running sum (its CascadeSumHelper is only used by
vectorized kernels, in 4096-element chunks), which is about 2e-6 relative off
here, just over assertEqual's default float32 rtol of 1.3e-6. Vectorized builds
keep one accumulator per lane and pass.
The fix compares with atol=1e-4 and rtol=1e-4, as the neighboring gradient tests
in this file do. The alternative, giving Inductor's scalar CPU reductions
cascade summation, would be a codegen change with performance cost and is out of
scope for a test failure.
Test Plan:
All three pass in both configurations; before the change they failed with
ATEN_CPU_CAPABILITY=default with the same numbers as CI. With #185876's
torch/ changes reverted, all three still fail with "one of the variables needed
for gradient computation has been modified by an inplace operation", so the
looser tolerance doesn't hide the bug the tests guard against.
This PR was authored with the help of an AI assistant.
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @kadeng @muchulee8 @amjames @chauhang @aakhundov @coconutruben @jataylo