Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document supported ops #1475

Merged
merged 23 commits into from
Jun 13, 2022
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
2371974
first proto
AlexandreEichenberger May 31, 2022
4c9b21d
Merge branch 'main' into document-supported-ops
AlexandreEichenberger May 31, 2022
181cca2
first draft
AlexandreEichenberger May 31, 2022
445711a
Merge branch 'main' into document-supported-ops
AlexandreEichenberger Jun 2, 2022
b29f5f2
update
AlexandreEichenberger Jun 3, 2022
2a1a7f8
update
AlexandreEichenberger Jun 3, 2022
dbea8e8
Merge branch 'main' into document-supported-ops
AlexandreEichenberger Jun 3, 2022
9fd86db
update
AlexandreEichenberger Jun 3, 2022
1154e73
supported ops
AlexandreEichenberger Jun 7, 2022
8170ee1
supported ops
AlexandreEichenberger Jun 7, 2022
cbc3dd1
Merge branch 'main' into document-supported-ops
AlexandreEichenberger Jun 7, 2022
9f5c45d
update
AlexandreEichenberger Jun 7, 2022
540ad09
update
AlexandreEichenberger Jun 7, 2022
2074853
remove test that failed JNI test
AlexandreEichenberger Jun 7, 2022
b15b5fa
update
AlexandreEichenberger Jun 8, 2022
f2f178d
Merge branch 'main' into document-supported-ops
AlexandreEichenberger Jun 8, 2022
ad02510
update using info from gen_onnx_mlir
AlexandreEichenberger Jun 8, 2022
e94a12a
new scheme
AlexandreEichenberger Jun 8, 2022
e19a0d2
Merge branch 'main' into document-supported-ops
AlexandreEichenberger Jun 8, 2022
ec34448
Merge branch 'main' into document-supported-ops
AlexandreEichenberger Jun 9, 2022
dbe2ef4
cleanup
AlexandreEichenberger Jun 9, 2022
ba2cf10
responce to comments in PR
AlexandreEichenberger Jun 10, 2022
76f4229
change to use opset number that is actually supported
AlexandreEichenberger Jun 10, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions MLIR.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,22 @@ function(add_onnx_mlir_dialect_doc dialect dialect_tablegen_file)
endfunction()
add_custom_target(onnx-mlir-docs)

# Create the list of supported ops. Pass the input file to scan, and the target architecture.
# Target will create a docs/SupportedONNXOps-<arch>.md file listed
# Useful options are "--todo", "--unsupported". Check python documentOps.py -h for more info.
function(add_onnx_mlir_supported_ops input_file arch)
set(GEN_DOC_FILE ${ONNX_MLIR_SRC_ROOT}/docs/SupportedONNXOps-${arch}.md)
set(supported_ops_cmd ${Python3_EXECUTABLE} ${ONNX_MLIR_SRC_ROOT}/utils/documentOps.py --arch ${arch} -i ${input_file} -p ${ONNX_MLIR_SRC_ROOT}/utils)
add_custom_command(
OUTPUT ${GEN_DOC_FILE}
COMMAND ${supported_ops_cmd} --todo --unsupported > ${GEN_DOC_FILE}
DEPENDS ${input_file})
add_custom_target(onnx_mlir_supported_ops_${arch} DEPENDS ${GEN_DOC_FILE})
add_dependencies(onnx_mlir_supported_ops onnx_mlir_supported_ops_${arch})
endfunction()
add_custom_target(onnx_mlir_supported_ops)
set_target_properties(onnx_mlir_supported_ops PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD ON)

# If an extra parameter, the dialect name, is provided,
# this function will generate dialect and type from the td file
function(add_onnx_mlir_dialect dialect dialect_name)
Expand Down
3 changes: 3 additions & 0 deletions docs/DocumentList.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
# Index of documents
This document serves as an index for onnx-mlir documents.

# Supported ONNX Ops
* CPU support is covered [here](SupportedONNXOps-cpu.md).

