Supported ONNX Ops¶
Operator Support
ONNX converters currently support the following operators and parameters:
Operator |
Opset Version Supported |
Notes |
|---|---|---|
Abs |
1,6,13 |
|
Add |
1,6,7,13,14 |
|
And |
1,7 |
|
AveragePool |
1,7,10,11,19,22 |
|
ArgMax |
1,11,12,13 |
Only default value(0) is supported for select_last_index |
ArgMin |
1,11,12,13 |
Only default value(0) is supported for select_last_index |
Asin |
7 |
|
Atan |
7 |
|
BatchNormalization |
1,6,7,9,14,15 |
Momentum is not supported. Only default value (0) for training_mode is supported. All inputs after the first must be static. Only the first output is generated. |
Ceil |
1,6,13 |
|
Clip |
1,6,11,12 |
|
Concat |
1,4,11,13 |
|
Constant |
1,9,11,12,13 |
sparse tensor is not currently supported. |
ConstantOfShape |
9 |
|
Conv |
1,11,22 |
“kernel_shape” which differs from that of weights is not supported. |
ConvTranspose |
1,11,22 |
|
Cos |
7,22 |
|
CumSum |
11,14 |
value of axis attribute should be in the range of (-input_rank,
|
Cast |
1,6,9,13 |
|
DepthToSpace |
1,11,13 |
|
DequantizeLinear |
10,13,19,21 |
|
Div |
1,6,7,13,14 |
|
Dropout |
1,6,7,10 |
Only test mode (i.e. noop) is supported. Mask output is not generated. |
Einsum |
12 |
|
Elu |
1,6,22 |
|
Equal |
1,7,11,13 |
|
Erf |
9,13 |
Only certain cases which can be matched to GeLU will be supported |
Exp |
1,6,13 |
|
Expand |
8,13 |
Static shape tensor only supported |
Flatten |
1,9,11,13 |
|
Floor |
1,6 |
|
Gather |
1,11,13 |
|
GatherElements |
11,13 |
|
GatherND |
11,12,13 |
|
Gelu |
20 |
Value of approximate attribute should be none or tanh |
Gemm |
1,6,7,9,11,13 |
Gemm is only supported in the case where it is used to emulate FC; transA=0, transB=1, broadcast=1. |
GlobalAveragePool |
1,22 |
Only Supports 3D,4D & 5D inputs |
GlobalMaxPool |
1,22 |
Only Supports 3D,4D & 5D inputs |
Greater |
1,7,9,13 |
|
GreaterOrEqual |
12 |
|
GridSample |
16,20,22 |
Only Supports 4D & 5D inputs |
GroupNormalization |
18,21 |
|
GRU |
1,7,14,22 |
Custom activations, user-defined activations and clip are not supported. |
HardSigmoid |
1,6 |
|
HardSwish |
14,22 |
|
Identity |
1,13,14,16 |
|
InstanceNormalization |
1,6,22 |
|
If |
1,11,13,16,19,21,23 |
THEN and ELSE branches can produce more than one output but the number of outputs produced by the THEN branch must be equal to the number of outputs produced by the ELSE branch. The output shape and data type of the corresponding outputs of the THEN and ELSE branches must be equal (i.e., shape and data type of 1st output of THEN branch must be equal to those of the ELSE branch, and so on. |
IsNaN |
9, 13, 20 |
|
IsInf |
10, 20 |
|
LayerNormalization |
17 |
|
LRN |
1,13 |
|
LeakyRelu |
1,6 |
|
Less |
1,7,9,13 |
|
LessOrEqual |
12 |
|
Log |
1,6,13 |
|
LogSoftmax |
1,11 |
|
LpNormalization |
1,22 |
Only support attribute p=2 |
LpPool |
1,2,11,18,22 |
|
LSTM |
1,7,14,22 |
Custom activations, user-defined activations, clip and input-forget parameters are not supported. Only default value(0) is supported for layout |
Matmul |
1,9,13 |
|
Max |
1,6,8,12,13 |
|
MaxPool |
1,8,10,11,12,22 |
Only support Dilations = 1. Only support single output, doesn’t support Indices output. |
MaxRoiPool |
1,22 |
|
Min |
1,6,8,12,13 |
|
Mod |
10,13 |
|
Mul |
1,6,7,13,14 |
|
Neg |
1,6,13 |
|
NonMaxSuppression |
10,11 |
|
NonZero |
9,13 |
|
Not |
1 |
|
OneHot |
9,11 |
|
Or |
1,7 |
|
Pad |
1,2,11,13,18,19,21 |
Constant, Reflect & Edge padding mode is supported. |
Pow |
1,7,12,13,15 |
|
PRelu |
1,6,7,9 |
Slope must be static. |
QLinearConv |
10 |
Translate to Conv. |
QLinearMatMul |
10,21 |
Translate to MatMul. |
QuantizeLinear |
10,13,19,21 |
|
RandomUniformLike |
1,22 |
|
Range |
11 |
|
Reciprocal |
1,6 |
Translate to Div. |
Reducel2 |
1,11,13,18 |
|
ReduceLogSumExp |
1,11,13,18 |
Translate to Log + ReduceSum + Exp |
ReduceMax |
1,11,12,13,18,20 |
|
ReduceMean |
1,11,13,18 |
|
ReduceMin |
1,11,12,13,18,20 |
|
ReduceProd |
1,11,13,18 |
|
ReduceSum |
1,11,13 |
|
ReduceSumSquare |
1,11,13,18 |
|
Relu |
1,6 |
|
Reshape |
1,5,13,14 |
Only default value(0) is supported for allow_zero |
Resize |
10,11,13,18,19 |
Only 3D,4D & 5D inputs are supported. |
RoiAlign |
10,16,22 |
Only output_haf_pixel is supported for coordinate transformation mode |
Round |
11,22 |
|
RNN |
1, 7 |
Custom and user-defined activations (activation_alpha and beta) are not supported. |
Scatter |
9,11 |
|
ScatterElements |
11,13,16 |
|
ScatterND |
11,13,16 |
|
Shape |
1,13,15 |
Shape is only supported at conversion time. The input to Shape and all operators which manipulate the resulting output shape (eg slice, concat, etc) are also computed at conversion time. |
Sign |
13 |
|
Sigmoid |
1,6,13 |
|
Sin |
7,22 |
|
Slice |
1,10,11,13 |
|
Size |
1,13,15,19,21,23 |
Size is supported only at conversion time. The input to Size and all operators which manipulate the resulting output shape (eg slize, concat, etc) are also computed at conversion time. |
Softmax |
1,11,13 |
|
Softplus |
1,22 |
|
Split |
1,2,11,13,18 |
|
Squeeze |
1,11,13 |
|
Sqrt |
1,6,13 |
|
STFT |
17 |
|
Sub |
1,6,7,13,14 |
|
Sum |
1,6,8,13 |
|
Tanh |
1,6,13 |
|
Tile |
1.6,13 |
|
TopK |
1,10,11 |
|
Transpose |
1,13 |
|
Unsqueeze |
1,11,13 |
|
Upsample |
1,7,9 |
Only bilinear and nearest neighbor modes are supported. |
FC |
1 |
Both “axis” and “axis_w” must be 1. |
ScaledTanh |
1,6 |
Scaledtanh is removed in ONNX release v1.5.0 |
ThresholdedRelu |
10,22 |
|
SpaceToDepth |
1,13 |
|
Where |
9,16 |
|
Xor |
1,7 |