experimental_experiment.torch_models.training_helper

experimental_experiment.torch_models.training_helper.make_aot_ort(dynamic: bool = False, rewrite: bool = True, rewrite_more: bool = False, aten_conversion_changes: List[Tuple[Callable, str]] | None = None, verbose: int = 0, enable_pattern: str | List[str | type] | None = 'default', disable_pattern: str | List[str | type] | None = None, processor: str = 'CPU', ort_optimization_level: str | None = None, order_algorithm: str | None = None, dump_patterns: str | None = None, dump_prefix: str | None = None) tuple[source]

Creates a backend to train model with DORT.

Parameters:
  • dynamic – enable dynamic shapes

  • rewrite – rewrite the model after its conversion to onnx, it must be True, as it is no longer possible to disable that option

  • rewrite_more – runs more optimization

  • aten_conversion_changes – calls aten ops

  • verbose – verbosity

  • enable_pattern – optimization patterns to enable

  • disable_pattern – optimization patterns to disable

  • processor – optimization should be made for this processor or this list of processors (comma separated value)

  • ort_optimization_level – onnxruntime optimization level

  • order_algorithm – algorithm optimizing the order the onnx node, none by default

  • dump_patterns – dump the applied patterns

  • dump_prefix – prefix before saving the models

Returns:

twice the same backend