pytorch/test/cpp
angelayi 5b13c779d4 [AOTInductor] Remove call to aot_autograd when receiving ExportedProgram (#105977)
https://github.com/pytorch/pytorch/issues/105555

Existing flow first exports and then calls torch._inductor.aot_compile. However, export calls aot_autograd with the core aten decomposition table, and then torch._inductor.aot_compile calls aot_autograd again with the inductor decomposition table. The 2nd calling of aot_autograd is supposedly causing some problems, and seems excessive, so instead we will create a new function, torch._export.aot_compiler which will export using the inductor decomposition table, pass it to inductor's compile_fx_aot, and because it has already been exported, avoid recalling aot_autograd.

```
def aot_compile(
    f: Callable,
    args: Tuple[Any],
    kwargs: Optional[Dict[str, Any]] = None,
    constraints: Optional[List[Constraint]] = None,
) -> Tuple[str, ExportedProgram]:
```

Pull Request resolved: https://github.com/pytorch/pytorch/pull/105977
Approved by: https://github.com/desertfire, https://github.com/zhxchen17, https://github.com/eellison
2023-08-04 15:35:23 +00:00
..
aot_inductor [AOTInductor] Remove call to aot_autograd when receiving ExportedProgram (#105977) 2023-08-04 15:35:23 +00:00
api Fix Tensor::register_hook behavior on undefined tensors (#105587) 2023-07-21 14:37:21 +00:00
c10d [C10D] Remove watchKey functionality from the Store. (#105014) 2023-07-21 21:18:55 +00:00
common
dist_autograd
jit
lazy
lite_interpreter_runtime
monitor
profiler
rpc
tensorexpr
__init__.py