CARVIEW |
Navigation Menu
-
Notifications
You must be signed in to change notification settings - Fork 24.7k
fix unflatten with HOPs #138978
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
fix unflatten with HOPs #138978
Conversation
đź”— Helpful Linksđź§Ş See artifacts and rendered test results at hud.pytorch.org/pr/138978
Note: Links to docs will display an error until the docs builds have been completed. âś… No FailuresAs of commit 10d0df1 with merge base 00504aa ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This pull request was exported from Phabricator. Differential Revision: D65013647 |
Summary: Pull Request resolved: pytorch#138978 Unflatten was broken for HOPs for a couple of reasons: (1) we didn't expect `get_attr` nodes in the exported program, but they can occur to hold graph arguments to HOPs; such attributes must be moved from the exported program to the corresponding unflattened submodule containing the HOP call. (2) we don't record metadata for graph arguments on serialization (there's nothing to hold it in our schema), and accordingly the `get_attr` nodes we create on deserialization don't have `nn_module_stack` metadata, which obviously wrecks unflatten. Test Plan: added a couple of tests Differential Revision: D65013647
This pull request was exported from Phabricator. Differential Revision: D65013647 |
2fbf25d
to
10d0df1
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: Unflatten was broken for HOPs for a couple of reasons: (1) we didn't expect `get_attr` nodes in the exported program, but they can occur to hold graph arguments to HOPs; such attributes must be moved from the exported program to the corresponding unflattened submodule containing the HOP call. (2) we don't record metadata for graph arguments on serialization (there's nothing to hold it in our schema), and accordingly the `get_attr` nodes we create on deserialization don't have `nn_module_stack` metadata, which obviously wrecks unflatten. Test Plan: added a couple of tests Differential Revision: D65013647 Pull Request resolved: pytorch#138978 Approved by: https://github.com/zhxchen17
Summary: Unflatten was broken for HOPs for a couple of reasons: (1) we didn't expect `get_attr` nodes in the exported program, but they can occur to hold graph arguments to HOPs; such attributes must be moved from the exported program to the corresponding unflattened submodule containing the HOP call. (2) we don't record metadata for graph arguments on serialization (there's nothing to hold it in our schema), and accordingly the `get_attr` nodes we create on deserialization don't have `nn_module_stack` metadata, which obviously wrecks unflatten. Test Plan: added a couple of tests Differential Revision: D65013647 Pull Request resolved: pytorch#138978 Approved by: https://github.com/zhxchen17
Summary:
Unflatten was broken for HOPs for a couple of reasons:
(1) we didn't expect
get_attr
nodes in the exported program, but they can occur to hold graph arguments to HOPs; such attributes must be moved from the exported program to the corresponding unflattened submodule containing the HOP call.(2) we don't record metadata for graph arguments on serialization (there's nothing to hold it in our schema), and accordingly the
get_attr
nodes we create on deserialization don't havenn_module_stack
metadata, which obviously wrecks unflatten.Test Plan: added a couple of tests
Differential Revision: D65013647
cc @H-Huang @awgu @kwen2501 @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k @c-p-i-o