-
Notifications
You must be signed in to change notification settings - Fork 24.6k
Preseve stack trace in nodes during fx.Transform #82670
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
✅ No Failures (4 Pending)As of commit c3998b6 (more details on the Dr. CI page): Expand to see more💚 💚 Looks good so far! There are no failures yet. 💚 💚 This comment was automatically generated by Dr. CI (expand for details).Please report bugs/suggestions to the (internal) Dr. CI Users group. |
[ghstack-poisoned]
torch/fx/interpreter.py
Outdated
@@ -148,6 +149,8 @@ def run_node(self, n : Node) -> Any: | |||
Returns: | |||
Any: The result of executing ``n`` | |||
""" | |||
self.current_node = n |
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.
I'd prefer this to be dynamically scoped: so you save the current value of current_node
, set it, and then on return (finally) you restore to old value
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 is mostly helpful if you have some reentrant execution of the same interpreter. Which hopefully is pretty unlikely...
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.
Updated per request.
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; manually written passes are going to have to be adjusted too though :(
@Chillee it's easier to hide the boilerplate if we do retracing lol. I swear people are going to keep forgetting to propagate stack traces. Maybe we need to make some modifications to the API people do node iteration over to make it easier to not forget to do this.
[ghstack-poisoned]
@pytorchbot rebase -s |
@pytorchbot successfully started a rebase job. Check the current status here |
[ghstack-poisoned]
Successfully rebased |
@pytorchbot merge |
@pytorchbot successfully started a merge and created land time checks. See merge status here and land check progress here. |
Pull Request resolved: #82670 Approved by: https://github.com/ezyang
Hey @SherlockNoMad. |
Summary: Pull Request resolved: #82670 Approved by: https://github.com/ezyang Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/752579a3735ce711ccaddd8d9acff8bd6260efe0 Reviewed By: kit1980 Differential Revision: D38424995 Pulled By: SherlockNoMad fbshipit-source-id: 80e509caa938a254b043288b570fdf088d07d2c6
Stack from ghstack (oldest at bottom):