Pass TorchIR to AOTInductor
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: https://github.com/pytorch/pytorch/pull/110020
Reviewed By: frank-wei, desertfire
Differential Revision: D49599792
Pulled By: angelayi
fbshipit-source-id: 3c20e4bb60eb8ca02d91772b2e40e9bb72f8f905