Skip to content

Commit 814e856

Browse files
margaretqianMargaret Qian
andauthored
sort axes (#10985)
Co-authored-by: Margaret Qian <[email protected]>
1 parent ef163a5 commit 814e856

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

python/tvm/relay/frontend/onnx.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1505,7 +1505,8 @@ def _impl_v13(cls, inputs, attr, params):
15051505

15061506
rank_input = len(infer_type(inputs[0]).checked_type.shape)
15071507
num_new_axis = int(infer_type(inputs[1]).checked_type.shape[0])
1508-
axes = relay.split(inputs[1], num_new_axis).astuple()
1508+
axes = relay.sort(inputs[1])
1509+
axes = relay.split(axes, num_new_axis).astuple()
15091510
result = inputs[0]
15101511

15111512
# TODO (AndrewZhaoLuo): investigate performance issues with consecutive

tests/python/frontend/onnx/test_forward.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5125,10 +5125,6 @@ def verify_eyelike(indata):
51255125
"test_triu_square",
51265126
"test_triu_square_neg",
51275127
"test_triu_zero",
5128-
# These unsqueeze tests work, but take 2+ hrs to run
5129-
"test_unsqueeze_three_axes",
5130-
"test_unsqueeze_two_axes",
5131-
"test_unsqueeze_unsorted_axes",
51325128
"test_unique_sorted_with_axis",
51335129
"test_unique_sorted_with_axis_3d",
51345130
"test_unique_sorted_with_negative_axis",

0 commit comments

Comments
 (0)