Skip to content

Commit

Permalink
Update supported Op documentation
Browse files Browse the repository at this point in the history
* Updated the following to show Opset 19 support based on the merged PRs
    * Cast: onnx#2322
    * Constant: onnx#2315
    * Equal: onnx#2401
    * Pad: onnx#2482
    * QuantizeLinear: onnx#2480
    * Resize: onnx#2490
    * Slice: There is no Opset 19 Slice so I'm unsure why 19 was marked unsupported.
    * Split There is no Opset 19 Split so I'm unsure why 19 was marked unsupported.

* Updated the following to show as unsupported for Opset 20 by onnx-mlir
    * ConstantOfShape adds support for bfloat16,
    * ReduceMin adds support for bool
    * ReduceMax adds support for bool
    * DFT promotes axis as input

* The following were also upated in Opset 20 but not marked as unsupported as they wil be covered in onnx-mlir before 0.4.2
    * IsInf: onnx#2721
    * IsNaN: onnx#2721

Signed-off-by: Charles Volzka <[email protected]>
  • Loading branch information
cjvolzka committed Feb 20, 2024
1 parent 0124472 commit 940a71c
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 24 deletions.
6 changes: 3 additions & 3 deletions docs/SupportedONNXOps-NNPA.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@

# Supported ONNX Operation for Target *NNPA*.

Onnx-mlir currently supports ONNX operations targeting up to opset 19. Limitations are listed when applicable. This documentation highlights the minimum and maximum opset versions that are fully supported by onnx-mlir and not the version changes.
Onnx-mlir currently supports ONNX operations targeting up to opset 20. Limitations are listed when applicable. This documentation highlights the minimum and maximum opset versions that are fully supported by onnx-mlir and not the version changes.

