Skip to content

[dynamo] add USER_ERROR graph break hint to some dynamic shapes errors, chain underlying exceptions#172694

Closed
williamwen42 wants to merge 6 commits intogh/williamwen42/380/basefrom
gh/williamwen42/380/head
Closed

[dynamo] add USER_ERROR graph break hint to some dynamic shapes errors, chain underlying exceptions#172694
williamwen42 wants to merge 6 commits intogh/williamwen42/380/basefrom
gh/williamwen42/380/head

Conversation

@williamwen42
Copy link
Member

@williamwen42 williamwen42 commented Jan 17, 2026

Stack from ghstack (oldest at bottom):

This is to improve error messages of Dynamo FX node failures, in particular:

  • we suggest the user to run their code in eager to see if the error occurs
  • we chain exceptions wherever we were missing them in torch/_dynamo/utils.py

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

…s, chain underlying exceptions

[ghstack-poisoned]
@pytorch-bot
Copy link

pytorch-bot bot commented Jan 17, 2026

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/172694

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit a213749 with merge base 1a7a87d (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

williamwen42 added a commit that referenced this pull request Jan 17, 2026
…s, chain underlying exceptions

ghstack-source-id: 41e8396
Pull Request resolved: #172694
@williamwen42 williamwen42 marked this pull request as draft January 17, 2026 00:17
@williamwen42 williamwen42 added the topic: not user facing topic category label Jan 19, 2026
…hapes errors, chain underlying exceptions"

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

[ghstack-poisoned]
williamwen42 added a commit that referenced this pull request Jan 19, 2026
…s, chain underlying exceptions

ghstack-source-id: 58801cc
Pull Request resolved: #172694
…hapes errors, chain underlying exceptions"

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

[ghstack-poisoned]
…hapes errors, chain underlying exceptions"

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

[ghstack-poisoned]
williamwen42 added a commit that referenced this pull request Jan 28, 2026
…s, chain underlying exceptions

ghstack-source-id: e26c4f8
Pull Request resolved: #172694
@williamwen42 williamwen42 marked this pull request as ready for review January 28, 2026 23:15
"Context": "fn={fn}, args={args}, kwargs={kwargs}",
"Explanation": "All __torch_function__ overrides for for function {fn} returned NotImplemented",
"Hints": [
"Dynamo has detected that tracing the code will result in an error when running in eager. Please double check that your code doesn't contain a similar error when actually running eager/uncompiled."
Copy link
Member Author

Choose a reason for hiding this comment

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

Editing the entries directly (instead of adding new ones) should be fine since the graph break link generator (https://github.com/meta-pytorch/compile-graph-break-site/blob/main/generate-site.py and

def get_gbid_documentation_link(gb_type: str) -> Optional[str]:
) doesn't exact match on hints.

…hapes errors, chain underlying exceptions"


This is to improve error messages of Dynamo FX node failures, in particular:
- we suggest the user to run their code in eager to see if the error occurs
- we chain exceptions wherever we were missing them in torch/_dynamo/utils.py

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

[ghstack-poisoned]
williamwen42 added a commit that referenced this pull request Feb 2, 2026
…s, chain underlying exceptions

ghstack-source-id: 0319dcb
Pull Request resolved: #172694
@williamwen42
Copy link
Member Author

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Feb 2, 2026
@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

Merge failed

Reason: 6 mandatory check(s) failed. The first few are:

Dig deeper by viewing the failures on hud

Details for Dev Infra team Raised by workflow job

Failing merge rule: Core Maintainers

@williamwen42
Copy link
Member Author

@pytorchbot merge

@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

Merge failed

Reason: 6 mandatory check(s) failed. The first few are:

Dig deeper by viewing the failures on hud

Details for Dev Infra team Raised by workflow job

Failing merge rule: Core Maintainers

@williamwen42
Copy link
Member Author

@pytorchbot rebase

@pytorchmergebot
Copy link
Collaborator

@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here

[ghstack-poisoned]
@pytorchmergebot
Copy link
Collaborator

Successfully rebased gh/williamwen42/380/orig onto refs/remotes/origin/viable/strict, please pull locally before adding more changes (for example, via ghstack checkout https://github.com/pytorch/pytorch/pull/172694)

pytorchmergebot pushed a commit that referenced this pull request Feb 3, 2026
…s, chain underlying exceptions

ghstack-source-id: d96ea89
Pull Request resolved: #172694
@williamwen42
Copy link
Member Author

@pytorchbot merge

@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

meta-codesync bot pushed a commit to pytorch/benchmark that referenced this pull request Feb 5, 2026
…underlying exceptions (#172694)

Summary:
This is to improve error messages of Dynamo FX node failures, in particular:
- we suggest the user to run their code in eager to see if the error occurs
- we chain exceptions wherever we were missing them in torch/_dynamo/utils.py

X-link: pytorch/pytorch#172694
Approved by: https://github.com/pianpwk

Reviewed By: izaitsevfb

Differential Revision: D92237542

fbshipit-source-id: a627dc45275af5463928fe92bb9ec8c8ab1e6385
radeksm pushed a commit to radeksm/pytorch that referenced this pull request Feb 20, 2026
…s, chain underlying exceptions (pytorch#172694)

This is to improve error messages of Dynamo FX node failures, in particular:
- we suggest the user to run their code in eager to see if the error occurs
- we chain exceptions wherever we were missing them in torch/_dynamo/utils.py

Pull Request resolved: pytorch#172694
Approved by: https://github.com/pianpwk
libohao1201 pushed a commit to libohao1201/pytorch that referenced this pull request Mar 2, 2026
…s, chain underlying exceptions (pytorch#172694)

This is to improve error messages of Dynamo FX node failures, in particular:
- we suggest the user to run their code in eager to see if the error occurs
- we chain exceptions wherever we were missing them in torch/_dynamo/utils.py

Pull Request resolved: pytorch#172694
Approved by: https://github.com/pianpwk
@github-actions github-actions bot deleted the gh/williamwen42/380/head branch March 6, 2026 02:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants