onnxruntime/orttraining/orttraining/python/training
Kyushick Lee c696392f0c
Support external output tensors for DORT (#14516)
### Description
<!-- Describe your changes. -->
Support externally-managed output tensors (torch Tensors) for dort. 
Add `preallocate_output` option to OrtBackend to rely on
externally-managed output tensors for dort.


### 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. -->
DORT currently allocates and returns output ortvalues and convert them
to torch Tensors. The conversion based on dlpack does not support torch
Tensors for custom Aten backends, and it is not yet possible to transfer
the ownership from ortvalue to external handle (torch Tensor).

To avoid this issue, the PR change provides an option
(`preallocate_output`) to allocate output tensors externally in pytorch,
which creates torch Tensor for an Aten backend, and let dort take
pointers from torch Tensors to construct output ortvalues instead of
allocating them inside InferenceSession.
2023-03-07 21:32:23 -08:00
..
amp
api Update typing hints to support python 3.8 for training apis (#14649) 2023-02-13 09:52:05 -08:00
experimental Make ORT callable from various Pytorch compilers (LazyTensor, TorchDynamo, etc) (#10460) 2022-08-22 09:40:40 -07:00
onnxblock Support building a QAT onnx model using onnxblock (#14551) 2023-02-16 14:38:01 -08:00
optim change deepspeed version in warning from 0.7.3 to 0.8.0 (#14527) 2023-02-01 12:00:43 -08:00
ortmodule Introduce padding inspector in ORTModule (#14652) 2023-03-03 18:36:08 +08:00
torchdynamo Support external output tensors for DORT (#14516) 2023-03-07 21:32:23 -08:00
utils/data
__init__.py
_checkpoint_storage.py
_utils.py replace 'master' branch ref to 'main' for onnx repo (#12678) 2022-08-30 13:41:42 -07:00
checkpoint.py
model_desc_validation.py
orttrainer.py Deprecate ORTTrainer (#13022) 2022-09-23 18:10:09 -07:00
orttrainer_options.py Update ORTModule Default Opset Version to 15 (#12419) 2022-08-05 16:55:04 +08:00
postprocess.py