* Operations are defined by the [ONNX Standard](https://github.com/onnx/onnx/blob/main/docs/Operators.md).
* **Supported Opsets** indicates the lowest and highest opset a model may have for onnx-mlir to support compiling a model with the operator.
* A * indicates onnx-mlir is compatible with the latest version of that operator available as of opset 19.
* **Supported Opsets** indicates the lowest and highest opset a model may have for onnx-mlir to support compiling a model with the operator.
* A * indicates onnx-mlir is compatible with the latest version of that operator available as of opset 20.


NNPA has hardware limitations in dimension index size and tensor size, which are described in [NNPALimit.h](../src/Accelerators/NNPA/Support/NNPALimit.h). They are large enough for normal use cases, but if your model exceeds the limitations, CPU is used instead of NNPA.
Expand Down
26 changes: 13 additions & 13 deletions docs/SupportedONNXOps-cpu.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Onnx-mlir currently supports ONNX operations targeting up to opset 20. Limitations are listed when applicable. This documentation highlights the minimum and maximum opset versions that are fully supported by onnx-mlir and not the version changes.

* Operations are defined by the [ONNX Standard](https://github.com/onnx/onnx/blob/main/docs/Operators.md).
* **Supported Opsets** indicates the lowest and highest opset a model may have for onnx-mlir to support compiling a model with the operator.
* **Supported Opsets** indicates the lowest and highest opset a model may have for onnx-mlir to support compiling a model with the operator.
* A * indicates onnx-mlir is compatible with the latest version of that operator available as of opset 20.


Expand Down Expand Up @@ -36,7 +36,7 @@ Onnx-mlir currently supports ONNX operations targeting up to opset 20. Limitatio
| **BitwiseOr** |18 - * | | |
| **BitwiseXor** |18 - * | | |
| **BlackmanWindow** |none | | | |
| **Cast** |6 - 18 |Cast only between float and double types. Only ppc64le and MacOS platforms support float16. | |
| **Cast** |6 - * |Cast only between float and double types. Only ppc64le and MacOS platforms support float16. | |
| **CastLike** |19 - * |CastLike only between float and double types. Only ppc64le and MacOS platforms support float16. | |
| **CastMap** |none | | | |
| **CategoryMapper** |none | | | |
Expand All @@ -48,15 +48,15 @@ Onnx-mlir currently supports ONNX operations targeting up to opset 20. Limitatio
| **Compress** |9 - * | | |
| **Concat** |6 - * | | |
| **ConcatFromSequence** |none | | | |
| **Constant** |6 - 18 | | |
| **ConstantOfShape** |9 - * | | |
| **Constant** |6 - * | | |
| **ConstantOfShape** |9 - 19 | | |
| **Conv** |6 - * | | |
| **ConvInteger** |none | | | |
| **ConvTranspose** |6 - * |Unknown dimension in spatial dimensions (such as H and W) not supported. | |
| **Cos** |7 - * | | |
| **Cosh** |9 - * | | |
| **CumSum** |11 - * | | |
| **DFT** |none | | | |
| **DFT** |17 - 19 | | |
| **DeformConv** |none | | | |
| **DepthToSpace** |13 - * | | |
| **DequantizeLinear** |10 - * |Only support for per-tensor or layer dequantization. No support for per-axis dequantization. | |
Expand All @@ -67,7 +67,7 @@ Onnx-mlir currently supports ONNX operations targeting up to opset 20. Limitatio
| **DynamicQuantizeLinear** |11 - * | | |
| **Einsum** |12 - * |Limited to the types supported by ReduceSum and MatMul (which we decompose to in most cases) which exclude integers with width < 32. | |
| **Elu** |6 - * | | |
| **Equal** |7 - 18 | | |
| **Equal** |7 - * | | |
| **Erf** |9 - * | | |
| **Exp** |6 - * | | |
| **Expand** |8 - * | | |
Expand Down Expand Up @@ -142,11 +142,11 @@ Onnx-mlir currently supports ONNX operations targeting up to opset 20. Limitatio
| **OptionalHasElement** |none | | | |
| **Or** |7 - * | | |
| **PRelu** |6 - * | | |
| **Pad** |6 - 18 |axes input not supported. | |
| **Pad** |6 - * |axes input not supported. | |
| **Pow** |7 - * |No support for power with integer types. | |
| **QLinearConv** |none | | | |
| **QLinearMatMul** |none | | | |
| **QuantizeLinear** |10 - 18 |Do not support per-axis and i8 quantization. | |
| **QuantizeLinear** |10 - * |Do not support per-axis and i8 quantization. | |
| **RNN** |7 - * | | |
| **RandomNormal** |none | | | |
| **RandomNormalLike** |none | | | |
Expand All @@ -158,15 +158,15 @@ Onnx-mlir currently supports ONNX operations targeting up to opset 20. 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. | |
| **ReduceMax** |6 - 19 |do_not_keep_dim not supported. | |
| **ReduceMean** |6 - * |do_not_keep_dim not supported. | |
| **ReduceMin** |6 - * |do_not_keep_dim not supported. | |
| **ReduceMin** |6 - 19 |do_not_keep_dim 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. | |
| **Relu** |6 - * | | |
| **Reshape** |6 - * |allowzero not supported. | |
| **Resize** |10 - 18 |Missing support for linear, cubic, crop, pytorch_half_pixel, and floor. Attributes antialias, axes and keep_aspect_ratio_policy are not supported. | |
| **Resize** |10 - * |Missing support for linear, cubic, crop, pytorch_half_pixel, and floor. Attributes antialias, axes and keep_aspect_ratio_policy are not supported. | |
| **ReverseSequence** |10 - * | | |
| **RoiAlign** |none | | | |
| **Round** |11 - * | | |
Expand All @@ -193,13 +193,13 @@ Onnx-mlir currently supports ONNX operations targeting up to opset 20. Limitatio
| **Sin** |7 - * | | |
| **Sinh** |9 - * | | |
| **Size** |13 - * | | |
| **Slice** |13 - 18 |Axis must be a constant argument. |Add tests to slices, currently have none. |
| **Slice** |13 - * |Axis must be a constant argument. |Add tests to slices, currently have none. |
| **Softmax** |6 - * | | |
| **SoftmaxCrossEntropyLoss** |none | | | |
| **Softplus** |6 - * | | |
| **Softsign** |6 - * | | |
| **SpaceToDepth** |13 - * | |Example works, the other is imprecise. To investigate. |
| **Split** |6 - 18 |Does not support static and dynamic shape, zero size splits. |Temporally removed due to changes in onnx 1.8.1. |
| **Split** |6 - * |Does not support static and dynamic shape, zero size splits. |Temporally removed due to changes in onnx 1.8.1. |
| **SplitToSequence** |none | | | |
| **Sqrt** |6 - * | | |
| **Squeeze** |6 - * |Does not support static and dynamic shape. |Temporally removed due to changes in onnx 1.8.1. |
Expand Down
13 changes: 5 additions & 8 deletions test/backend/inference_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,6 @@ def get_test_models():
},
# ==OP== Cast
# ==MIN== 6
# ==UNSUPPORTED== 19
# ==LIM== Cast only between float and double types. Only ppc64le and MacOS platforms support float16.
"test_cast_FLOAT_to_DOUBLE_cpu": {
STATIC_SHAPE: {},
Expand Down Expand Up @@ -615,11 +614,11 @@ def get_test_models():
},
# ==OP== Constant
# ==MIN== 1
# ==UNSUPPORTED== 19
# By def, no dynamic shapes.
"test_constant_cpu": {STATIC_SHAPE: {}},
# ==OP== ConstantOfShape
# ==MIN== 9
# ==UNSUPPORTED== 20
# By def, no dynamic shapes.
"test_constantofshape_float_ones_cpu": {STATIC_SHAPE: {}},
"test_constantofshape_int_zeros_cpu": {STATIC_SHAPE: {}},
Expand Down Expand Up @@ -769,6 +768,8 @@ def get_test_models():
CONSTANT_INPUT: {-1},
},
# ==OP== DFT
# ==MIN== 17
# ==UNSUPPORTED== 20
# "test_dft_axis_cpu": {STATIC_SHAPE:{}, DYNAMIC_SHAPE:{-1:{-1}}, CONSTANT_INPUT:{-1}},
# "test_dft_cpu": {STATIC_SHAPE:{}, DYNAMIC_SHAPE:{-1:{-1}}, CONSTANT_INPUT:{-1}},
# "test_dft_inverse_cpu": {STATIC_SHAPE:{}, DYNAMIC_SHAPE:{-1:{-1}}, CONSTANT_INPUT:{-1}},
Expand Down Expand Up @@ -917,7 +918,6 @@ def get_test_models():
},
# ==OP== Equal
# ==MIN== 7
# ==UNSUPPORTED== 19
"test_equal_cpu": {
STATIC_SHAPE: {},
DYNAMIC_SHAPE: {-1: {-1}},
Expand Down Expand Up @@ -2244,7 +2244,6 @@ def get_test_models():
},
# ==OP== Pad
# ==MIN== 2
# ==UNSUPPORTED== 19
# ==LIM== axes input not supported
"test_constant_pad_cpu": {
STATIC_SHAPE: {},
Expand Down Expand Up @@ -2298,7 +2297,6 @@ def get_test_models():
},
# ==OP== QuantizeLinear
# ==MIN== 10
# ==UNSUPPORTED== 19
# ==LIM== Do not support per-axis and i8 quantization.
# "test_quantizelinear_axis_cpu": {STATIC_SHAPE:{}, DYNAMIC_SHAPE:{-1:{-1}}, CONSTANT_INPUT:{-1}},
"test_quantizelinear_cpu": {
Expand Down Expand Up @@ -2430,6 +2428,7 @@ def get_test_models():
},
# ==OP== ReduceMax
# ==MIN== 1
# ==UNSUPPORTED== 20
# ==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}},
Expand Down Expand Up @@ -2484,6 +2483,7 @@ def get_test_models():
},
# ==OP== ReduceMin
# ==MIN== 1
# ==UNSUPPORTED== 20
# ==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}},
Expand Down Expand Up @@ -2653,7 +2653,6 @@ def get_test_models():
},
# ==OP== Resize
# ==MIN== 10
# ==UNSUPPORTED== 19
# ==LIM== Missing support for linear, cubic, crop, pytorch_half_pixel, and floor. Attributes antialias, axes and keep_aspect_ratio_policy are not supported.
# Resize
# All test cases in onnx v1.11.0. yes for currently supported
Expand Down Expand Up @@ -2908,7 +2907,6 @@ def get_test_models():
},
# ==OP== Slice
# ==MIN== 13
# ==UNSUPPORTED== 19
# ==LIM== Axis must be a constant argument.
# ==TODO== Add tests to slices, currently have none.
# (makes Axis a runtime argument, which is not supported).
Expand Down Expand Up @@ -2992,7 +2990,6 @@ def get_test_models():
},
# ==OP== Split
# ==MIN== 2
# ==UNSUPPORTED== 19
# ==LIM== Does not support static and dynamic shape, zero size splits.
# ==TODO== Temporally removed due to changes in onnx 1.8.1
# "test_split_equal_parts_1d_cpu": {STATIC_SHAPE:{}, DYNAMIC_SHAPE:{-1:{-1}}, CONSTANT_INPUT:{-1}},
Expand Down

0 comments on commit 940a71c

Please sign in to comment.