onnxruntime/orttraining/orttraining/python
pengwa 2449ded20f
Use autograd_inlining for model export (#16665)
### Use autograd_inlining for model export

From some versions of PyTorch, there is an issue related to custom
autograd.Function inlining, even though we register custom export
function for the autograd.Function (e.g. when custom autograd function
is enabled).

As an options, PyTorch exporter adds a new flag during export, we can
disable the inline. https://github.com/pytorch/pytorch/pull/104067

Currently the PyTorch change is in nightly built, this PR dynamically
check the torch.onnx.export's signature and decide to use the
`autograd_inlining` when it exists.


### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->
2023-07-12 20:57:24 +08:00
..
deprecated Adopt linrtunner as the linting tool - take 2 (#15085) 2023-03-24 15:29:03 -07:00
training Use autograd_inlining for model export (#16665) 2023-07-12 20:57:24 +08:00
checkpointing_utils.py Bump ruff in CI (#15533) 2023-04-17 10:11:44 -07:00
ort_trainer.py Introduce float 8 types (#14731) 2023-05-30 13:25:58 -07:00
orttraining_pybind_common.h Re-work global objects dependancies in pybind layer. (#14941) 2023-03-10 13:55:31 -08:00
orttraining_pybind_state.cc Enable conditional optimization automatically (#15885) 2023-05-23 13:08:05 +08:00
orttraining_python_module.cc ExecutionProvider API refactor - move allocator from EP level to SessionState level and indexed by OrtDevice (#15833) 2023-06-19 17:44:45 -07:00
orttraining_python_module_eager.h Run clang-format in CI (#15524) 2023-04-18 09:26:58 -07:00
pt_patch.py Adopt linrtunner as the linting tool - take 2 (#15085) 2023-03-24 15:29:03 -07:00