# Working environment
* Installation is covered by [README.md](../README.md).
* [Workflow.md](Workflow.md) describes how to contribute in github environment.
Expand Down
164 changes: 164 additions & 0 deletions docs/SupportedONNXOps-cpu.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
<!--- Automatically generated, do not edit. -->
<!--- python documentOps.py --arch cpu --input /workdir/onnx-mlir/test/backend/inference_backend.py --path /workdir/onnx-mlir/utils --todo --unsupported -->

# Supported ONNX Operation for Target *cpu*.

Onnx-mlir currently support ONNX operations targeting up to opset 16. Limitations are listed when applicable.

| Op |Opset |Limitations |Todo |
| --- |--- |--- |--- |
| **Abs** |13 | | |
| **Acos** |7 | | |
| **Acosh** |9 | | |
| **Adagrad** |1 | | |
| **Adam** |1 | | |
| **Add** |14 |No support for short integers. | |
| **And** |7 | | |
| **ArgMax** |13 | | |
| **ArgMin** |13 | | |
| **Asin** |7 | | |
| **Asinh** |9 | | |
| **Atan** |7 | | |
| **Atanh** |9 | | |
| **AveragePool** |11 | | |
| **BatchNormalization** |15 |Training not supported. | |
| **Bernoulli** |15 | | |
| **Bitshift** |unsupported | | |
| **Cast** |13 |Cast only between float and double types. | |
| **CastLike** |15 | | |
| **Ceil** |13 | | |
| **Celu** |12 | | |
| **Clip** |13, 12, 11, 6 |No support for short integers. | |
| **Compress** |11 | | |
| **Concat** |13 | | |
| **Constant** |13 | | |
| **ConstantOfShape** |9 | | |
| **Conv** |11 | | |
| **ConvInteger** |10 | | |
| **ConvTranspose** |11 | | |
| **Cos** |7 | | |
| **Cosh** |9 | | |
| **CumSum** |14 | | |
| **DepthToSpace** |13 | | |
| **DequatizeLinear** |unsupported | | |
| **Det** |11 | | |
| **Div** |14 |No support for short integers. | |
| **Dropout** |13 |Does not support masked and training. | |
| **DynamicQuantizeLinear** |11 | | |
| **EinSum** |unsupported | | |
| **Elu** |6 | | |
| **Equal** |13 | | |
| **Erf** |13 | | |
| **Exp** |13 | | |
| **Expand** |13 | | |
| **Eyelike** |unsupported | | |
| **Flatten** |13 | | |
| **Floor** |13 | | |
| **GRU** |14 |Batchwise test is not supported. | |
| **Gather** |13 | | |
| **GatherElements** |13 | | |
| **GatherND** |13 | | |
| **Gemm** |13 | | |
| **GlobalAveragePool** |1 | | |
| **GlobalMaxPool** |1 | | |
| **Greater** |13 | | |
| **GreaterOrEqual** |16 | | |
| **GridSample** |16 | | |
| **HardSigmoid** |6 | | |
| **HardSwish** |14 | | |
| **Hardmax** |13 | | |
| **Identity** |16 |Sequence identity not supported. | |
| **If** |16 | | |
| **InstanceNormalization** |6 | | |
| **IsInf** |10 | | |
| **IsNan** |unsupported | | |
| **LRN** |13 | | |
| **LSTM** |14 |No support for batchwise examples. | |
| **LeakyRelu** |16 | | |
| **Less** |13 | | |
| **LessOrEqual** |16 | | |
| **Log** |13 | | |
| **LogSoftmax** |13 |Axis 0, 1, and default currently disabled due to changes in ONNX 1.8.1/Opset 13. |Temporally removed due to changes in onnx 1.8.1. |
| **Loop** |16 |No support for opset 13 and 16 at this time. | |
| **MatMul** |13 | | |
| **MatMulInteger** |10 | | |
| **Max** |13 |No support for short floats and unsigned int. | |
| **MaxPool** |12 |Does not support argmax and short ints. Support single output only. | |
| **MaxUnpool** |11 | | |
| **Mean** |13 | | |
| **MeanVarianceNormalization** |13 | | |
| **Min** |13 |Does not support short floats and unsigned numbers. | |
| **Mod** |13 |Support float and double only. | |
| **Momentum** |1 | | |
| **Mul** |14 |Does not support short integers. | |
| **Neg** |13 | | |
| **NegativeLogLikelihoodLoss** |13 | | |
| **NonMaxSuppression** |11 | | |
| **NonZero** |13 | | |
| **Not** |1 | | |
| **OneHot** |11 | | |
| **OptionalGetElement** |15 | | |
| **OptionalHasElement** |15 | | |
| **Or** |7 | | |
| **PRelu** |16 | | |
| **Pad** |13, 11, 2 | | |
| **Pow** |15 |No support for power with integer types. | |
| **QLinearConv** |10 | | |
| **QLinearMatmul** |unsupported | | |
| **QuantizeLinear** |13 | | |
| **RNN** |14 |Batchwise not supported. | |
| **Range** |11 | | |
| **Reciprocal** |13 | | |
| **ReduceL1** |13 | | |
| **ReduceL2** |13 | | |
| **ReduceLogSum** |13 | | |
| **ReduceLogSumExp** |13 | | |
| **ReduceMax** |13 | | |
| **ReduceMean** |13 | | |
| **ReduceMin** |13 | | |
| **ReduceProd** |13 | | |
| **ReduceSum** |13, 11 |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 | | |
| **Relu** |14 | | |
| **Reshape** |14 | | |
| **Resize** |13, 11, 10 |Missing support for linear, cubic, crop, pytorch_half_pixel, and floor. | |
| **ReverseSequence** |10 | | |
| **RoiAlign** |16 | | |
| **Round** |11 | | |
| **Scan** |16 |Does not support dynamic shapes. |Precision issue with newer opset, maybe just unsupported. Dynamic shape?. |
| **ScatterElements** |16 |Does not support duplicate indices. | |
| **ScatterND** |16 |Does not support scatternd add/multiply. | |
| **Selu** |6 | | |
| **SequenceInsert** |11 | | |
| **Shape** |15 | | |
| **Shrink** |9 | | |
| **Sigmoid** |13 | | |
| **Sign** |13 | | |
| **Sin** |7 | | |
| **Sinh** |9 | | |
| **Size** |13 | | |
| **Slice** |13 |Axis must be a constant argument. |Add tests to slices, currently have none. |
| **Softmax** |13 | | |
| **SoftmaxCrossEntropyLoss** |13 | | |
| **Softplus** |1 | | |
| **Softsign** |1 | | |
| **SpaceToDepth** |13 | |Example works, the other is imprecise. To investigate. |
| **Split** |13, 11 |Does not support static and dynamic shape, zero size splits. |Temporally removed due to changes in onnx 1.8.1. |
| **Sqrt** |13 | | |
| **Squeeze** |13, 11 |Does not support static and dynamic shape. |Temporally removed due to changes in onnx 1.8.1. |
| **StrNormalizer** |unsupported | | |
| **Sub** |14 |Does not support short integers. | |
| **Sum** |13 | | |
| **Tan** |7 | | |
| **Tanh** |13 | | |
| **TfdfVectorizer** |unsupported | | |
| **ThresholdRelu** |unsupported | | |
| **Tile** |13 | | |
| **TopK** |11 | | |
| **Transpose** |13 | | |
| **Trilu** |14 | | |
| **Unique** |11 | | |
| **Unsqueeze** |13, 11 |Does not support static and dynamic shape. |Temporally removed due to changes in onnx 1.8.1. |
| **Upsample** |10, 9, 7 | | |
| **Where** |16 | | |
| **Xor** |7 | | |
Loading