Skip to content

Commit

Permalink
Re-enable ReduceMax/Min backend tests (#2977)
Browse files Browse the repository at this point in the history
* Re-enable ReduceMax/Min backend tests

* Fix format

* Small fixes

---------

Co-authored-by: Megan Hampton <[email protected]>
  • Loading branch information
hamptonm1 and MegoHam21 authored Oct 15, 2024
1 parent 72ca7e7 commit 128cf09
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 10 deletions.
6 changes: 3 additions & 3 deletions docs/SupportedONNXOps-cpu.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,9 @@ Onnx-mlir currently supports ONNX operations targeting up to opset 21. Limitatio
| **ReduceL2** |13 - * |do_not_keep_dim not supported. | |
| **ReduceLogSum** |13 - * |do_not_keep_dim not supported. | |
| **ReduceLogSumExp** |13 - * |do_not_keep_dim not supported. | |
| **ReduceMax** |6 - * |do_not_keep_dim not supported. | |
| **ReduceMean** |6 - * |do_not_keep_dim not supported. | |
| **ReduceMin** |6 - * |do_not_keep_dim not supported. | |
| **ReduceMax** |6 - * |do_not_keep_dims not supported. | |
| **ReduceMean** |6 - * |do_not_keep_dims not supported. | |
| **ReduceMin** |6 - * |do_not_keep_dims not supported. | |
| **ReduceProd** |13 - * |do_not_keep_dim not supported. | |
| **ReduceSum** |6 - * |Default axis and do_not_keep_dim not supported. |Default axis and do_not_keep_dim temporarily removed due to changes in onnx 1.8.1. |
| **ReduceSumSquare** |13 - * |Default axis and do_not_keep_dim not supported. | |
Expand Down
30 changes: 23 additions & 7 deletions test/backend/inference_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -2451,9 +2451,17 @@ def get_test_models():
},
# ==OP== ReduceMax
# ==MIN== 1
# ==LIM== do_not_keep_dim not supported.
# "test_reduce_max_default_axes_keepdim_example_cpu": {STATIC_SHAPE:{}, DYNAMIC_SHAPE:{-1:{-1}}, CONSTANT_INPUT:{-1}},
# "test_reduce_max_default_axes_keepdims_random_cpu": {STATIC_SHAPE:{}, DYNAMIC_SHAPE:{-1:{-1}}, CONSTANT_INPUT:{-1}},
# ==LIM== do_not_keep_dims not supported.
"test_reduce_max_default_axes_keepdim_example_cpu": {
STATIC_SHAPE: {},
DYNAMIC_SHAPE: {-1: {-1}},
CONSTANT_INPUT: {-1},
},
"test_reduce_max_default_axes_keepdims_random_cpu": {
STATIC_SHAPE: {},
DYNAMIC_SHAPE: {-1: {-1}},
CONSTANT_INPUT: {-1},
},
# "test_reduce_max_do_not_keepdims_example_cpu": {STATIC_SHAPE:{}, DYNAMIC_SHAPE:{-1:{-1}}, CONSTANT_INPUT:{-1}},
# "test_reduce_max_do_not_keepdims_random_cpu": {STATIC_SHAPE:{}, DYNAMIC_SHAPE:{-1:{-1}}, CONSTANT_INPUT:{-1}},
"test_reduce_max_keepdims_example_cpu": {
Expand All @@ -2478,7 +2486,7 @@ def get_test_models():
},
# ==OP== ReduceMean
# ==MIN== 1
# ==LIM== do_not_keep_dim not supported.
# ==LIM== do_not_keep_dims not supported.
# "test_reduce_mean_default_axes_keepdims_example_cpu": {STATIC_SHAPE:{}, DYNAMIC_SHAPE:{-1:{-1}}, CONSTANT_INPUT:{-1}},
# "test_reduce_mean_default_axes_keepdims_random_cpu": {STATIC_SHAPE:{}, DYNAMIC_SHAPE:{-1:{-1}}, CONSTANT_INPUT:{-1}},
# "test_reduce_mean_do_not_keepdims_example_cpu": {STATIC_SHAPE:{}, DYNAMIC_SHAPE:{-1:{-1}}, CONSTANT_INPUT:{-1}},
Expand All @@ -2505,9 +2513,17 @@ def get_test_models():
},
# ==OP== ReduceMin
# ==MIN== 1
# ==LIM== do_not_keep_dim not supported.
# "test_reduce_min_default_axes_keepdims_example_cpu": {STATIC_SHAPE:{}, DYNAMIC_SHAPE:{-1:{-1}}, CONSTANT_INPUT:{-1}},
# "test_reduce_min_default_axes_keepdims_random_cpu": {STATIC_SHAPE:{}, DYNAMIC_SHAPE:{-1:{-1}}, CONSTANT_INPUT:{-1}},
# ==LIM== do_not_keep_dims not supported.
"test_reduce_min_default_axes_keepdims_example_cpu": {
STATIC_SHAPE: {},
DYNAMIC_SHAPE: {-1: {-1}},
CONSTANT_INPUT: {-1},
},
"test_reduce_min_default_axes_keepdims_random_cpu": {
STATIC_SHAPE: {},
DYNAMIC_SHAPE: {-1: {-1}},
CONSTANT_INPUT: {-1},
},
# "test_reduce_min_do_not_keepdims_example_cpu": {STATIC_SHAPE:{}, DYNAMIC_SHAPE:{-1:{-1}}, CONSTANT_INPUT:{-1}},
# "test_reduce_min_do_not_keepdims_random_cpu": {STATIC_SHAPE:{}, DYNAMIC_SHAPE:{-1:{-1}}, CONSTANT_INPUT:{-1}},
"test_reduce_min_keepdims_example_cpu": {
Expand Down

0 comments on commit 128cf09

Please sign in to comment.