Skip to content

Commit efa0750

Browse files
committed
ut
1 parent 43b2c39 commit efa0750

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

_unittests/ut_export/test_dynamic_shapes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ def test_couple_input_ds_replace_by_string(self):
710710
{
711711
"X": {0: "batch"},
712712
"A": {0: "batch", 1: "Dim1"},
713-
"B": ({0: "batch", 1: "Dim1"}, {0: "batch", 1: "Dim1"}),
713+
"B": ({0: "batch", 1: "Dim2"}, {0: "batch", 1: "Dim3"}),
714714
},
715715
res,
716716
)

onnx_diagnostic/export/dynamic_shapes.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ def _replace_dim_tensor_by_string(cls, inputs, ds, unique: Set[str]):
148148
new_ds = ds.copy()
149149
for i, v in ds.items():
150150
if isinstance(v, str):
151-
assert v not in unique, f"Dimension {v!r} is already defined in {unique}"
152151
unique.add(v)
153152
new_ds[i] = v
154153
elif v in (torch.export.Dim.DYNAMIC, torch.export.Dim.AUTO):

onnx_diagnostic/torch_models/test_helper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1183,7 +1183,7 @@ def run_ort_fusion(
11831183
optimization_options=opts,
11841184
)
11851185
except Exception as e:
1186-
duration = {time.perf_counter() - begin}
1186+
duration = time.perf_counter() - begin
11871187
if verbose:
11881188
print(f"[run_ort_fusion] failed in {duration} for model_type={model_type!r}")
11891189
return {

0 commit comments

Comments
 (0)