Repository navigation
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/188494
Note: Links to docs will display an error until the docs builds have been completed. ❌ 3 New FailuresAs of commit 349794f with merge base c1bbf1f ( NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@claude this fix looks correct and makes sense to me, my curious question is why wasnt this noticed for so long / curious if you have any insights into this specific setup as well im curious if you can do a wider code base search and see if there are any other problems of a similar form that we have missed |
|
Claude finished @drisspg's task in 2m 15s —— View job Analysis
@drisspg Great questions. Here's what I found. Root causeThe const int phstart = (h < kernel_h) ? 0 : (h - kernel_h) / stride_h + 1;
const int phend = min(h / stride_h + 1, pooled_height);The NCHW ( Why it went unnoticed for so longTwo things lined up:
So it's the classic "the test exercised the happy path and the asserting test was itself subtly inert" situation, combined with the bug living only in the less-common memory format. Wider codebase search for similar problemsI checked the sibling pooling kernels for the same gather/padded-coordinate hazard:
The key structural insight: only the 2D avg-pool backward uses the gather formulation that needs the explicit If you want extra assurance, the one thing worth adding is an The fix itself looks correct to me. |
|
@pytorchmergebot 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 |
|
@pytorchbot revert -m "Reverted automatically by pytorch's autorevert, to avoid this behaviour add the tag autorevert: disable" -c autorevert This PR is attributed to have caused regression in:
Note: This revert was accelerated by the AI advisor: AI advisor: related (confidence=0.98) Please investigate and fix the issues. |
|
Claude finished @pytorch-auto-revert[bot]'s task in 1m 17s —— View job Autorevert diagnosis: legitimate, but a one-line fix
Failing test: Failure mode: Is the revert legitimate?Yes — this PR caused it, but it's a stale test annotation, not a real regression. In fact it's positive proof the fix works.
# The difference between channels last backward and
# channels first backward of AvgPool2d on CUDA is too large
# See https://github.com/pytorch/pytorch/issues/107201
DecorateInfo(
unittest.expectedFailure,
'TestModule',
'test_memory_format',
active_if=operator.itemgetter('training'), # backward only
device_type='cuda',),That xfail describes exactly the bug this PR fixed: channels-last (NHWC) backward disagreeing with channels-first (NCHW) backward. Now that the NHWC kernel computes gradients correctly, the channels-last vs channels-first comparison matches, the test passes — and since it's still tagged This combination isn't exercised on the PR's own CI signal because it lives on the inductor How to fix (so it can re-land)Remove the now-obsolete ModuleInfo(torch.nn.AvgPool2d,
module_inputs_func=module_inputs_torch_nn_AvgPool2d),Then re-run locally to confirm both the previously-xfailed case and the rest pass: python test/test_modules.py TestModuleCUDA.test_memory_format_nn_AvgPool2d_cuda_float32Worth double-checking the float64 / chalf variants of the same test on CUDA too, in case any of them were implicitly relying on the same skip. Since this PR's correctness change is already approved and validated, folding the decorator removal into the re-land is all that's needed. |
|
@pytorchbot successfully started a revert job. Check the current status here. |
…)" This reverts commit 7f9c3fb. Reverted #188494 on behalf of https://github.com/pytorch-auto-revert due to Reverted automatically by pytorch's autorevert, to avoid this behaviour add the tag autorevert: disable ([comment](#188494 (comment)))
|
@eqy your PR has been successfully reverted. |
|
#188345 was merged |
To fix pytorch#188344 Original test from pytorch#35855 didn't actually pass padding which is why we didn't see it authored with codex Pull Request resolved: pytorch#188494 Approved by: https://github.com/drisspg, https://github.com/Skylion007
…ch#188494)" This reverts commit 7f9c3fb. Reverted pytorch#188494 on behalf of https://github.com/pytorch-auto-revert due to Reverted automatically by pytorch's autorevert, to avoid this behaviour add the tag autorevert: disable ([comment](pytorch#188494 (comment)))
To fix pytorch#188344 Original test from pytorch#35855 didn't actually pass padding which is why we didn't see it authored with codex Pull Request resolved: pytorch#188494 Approved by: https://github.com/drisspg, https://github.com/Skylion007
…ch#188494)" This reverts commit 7f9c3fb. Reverted pytorch#188494 on behalf of https://github.com/pytorch-auto-revert due to Reverted automatically by pytorch's autorevert, to avoid this behaviour add the tag autorevert: disable ([comment](pytorch#188494 (comment)))
To fix #188344
Original test from #35855 didn't actually pass padding which is why we didn't see it
authored with codex
cc @ptrblck @msaroufim @tinglvv @nWEIdia