Fix invalid indices bug for max_unpool2d/3d on MPS#163036
Fix invalid indices bug for max_unpool2d/3d on MPS#163036can-gaa-hou wants to merge 3 commits intopytorch:mainfrom
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/163036
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 20e4e0c with merge base 456fbea ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@pytorchbot merge |
Merge failedReason: Approvers from one of the following sets are needed:
|
malfet
left a comment
There was a problem hiding this comment.
Thank you for working on the change, but I'm a bit suspicious why this is tested only for MPS?
Also, use simpler error checking message and print entire shape rather than having separate output for 2d and 3d cases, which would also eliminate the need for may-be unsued
Co-authored-by: Nikita Shulga <2453524+malfet@users.noreply.github.com>
malfet
left a comment
There was a problem hiding this comment.
Looks good to me, code looks much neater now
|
To add the ciflow label This helps ensure we don't trigger CI on this PR until it is actually authorized to do so. Please ping one of the reviewers if you do not have access to approve and run workflows. |
|
@pytorchbot merge |
|
Pull workflow has not been scheduled for the PR yet. It could be because author doesn't have permissions to run those or skip-checks keywords were added to PR/commits, aborting merge. Please get/give approval for the workflows and/or remove skip ci decorators before next merge attempt. If you think this is a mistake, please contact PyTorch Dev Infra. |
Thanks for the review! |
|
@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 |
Fixes pytorch#163035 Pull Request resolved: pytorch#163036 Approved by: https://github.com/kulinseth, https://github.com/malfet Co-authored-by: Nikita Shulga <2453524+malfet@users.noreply.github.com>
Fixes pytorch#163035 Pull Request resolved: pytorch#163036 Approved by: https://github.com/kulinseth, https://github.com/malfet Co-authored-by: Nikita Shulga <2453524+malfet@users.noreply.github.com>
Fixes pytorch#163035 Pull Request resolved: pytorch#163036 Approved by: https://github.com/kulinseth, https://github.com/malfet Co-authored-by: Nikita Shulga <2453524+malfet@users.noreply.github.com>
|
I must have been blind when reviewing this PR:
|
|
Sorry about that. The check introduced a sync point on MPS, and the test only validated CPU behavior. I’ll be more careful about host-side reads/reductions on MPS paths and make sure tests cover the intended device next time. Thanks for catching and fixing this. cc @malfet |
Introduced by #163036, that I should have rejected, but ship have sailed Also, delete unnecessary `test_max_unpool_invalid_indices` as those checks are already covered by `test_MaxUnpool_index_errors` , but they were skipped in the past as test is marked slow (though it should have been marked as such only for CUDA) Pull Request resolved: #172046 Approved by: https://github.com/manuelcandales ghstack dependencies: #172051, #172052
Introduced by #163036, that I should have rejected, but ship have sailed Also, delete unnecessary `test_max_unpool_invalid_indices` as those checks are already covered by `test_MaxUnpool_index_errors` , but they were skipped in the past as test is marked slow (though it should have been marked as such only for CUDA) Pull Request resolved: #172046 Approved by: https://github.com/manuelcandales ghstack dependencies: #172051, #172052 (cherry picked from commit 9469ce4)
[MPS] Remove error-checking sync point from MaxUnpool (#172046) Introduced by #163036, that I should have rejected, but ship have sailed Also, delete unnecessary `test_max_unpool_invalid_indices` as those checks are already covered by `test_MaxUnpool_index_errors` , but they were skipped in the past as test is marked slow (though it should have been marked as such only for CUDA) Pull Request resolved: #172046 Approved by: https://github.com/manuelcandales ghstack dependencies: #172051, #172052 (cherry picked from commit 9469ce4) Co-authored-by: Nikita Shulga <nshulga@meta.com>
Introduced by pytorch#163036, that I should have rejected, but ship have sailed Also, delete unnecessary `test_max_unpool_invalid_indices` as those checks are already covered by `test_MaxUnpool_index_errors` , but they were skipped in the past as test is marked slow (though it should have been marked as such only for CUDA) Pull Request resolved: pytorch#172046 Approved by: https://github.com/manuelcandales ghstack dependencies: pytorch#172051, pytorch#172052
Introduced by pytorch/pytorch#163036 I should have rejected that PR during the review ghstack-source-id: 770c1f1 Pull-Request: pytorch/pytorch#172046 ghstack-source-id: c97ccf1 Pull Request resolved: pytorch/pytorch#172077
Introduced by pytorch/pytorch#163036 I should have rejected that PR during the review ghstack-source-id: 770c1f1 Pull-Request: pytorch/pytorch#172046 ghstack-source-id: 8fccd95 Pull Request resolved: pytorch/pytorch#172080
Fixes #163035