-
Notifications
You must be signed in to change notification settings - Fork 24.5k
[dynamo] add reason field to torch.compiler.disable #150341
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
Conversation
[ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/150341
Note: Links to docs will display an error until the docs builds have been completed. ❌ 2 New Failures, 5 Unrelated FailuresAs of commit 3c25237 with merge base 0d44a8a ( NEW FAILURES - The following jobs have failed:
BROKEN TRUNK - The following jobs failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
UNSTABLE - The following jobs are marked as unstable, possibly due to flakiness on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames [ghstack-poisoned]
Implements #146445 cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames [ghstack-poisoned]
Implements #146445 cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames [ghstack-poisoned]
Implements #146445 cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames [ghstack-poisoned]
|
||
mod = Mod() | ||
mod.compile() | ||
mod = torch.compiler.disable(mod, reason="test message 2") |
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.
What are the chances you can go around the codebase and add reasons for all of the torch.compiler.disables? Maybe even codemod a bunch of them to message=None if it's too difficult to human-write one.
It'll be easier for people to cargo-cult a message in if existing code looks that way already
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.
Done in a followup
torch/compiler/__init__.py
Outdated
@@ -228,18 +228,19 @@ def assume_constant_result(fn): | |||
return torch._dynamo.assume_constant_result(fn) | |||
|
|||
|
|||
def disable(fn=None, recursive=True): | |||
def disable(fn=None, recursive=True, reason=None): |
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.
maybe kwarg-only the reason: (fn=None, recursive=True, *, reason=None)
Implements #146445 cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames [ghstack-poisoned]
Implements #146445 cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames [ghstack-poisoned]
@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 |
Starting merge as part of PR stack under #150440 |
Merge failedReason: 2 jobs have failed, first few of them are: inductor / cuda12.6-py3.10-gcc9-sm86 / test (inductor_torchbench, 1, 2, linux.g5.4xlarge.nvidia.gpu), linux-binary-manywheel / manywheel-py3_9-cuda12_6-test / test Details for Dev Infra teamRaised by workflow job |
Starting merge as part of PR stack under #150440 |
Pull Request resolved: #150440 Approved by: https://github.com/jansel, https://github.com/zou3519 ghstack dependencies: #150341
Implements pytorch#146445 Pull Request resolved: pytorch#150341 Approved by: https://github.com/zou3519, https://github.com/jansel
Pull Request resolved: pytorch#150440 Approved by: https://github.com/jansel, https://github.com/zou3519 ghstack dependencies: pytorch#150341
ghstack-source-id: 6a8eb80 Pull Request resolved: pytorch/pytorch#150341
Stack from ghstack (oldest at bottom):
Implements #146445
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @chauhang @amjames