New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix exception handling in torch._dynamo.utils.same and add corresponding test #125132
base: main
Are you sure you want to change the base?
Conversation
…oesn't swallow exceptions and maintains original error context
…rror messages are both not obscured in the case that an exception happens. Also added a test for when an exception is not raised for completeness
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/125132
Note: Links to docs will display an error until the docs builds have been completed. ❌ 13 New Failures, 5 Unrelated FailuresAs of commit 427d9f2 with merge base e3b9b71 (): NEW FAILURES - The following jobs have failed:
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okey dokey
@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 |
Merge failedReason: 1 mandatory check(s) failed. The first few are: Dig deeper by viewing the failures on hud |
@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 |
Merge failedReason: 3 jobs have failed, first few of them are: trunk / macos-12-py3-arm64 / test (default, 1, 3, macos-m1-stable), trunk / linux-focal-cuda12.1-py3.10-gcc9 / test (nogpu_AVX512, 1, 1, linux.2xlarge), trunk / linux-focal-cuda12.1-py3.10-gcc9 / test (nogpu_NO_AVX2, 1, 1, linux.2xlarge) Details for Dev Infra teamRaised by workflow job |
Description:
This PR addresses an issue where the torch._dynamo.utils.same function swallows exceptions raised by torch.allclose without preserving the original exception information. It also adds a new test file to cover the scenario where an exception occurs during the torch.allclose check.
Changes:
Benefits:
Fixes #111075
Please review this pull request and provide any feedback or suggestions for improvement.
Thank you!
cc @ezyang @msaroufim @bdhirsh @anijain2305 @chauhang @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng