onnxruntime/orttraining/orttraining/python/training/ortmodule
Ashwini Khade cc7799835e
Enable a single build with optimized inference and on device training (#14241)
### Description
Right now prepacking code is not compiled when training is enabled. Our
partners want a single build of ort which can do both optimized
inference + training on device. This PR enables prepacking code in a
training build and controls whether it is enabled or not using already
existing session option - kOrtSessionOptionsConfigDisablePrepacking

For Inference scenarios - prepacking will be turned on by default and
this behavior remains the same after this PR too.
For training scenarios - prepacking will be disabled by default and if
user explicitly enables it then an error will be thrown.



### Motivation and Context
Enable both optimized inference as well as on device training in a
single build. For on device training use flag --enable_training_apis.
2023-01-12 21:36:43 -08:00
..
experimental Fix a PoliCheck finding in _hierarchical_ortmodule.py(#13462) 2022-10-26 15:45:18 -07:00
torch_cpp_extensions Add support for ORTModule Torch cpp CUDA extension build within docker (#12868) 2022-09-08 15:30:44 -04:00
__init__.py Update ORTModule Default Opset Version to 15 (#12419) 2022-08-05 16:55:04 +08:00
_custom_autograd_function.py [ORTModule] Add Env Variable to Control Disabling Custom AutoGrad Function Support (#13430) 2022-10-25 16:58:04 +08:00
_custom_autograd_function_exporter.py Make HF converge with lighting native amp (#13616) 2022-11-22 15:08:30 +08:00
_custom_autograd_function_runner.py Fix the tensor save for backward release problem (#13679) 2022-11-22 17:32:19 +08:00
_custom_gradient_registry.py [ORTModule] ATen upsample_nearest Gradient Bugfix (#14069) 2022-12-27 10:18:30 +08:00
_custom_op_symbolic_registry.py Make HF converge with lighting native amp (#13616) 2022-11-22 15:08:30 +08:00
_execution_agent.py fix memory profile for partial graph run (#11911) 2022-06-24 13:08:14 +08:00
_fallback.py Format all python files under onnxruntime with black and isort (#11324) 2022-04-26 09:35:16 -07:00
_fallback_exceptions.py Format all python files under onnxruntime with black and isort (#11324) 2022-04-26 09:35:16 -07:00
_gradient_accumulation_manager.py Move OrtValueVector from onnxruntime-training to onnxruntime (#11176) 2022-06-15 09:36:28 +02:00
_graph_execution_interface.py Add PyTorch fallback for ORTModule forward exceptions (#8346) 2021-08-17 10:41:15 -07:00
_graph_execution_manager.py Enable a single build with optimized inference and on device training (#14241) 2023-01-12 21:36:43 -08:00
_graph_execution_manager_factory.py Add PyTorch fallback for ORTModule forward exceptions (#8346) 2021-08-17 10:41:15 -07:00
_inference_manager.py [ORTModule] Fix Graph Builder for Eval Mode (#13255) 2022-10-12 14:39:54 +08:00
_io.py ORTModule support for kwargs input that is a dict (#13910) 2022-12-14 16:23:48 -08:00
_logger.py Format all python files under onnxruntime with black and isort (#11324) 2022-04-26 09:35:16 -07:00
_onnx_models.py [ORTModule] Fix Graph Builder for Eval Mode (#13255) 2022-10-12 14:39:54 +08:00
_torch_module_factory.py Add PyTorch fallback for ORTModule forward exceptions (#8346) 2021-08-17 10:41:15 -07:00
_torch_module_interface.py Format all python files under onnxruntime with black and isort (#11324) 2022-04-26 09:35:16 -07:00
_torch_module_ort.py Format all python files under onnxruntime with black and isort (#11324) 2022-04-26 09:35:16 -07:00
_torch_module_pytorch.py Format all python files under onnxruntime with black and isort (#11324) 2022-04-26 09:35:16 -07:00
_training_manager.py [ORTModule] Fix Graph Builder for Eval Mode (#13255) 2022-10-12 14:39:54 +08:00
_utils.py Replace distutils by setuptools to import build_ext (#14108) 2023-01-09 11:48:01 +01:00
debug_options.py Format all python files under onnxruntime with black and isort (#11324) 2022-04-26 09:35:16 -07:00
ortmodule.py Using ORTModule to wrap a evaluation model should not change the mode (#12747) 2022-09-08 10:54:59 +08:00