File tree Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change 3
3
# Licensed under the MIT License.
4
4
# --------------------------------------------------------------------------
5
5
import torch
6
- from torch .onnx import ExportOptions
7
- from torch .onnx import _OrtBackend as OrtBackend
8
- from torch .onnx import _OrtBackendOptions as OrtBackendOptions
6
+ from torch .onnx import _OrtBackend , _OrtBackendOptions
9
7
10
8
11
- def make_aot_ort (dynamic : bool = False ):
9
+ def make_aot_ort ():
12
10
"""Implements an autograd backend for torch.compile based on onnxrt backend."""
13
- export_options = ExportOptions (dynamic_shapes = dynamic )
14
- options = OrtBackendOptions (export_options = export_options )
15
- ort_backend = OrtBackend (options = options )
11
+ options = _OrtBackendOptions ()
12
+ ort_backend = _OrtBackend (options = options )
16
13
return ort_backend
17
14
18
15
Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ def test_phi_dort_static(self):
89
89
input_tensors = input_tensors_many [0 ]
90
90
expected = model (* input_tensors )
91
91
92
- local_aot_ort = onnxscript .tools .training_helper .make_aot_ort (dynamic = False )
92
+ local_aot_ort = onnxscript .tools .training_helper .make_aot_ort ()
93
93
94
94
compiled_model = torch .compile (
95
95
copy .deepcopy (model ),
You can’t perform that action at this time.
0 commit comments