Skip to content

Commit 04be63f

Browse files
committed
Merge branch 'fixes' of https://github.com/sdpython/onnx-diagnostic into newb
2 parents 1b9e27b + d5f488c commit 04be63f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

_unittests/ut_torch_onnx/test_sbs.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ def forward(self, x):
5252

5353
@hide_stdout()
5454
@ignore_warnings((DeprecationWarning, FutureWarning, UserWarning))
55-
@unittest.skipIf(to_onnx is None, "to_onnx not installed")
5655
def test_ep_onnx_sync_a(self):
5756
import torch
5857

@@ -69,9 +68,10 @@ def forward(self, x):
6968
ep = torch.export.export(
7069
Model(), (x,), dynamic_shapes=({0: torch.export.Dim("batch")},)
7170
)
72-
onx = torch.onnx.export(
73-
Model(), (x,), dynamic_shapes=({0: torch.export.Dim("batch")},), dynamo=True
74-
).model_proto
71+
epo = torch.onnx.export(
72+
ep, (x,), dynamic_shapes=({0: torch.export.Dim("batch")},), dynamo=True
73+
)
74+
onx = epo.model_proto
7575
results = list(
7676
run_aligned(
7777
ep,

0 commit comments

Comments
 (0)