Skip to content

[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

Closed

Conversation

williamwen42
Copy link
Member

@williamwen42 williamwen42 commented Mar 31, 2025

Copy link

pytorch-bot bot commented Mar 31, 2025

🔗 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 Failures

As of commit 3c25237 with merge base 0d44a8a (image):

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.

williamwen42 added a commit that referenced this pull request Mar 31, 2025
ghstack-source-id: 6b5c538
Pull Request resolved: #150341
cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames

[ghstack-poisoned]
williamwen42 added a commit that referenced this pull request Mar 31, 2025
ghstack-source-id: 7783041
Pull Request resolved: #150341
@williamwen42 williamwen42 added release notes: dynamo module: compile ux UX issues related to torch.compile labels Mar 31, 2025
@williamwen42 williamwen42 changed the title [dynamo] add messages torch.compiler.disable [dynamo] add reason field to torch.compiler.disable Mar 31, 2025
Implements #146445

cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames

[ghstack-poisoned]
williamwen42 added a commit that referenced this pull request Mar 31, 2025
ghstack-source-id: db17776
Pull Request resolved: #150341
Implements #146445

cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames

[ghstack-poisoned]
williamwen42 added a commit that referenced this pull request Mar 31, 2025
ghstack-source-id: db283c1
Pull Request resolved: #150341
Implements #146445

cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames

[ghstack-poisoned]
williamwen42 added a commit that referenced this pull request Mar 31, 2025
ghstack-source-id: ba2bc49
Pull Request resolved: #150341

mod = Mod()
mod.compile()
mod = torch.compiler.disable(mod, reason="test message 2")
Copy link
Contributor

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in a followup

@@ -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):
Copy link
Contributor

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]
@williamwen42
Copy link
Member Author

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Apr 1, 2025
@pytorchmergebot
Copy link
Collaborator

Merge started

Your 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

Advanced Debugging
Check the merge workflow status
here

@pytorchmergebot
Copy link
Collaborator

Starting merge as part of PR stack under #150440

@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: 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 team Raised by workflow job

@pytorchmergebot
Copy link
Collaborator

Starting merge as part of PR stack under #150440

pytorchmergebot pushed a commit that referenced this pull request Apr 2, 2025
amathewc pushed a commit to amathewc/pytorch that referenced this pull request Apr 17, 2025
amathewc pushed a commit to amathewc/pytorch that referenced this pull request Apr 17, 2025
Divigroup-RAP pushed a commit to Divigroup-RAP/PYTORCH that referenced this pull request Apr 22, 2025
@github-actions github-actions bot deleted the gh/williamwen42/224/head branch May 12, 2025 02:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ciflow/inductor ciflow/trunk Trigger trunk jobs on your pull request Merged module: compile ux UX issues related to torch.compile module: dynamo release notes: dynamo
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants