KEMBAR78
[aotinductor] Pass TorchIR to AOTInductor by angelayi · Pull Request #110020 · pytorch/pytorch · GitHub
Skip to content

Conversation

@angelayi
Copy link
Contributor

@angelayi angelayi commented Sep 25, 2023

Updates _export.aot_compile to pass a torch IR graph to inductor, allowing inductor to now run the pre_grad_passes, and reuse more of inductor's code.
Also updates the API to only return the so_path, and not returning the exported program. The pytree call spec is now serialized and placed inside of the generated model code. When calling the model, because there is no c++ pytree implementation linked yet, we can access the call specs through get_call_spec(), and call pytree flatten/unflattenin python.

cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @Xia-Weiwen @wenzhe-nrv @jiayisunx @peterbell10 @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @aakhundov @ColinPeppler @avikchaudhuri @gmagogsfm @zhxchen17 @tugsbayasgalan

@pytorch-bot
Copy link

pytorch-bot bot commented Sep 25, 2023

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/110020

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 21f1ee1 with merge base edafe2d (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot
Copy link
Contributor

@angelayi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@ydwu4 ydwu4 added ciflow/trunk Trigger trunk jobs on your pull request release notes: inductor labels Sep 26, 2023
@angelayi angelayi force-pushed the angelayi/aot_inductor_torch branch from 7c0b565 to a6e8e34 Compare September 26, 2023 22:43
@angelayi angelayi force-pushed the angelayi/aot_inductor_torch branch from a6e8e34 to 163d727 Compare September 27, 2023 16:51
@facebook-github-bot
Copy link
Contributor

@angelayi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@angelayi angelayi marked this pull request as ready for review September 27, 2023 16:55
@angelayi angelayi force-pushed the angelayi/aot_inductor_torch branch from 163d727 to 8585022 Compare October 9, 2023 19:38
@facebook-github-bot
Copy link
Contributor

@angelayi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

1 similar comment
@facebook-github-bot
Copy link
Contributor

@angelayi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@angelayi angelayi force-pushed the angelayi/aot_inductor_torch branch from d06133b to 458e737 Compare October 9, 2023 21:38
@facebook-github-bot
Copy link
Contributor

@angelayi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@angelayi angelayi force-pushed the angelayi/aot_inductor_torch branch from 458e737 to 6503151 Compare October 10, 2023 20:15
@facebook-github-bot
Copy link
Contributor

@angelayi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@angelayi angelayi requested a review from desertfire October 10, 2023 20:19
@angelayi angelayi changed the title [wip] Pass TorchIR to AOTInductor Pass TorchIR to AOTInductor Oct 10, 2023
@angelayi angelayi changed the title Pass TorchIR to AOTInductor [aotinductor] Pass TorchIR to AOTInductor Oct 10, 2023
@angelayi angelayi force-pushed the angelayi/aot_inductor_torch branch from 6503151 to cadf002 Compare October 10, 2023 20:59
@facebook-github-bot
Copy link
Contributor

@angelayi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot facebook-github-bot force-pushed the angelayi/aot_inductor_torch branch from cadf002 to 79853a3 Compare October 11, 2023 05:24
facebook-github-bot pushed a commit that referenced this pull request Oct 11, 2023
Summary:
Updates `_export.aot_compile` to pass a torch IR graph to inductor, allowing inductor to now run the pre_grad_passes, and reuse more of inductor's code.
Also updates the API to only return the `so_path`, and not returning the exported program. The pytree call spec is now serialized and placed inside of the generated model code. When calling the model, because there is no c++ pytree implementation linked yet, we can access the call specs through `get_call_spec()`, and call pytree flatten/unflattenin python.

cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler avikchaudhuri gmagogsfm zhxchen17 tugsbayasgalan


Differential Revision: D49599792

Pulled By: angelayi
@facebook-github-bot facebook-github-bot force-pushed the angelayi/aot_inductor_torch branch from 79853a3 to 7b42aab Compare October 23, 2023 21:24
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49599792

@facebook-github-bot facebook-github-bot force-pushed the angelayi/aot_inductor_torch branch from 7b42aab to 07b8754 Compare October 23, 2023 22:22
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49599792

facebook-github-bot pushed a commit that referenced this pull request Oct 24, 2023
Summary:
Updates `_export.aot_compile` to pass a torch IR graph to inductor, allowing inductor to now run the pre_grad_passes, and reuse more of inductor's code.
Also updates the API to only return the `so_path`, and not returning the exported program. The pytree call spec is now serialized and placed inside of the generated model code. When calling the model, because there is no c++ pytree implementation linked yet, we can access the call specs through `get_call_spec()`, and call pytree flatten/unflattenin python.

cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler avikchaudhuri gmagogsfm zhxchen17 tugsbayasgalan


Test Plan: Internal testing results: https://www.internalfb.com/diff/D49599792?dst_version_fbid=873731594363746&transaction_fbid=659025106213571

Reviewed By: frank-wei, desertfire

Differential Revision: D49599792

Pulled By: angelayi
@facebook-github-bot facebook-github-bot force-pushed the angelayi/aot_inductor_torch branch from 07b8754 to 0cba7c6 Compare October 24, 2023 16:20
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49599792

@facebook-github-bot facebook-github-bot force-pushed the angelayi/aot_inductor_torch branch from 0cba7c6 to 60d0379 Compare October 25, 2023 20:13
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49599792

Summary:
Updates `_export.aot_compile` to pass a torch IR graph to inductor, allowing inductor to now run the pre_grad_passes, and reuse more of inductor's code.
Also updates the API to only return the `so_path`, and not returning the exported program. The pytree call spec is now serialized and placed inside of the generated model code. When calling the model, because there is no c++ pytree implementation linked yet, we can access the call specs through `get_call_spec()`, and call pytree flatten/unflattenin python.

cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler avikchaudhuri gmagogsfm zhxchen17 tugsbayasgalan


Test Plan: Internal testing results: https://www.internalfb.com/diff/D49599792?dst_version_fbid=873731594363746&transaction_fbid=659025106213571

Reviewed By: frank-wei, desertfire

Differential Revision: D49599792

Pulled By: angelayi
@facebook-github-bot facebook-github-bot force-pushed the angelayi/aot_inductor_torch branch from 60d0379 to 21f1ee1 Compare October 26, 2023 04:09
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49599792

facebook-github-bot pushed a commit to pytorch/benchmark that referenced this pull request Oct 26, 2023
Summary:
Updates `_export.aot_compile` to pass a torch IR graph to inductor, allowing inductor to now run the pre_grad_passes, and reuse more of inductor's code.
Also updates the API to only return the `so_path`, and not returning the exported program. The pytree call spec is now serialized and placed inside of the generated model code. When calling the model, because there is no c++ pytree implementation linked yet, we can access the call specs through `get_call_spec()`, and call pytree flatten/unflattenin python.

cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler avikchaudhuri gmagogsfm zhxchen17 tugsbayasgalan

X-link: pytorch/pytorch#110020

Reviewed By: frank-wei, desertfire

Differential Revision: D49599792

Pulled By: angelayi

fbshipit-source-id: 3c20e4bb60eb8ca02d91772b2e40e9bb72f8f905
@facebook-github-bot
Copy link
Contributor

@pytorchbot merge

(Initiating merge automatically since Phabricator Diff has merged)

@pytorchmergebot
Copy link
Collaborator

Merge started

Your 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

Advanced Debugging
Check the merge workflow status
here

desertfire added a commit to desertfire/pytorch-jit-paritybench that referenced this pull request Oct 31, 2023
xuhancn pushed a commit to xuhancn/pytorch that referenced this pull request Nov 7, 2023
Updates `_export.aot_compile` to pass a torch IR graph to inductor, allowing inductor to now run the pre_grad_passes, and reuse more of inductor's code.
Also updates the API to only return the `so_path`, and not returning the exported program. The pytree call spec is now serialized and placed inside of the generated model code. When calling the model, because there is no c++ pytree implementation linked yet, we can access the call specs through `get_call_spec()`, and call pytree flatten/unflattenin python.

Pull Request resolved: pytorch#110020
Approved by: https://github.com/desertfire
Skylion007 pushed a commit to Skylion007/pytorch that referenced this pull request Nov 14, 2023
Updates `_export.aot_compile` to pass a torch IR graph to inductor, allowing inductor to now run the pre_grad_passes, and reuse more of inductor's code.
Also updates the API to only return the `so_path`, and not returning the exported program. The pytree call spec is now serialized and placed inside of the generated model code. When calling the model, because there is no c++ pytree implementation linked yet, we can access the call specs through `get_call_spec()`, and call pytree flatten/unflattenin python.

Pull Request resolved: pytorch#110020
Approved by: https://github.com/desertfire
@github-actions github-actions bot deleted the angelayi/aot_inductor_torch branch April 27, 2025 02:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants