-
Notifications
You must be signed in to change notification settings - Fork 24.2k
[dynamo] Don't affect stack traces under TORCHDYNAMO_DISABLE #148618
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
base: gh/xmfan/193/base
Are you sure you want to change the base?
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/148618
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit afd1af0 with merge base 68bbe20 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
@pytorchbot rebase |
@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here |
Successfully rebased |
@pytorchbot rebase |
@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here |
Successfully rebased |
_is_inside_opcheck_mode.value = True | ||
os.environ["TORCHDYNAMO_DISABLE"] = "1" |
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.
@williamwen42 @zou3519 with this PR, dynamically changing TORCHDYNAMO_DISABLE from inside the test caused some infinite recursion issues. I'm not exactly sure why, but if we are going to disable dynamo on all OpCheckMode tests any way, I changed it to use skipIfTorchDynamo
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.
This PR will make the disable decorator no-op, but when we enter OpCheckMode in the generated tests, some frames have already been disabled/compiled under PYTORCH_TEST_WITH_DYNAMO.
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.
It's a feature that opcheck is a no-op underneath PYTORCH_TEST_WITH_DYNAMO. It's not just these opcheck tests in PyTorch's test suite, we ran into a case with other tests (#111685 mentions some fbgemm tests)
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.
the TORCHDYNAMO_DISABLE is a feature, if we want to remove it we need to figure out how to apply the same logic to opcheck itself (instead of it being a decorator on the tests)
Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as |
Stack from ghstack (oldest at bottom):
Follow-up to https://fb.workplace.com/groups/1286739428954016/permalink/1446477902980167/. We don't want to wrap eager code when TORCHDYNAMO_DISABLE/JustKnobs are flipped, because it was confusing model owners to still see their exception stack traces go through eval_frame.py.
8000We already had it supported for torch.compile, this PR adds support for disable and run.
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @chauhang @amjames