Skip to content

Commit d5f488c

Browse files
committed
code coverage
1 parent 45183ba commit d5f488c

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
@@ -46,7 +46,6 @@ def forward(self, x):
4646

4747
@hide_stdout()
4848
@ignore_warnings((DeprecationWarning, FutureWarning, UserWarning))
49-
@unittest.skipIf(to_onnx is None, "to_onnx not installed")
5049
def test_ep_onnx_sync_a(self):
5150
import torch
5251

@@ -63,9 +62,10 @@ def forward(self, x):
6362
ep = torch.export.export(
6463
Model(), (x,), dynamic_shapes=({0: torch.export.Dim("batch")},)
6564
)
66-
onx = torch.onnx.export(
67-
Model(), (x,), dynamic_shapes=({0: torch.export.Dim("batch")},), dynamo=True
68-
).model_proto
65+
epo = torch.onnx.export(
66+
ep, (x,), dynamic_shapes=({0: torch.export.Dim("batch")},), dynamo=True
67+
)
68+
onx = epo.model_proto
6969
results = list(
7070
run_aligned(
7171
ep,

0 commit comments

Comments
 (0)