-
Notifications
You must be signed in to change notification settings - Fork 25.7k
unflatten closure #159418
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
unflatten closure #159418
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/159418
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (1 Unrelated Failure)As of commit eee811d with merge base d3ce450 ( UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
This pull request was exported from Phabricator. Differential Revision: D79204669 |
| gm = export(m, (torch.rand(64, 64),)) | ||
| torch.export.unflatten(gm) | ||
|
|
||
| def test_unflatten_closure(self): |
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.
nit: why not put this in test_unflatten.py?
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 guess I could? test_unflatten checks strictly fewer variants though, right?
226d6dc to
a4a34cb
Compare
Summary: Sometimes the call history recorded in a `nn_module_stack` does not have the stack property, where each FQN is a prefix of the next FQN. This can cause errors during `unflatten`. Instead of erroring we now drop entries from such a `nn_module_stack` to restore the stack property. This effectively leads to less unflattening: the last FQN in the call history before the stack property was broken keeps the entire flat subgraph of its call. Test Plan: added test, updated another Rollback Plan: Reviewed By: angelayi Differential Revision: D79204669
Summary: Pull Request resolved: pytorch#159418 Sometimes the call history recorded in a `nn_module_stack` does not have the stack property, where each FQN is a prefix of the next FQN. This can cause errors during `unflatten`. Instead of erroring we now drop entries from such a `nn_module_stack` to restore the stack property. This effectively leads to less unflattening: the last FQN in the call history before the stack property was broken keeps the entire flat subgraph of its call. Test Plan: added test, updated another Rollback Plan: Reviewed By: angelayi Differential Revision: D79204669
a4a34cb to
7799be8
Compare
|
This pull request was exported from Phabricator. Differential Revision: D79204669 |
Summary: Pull Request resolved: pytorch#159418 Sometimes the call history recorded in a `nn_module_stack` does not have the stack property, where each FQN is a prefix of the next FQN. This can cause errors during `unflatten`. Instead of erroring we now drop entries from such a `nn_module_stack` to restore the stack property. This effectively leads to less unflattening: the last FQN in the call history before the stack property was broken keeps the entire flat subgraph of its call. Test Plan: added test, updated another Rollback Plan: Reviewed By: angelayi Differential Revision: D79204669
|
This pull request was exported from Phabricator. Differential Revision: D79204669 |
7799be8 to
eee811d
Compare
|
@pytorchbot merge (Initiating merge automatically since Phabricator Diff has merged) |
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 |
Summary: Sometimes the call history recorded in a `nn_module_stack` does not have the stack property, where each FQN is a prefix of the next FQN. This can cause errors during `unflatten`. Instead of erroring we now drop entries from such a `nn_module_stack` to restore the stack property. This effectively leads to less unflattening: the last FQN in the call history before the stack property was broken keeps the entire flat subgraph of its call. Test Plan: added test, updated another Rollback Plan: Differential Revision: D79204669 Pull Request resolved: #159418 Approved by: https://github.com/angelayi
Summary: Sometimes the call history recorded in a
nn_module_stackdoes not have the stack property, where each FQN is a prefix of the next FQN. This can cause errors duringunflatten. Instead of erroring we now drop entries from such ann_module_stackto restore the stack property. This effectively leads to less unflattening: the last FQN in the call history before the stack property was broken keeps the entire flat subgraph of its call.Test Plan:
added test, updated another
Rollback Plan:
Differential Revision: D79204669