Add standalone torch._inductor.compile() API#95594
Add standalone torch._inductor.compile() API#95594jansel wants to merge 3 commits intogh/jansel/61/basefrom
Conversation
This fixes support for inductor compiling non-dynamo generated FX graphs. [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/95594
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 3b936c6: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
bertmaher
left a comment
There was a problem hiding this comment.
Cool, thanks for doing this!
desertfire
left a comment
There was a problem hiding this comment.
This would also benefit AOT Inductor. Thanks!
|
@pytorchbot merge |
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 |
Merge failedReason: Command Details for Dev Infra teamRaised by workflow job |
This fixes support for inductor compiling non-dynamo generated FX graphs. cc soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
|
@pytorchbot merge |
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 |
|
The merge job was canceled. If you believe this is a mistake,then you can re trigger it through pytorch-bot. |
|
@pytorchbot merge |
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 |
|
The merge job was canceled. If you believe this is a mistake,then you can re trigger it through pytorch-bot. |
This fixes support for inductor compiling non-dynamo generated FX graphs. cc soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
|
@pytorchbot merge |
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 |
This fixes support for inductor compiling non-dynamo generated FX graphs. Pull Request resolved: pytorch/pytorch#95594 Approved by: https://github.com/bertmaher, https://github.com/desertfire
This fixes support for inductor compiling non-dynamo generated FX graphs. Pull Request resolved: pytorch/pytorch#95594 Approved by: https://github.com/bertmaher, https://github.com/desertfire
This fixes support for inductor compiling non-dynamo generated FX graphs. Pull Request resolved: pytorch/pytorch#95594 Approved by: https://github.com/bertmaher, https://github.com/desertfire
Op-benchmark directly uses fx.Graph to create nodes without dynamo and then compiles the graph with inductor. Currently, operators with multiple outputs, e.g. native_layer_norm, would fail to run caused by standalone torch._inductor.compile() API #95594. Actually, the graph's result is a node with several outputs instead of a tuple with several nodes. However, the standalone API forces a non-tuple result be a tuple, i.e., a tuple with one node-type element with several outputs. This PR considers a return node with several outputs as a tuple to avoid errors. Pull Request resolved: #96936 Approved by: https://github.com/jgong5, https://github.com/jansel
Op-benchmark directly uses fx.Graph to create nodes without dynamo and then compiles the graph with inductor. Currently, operators with multiple outputs, e.g. native_layer_norm, would fail to run caused by standalone torch._inductor.compile() API #95594. Actually, the graph's result is a node with several outputs instead of a tuple with several nodes. However, the standalone API forces a non-tuple result be a tuple, i.e., a tuple with one node-type element with several outputs. This PR considers a return node with several outputs as a tuple to avoid errors. Pull Request resolved: #96936 Approved by: https://github.com/jgong5, https://github.com/jansel
This reverts commit e13b804.
Stack from ghstack (oldest at bottom):
This fixes support for inductor compiling non-dynamo generated FX graphs.
cc @soumith @voznesenskym @yanboliang @penguinwu @anijain2305 @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @Xia-Weiwen @wenzhe-nrv @jiayisunx @peterbell10 @desertfire