[invoke_subgraph] Run joint passes on the hop graphs#139325
[invoke_subgraph] Run joint passes on the hop graphs#139325anijain2305 wants to merge 43 commits intogh/anijain2305/571/basefrom
Conversation
[ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/139325
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New FailureAs of commit 7dc0e1a with merge base 30375cb ( NEW FAILURE - The following job has failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
| def propagate_meta_info(new_hop_gm, new_call_function_node, old_call_function_node): | ||
| # Copy all the fields from the old call_function node. And then override | ||
| # the `val` meta field with the outputs of new_hop_gm. | ||
| new_call_function_node.meta = copy.copy(old_call_function_node.meta) |
There was a problem hiding this comment.
I wonder if we really need to copy.copy() all of the metadata here. Presumably we aren't mutating the FakeTensors that we stashed onto the graph?
There was a problem hiding this comment.
as a datapoint, when we propagate metadata natively in FX when retracing, we just use the exact same values in the meta dict directly: https://github.com/pytorch/pytorch/blob/main/torch/fx/node.py#L718
There was a problem hiding this comment.
+1, if we can avoid the copy that would be better
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames [ghstack-poisoned]
cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames [ghstack-poisoned]
cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames [ghstack-poisoned]
cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames [ghstack-poisoned]
cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames [ghstack-poisoned]
|
@pytorchbot merge -i |
Merge startedYour change will be merged while ignoring the following 1 checks: Lint / lintrunner-noclang / linux-job Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Pull Request resolved: pytorch#139325 Approved by: https://github.com/bdhirsh, https://github.com/zou3519 ghstack dependencies: pytorch#147559
ghstack-source-id: a393f32 Pull Request resolved: pytorch/pytorch#139325
Stack from ghstack (oldest at bottom):
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @chauhang @amjames