Skip to content

Commit

Permalink
sort axes (apache#10985)
Browse files Browse the repository at this point in the history
Co-authored-by: Margaret Qian <mqian@octoml.ai>
  • Loading branch information
2 people authored and Lucien0 committed Apr 19, 2022
1 parent fd26465 commit 7eb109e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 2 additions & 1 deletion python/tvm/relay/frontend/onnx.py
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,8 @@ def _impl_v13(cls, inputs, attr, params):

rank_input = len(infer_type(inputs[0]).checked_type.shape)
num_new_axis = int(infer_type(inputs[1]).checked_type.shape[0])
axes = relay.split(inputs[1], num_new_axis).astuple()
axes = relay.sort(inputs[1])
axes = relay.split(axes, num_new_axis).astuple()
result = inputs[0]

# TODO (AndrewZhaoLuo): investigate performance issues with consecutive
Expand Down
4 changes: 0 additions & 4 deletions tests/python/frontend/onnx/test_forward.py
Original file line number Diff line number Diff line change
Expand Up @@ -5125,10 +5125,6 @@ def verify_eyelike(indata):
"test_triu_square",
"test_triu_square_neg",
"test_triu_zero",
# These unsqueeze tests work, but take 2+ hrs to run
"test_unsqueeze_three_axes",
"test_unsqueeze_two_axes",
"test_unsqueeze_unsorted_axes",
"test_unique_sorted_with_axis",
"test_unique_sorted_with_axis_3d",
"test_unique_sorted_with_negative_axis",
Expand Down

0 comments on commit 7eb109e

Please sign in to comment.