-
Notifications
You must be signed in to change notification settings - Fork 25.2k
[dynamo] Guard serialization for FUNCTORCH_STACK_MATCH #152616
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
Make Functorch interpreters serializable most of the time, so that we can save the guards on functorch states. Differential Revision: [D74008787](https://our.internmc.facebook.com/intern/diff/D74008787/) [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/152616
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ⏳ No Failures, 9 PendingAs of commit 3b19083 with merge base 3849fd1 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This pull request was exported from Phabricator. Differential Revision: D74008787 |
Make Functorch interpreters serializable most of the time, so that we can save the guards on functorch states. Differential Revision: [D74008787](https://our.internmc.facebook.com/intern/diff/D74008787/) cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames [ghstack-poisoned]
This pull request was exported from Phabricator. Differential Revision: D74008787 |
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.
Add tests?
Make Functorch interpreters serializable most of the time, so that we can save the guards on functorch states. Differential Revision: [D74008787](https://our.internmc.facebook.com/intern/diff/D74008787/) cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames [ghstack-poisoned]
Pull Request resolved: #152616 Make Functorch interpreters serializable most of the time, so that we can save the guards on functorch states. ghstack-source-id: 281471598 Differential Revision: [D74008787](https://our.internmc.facebook.com/intern/diff/D74008787/)
This pull request was exported from Phabricator. Differential Revision: D74008787 |
Make Functorch interpreters serializable most of the time, so that we can save the guards on functorch states. Differential Revision: [D74008787](https://our.internmc.facebook.com/intern/diff/D74008787/) cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames [ghstack-poisoned]
This pull request was exported from Phabricator. Differential Revision: D74008787 |
Make Functorch interpreters serializable most of the time, so that we can save the guards on functorch states. Differential Revision: [D74008787](https://our.internmc.facebook.com/intern/diff/D74008787/) cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 jerryzh168 voznesenskym penguinwu EikanWang Guobing-Chen zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames [ghstack-poisoned]
Pull Request resolved: #152616 Make Functorch interpreters serializable most of the time, so that we can save the guards on functorch states. ghstack-source-id: 281574176 Differential Revision: [D74008787](https://our.internmc.facebook.com/intern/diff/D74008787/)
This pull request was exported from Phabricator. Differential Revision: D74008787 |
Added more tests. |
Make Functorch interpreters serializable most of the time, so that we can save the guards on functorch states. ## Test Cases: 0. torch.compile() without functorch layers present. Guard should fail with any layer being pushed. 1. torch.compile() nested in vmap. 2. torch.compile() nested in grad. 3. torch.compile() nested in jvp + vmap 4. torch.compile() nested functionalize 5. torch.compile() nested in vmap + grad Differential Revision: [D74008787](https://our.internmc.facebook.com/intern/diff/D74008787/) cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 jerryzh168 voznesenskym penguinwu EikanWang Guobing-Chen zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames [ghstack-poisoned]
Pull Request resolved: #152616 Make Functorch interpreters serializable most of the time, so that we can save the guards on functorch states. ghstack-source-id: 281656876 Differential Revision: [D74008787](https://our.internmc.facebook.com/intern/diff/D74008787/)
This pull request was exported from Phabricator. Differential Revision: D74008787 |
Starting merge as part of PR stack under #152723 |
Seems this guard is not very active. Adding a test to detect error handling at least. Differential Revision: [D74074837](https://our.internmc.facebook.com/intern/diff/D74074837/) Pull Request resolved: #152687 Approved by: https://github.com/jansel ghstack dependencies: #152615, #152616
Punt on WEAREF_ALIVE as weakref won't live across the process and users might need to drop them upfront. Differential Revision: [D74088735](https://our.internmc.facebook.com/intern/diff/D74088735/) Pull Request resolved: #152716 Approved by: https://github.com/jansel ghstack dependencies: #152615, #152616, #152687
MappingProxyType Differential Revision: [D74091363](https://our.internmc.facebook.com/intern/diff/D74091363/) Pull Request resolved: #152721 Approved by: https://github.com/jansel ghstack dependencies: #152615, #152616, #152687, #152716
DICT_KEYS_MATCH Differential Revision: [D74091886](https://our.internmc.facebook.com/intern/diff/D74091886/) Pull Request resolved: #152723 Approved by: https://github.com/jansel ghstack dependencies: #152615, #152616, #152687, #152716, #152721
Stack from ghstack (oldest at bottom):
Make Functorch interpreters serializable most of the time, so that we can save the guards on functorch states.
Test Cases:
Differential Revision: D74008787
cc @jgong5 @mingfeima @XiaobingSuper @sanchitintel @ashokei @jingxu10 @jerryzh168 @voznesenskym @penguinwu @EikanWang @Guobing-Chen @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @chauhang @amjames