• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# MindSpore Lite Kit Operator List
2
3<!--Kit: MindSpore Lite Kit-->
4<!--Subsystem: AI-->
5<!--Owner: @zhuguodong8-->
6<!--Designer: @zhuguodong8; @jjfeing-->
7<!--Tester: @principal87-->
8<!--Adviser: @ge-yafang-->
9
10This document provides the CPU backend operators supported by MindSpore Lite Kit and their mapping to ONNX Opset 18 operators. When using the model conversion tool to convert an ONNX model to an MS model for deployment, you can refer to this list for the supported ONNX operators, thereby ensuring the success of model conversion.
11
12| MindSpore Lite Operator| Description                                                    | ONNX Operator                                            |
13| ---------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ |
14| Abs                    | Computes the absolute value element-wise.                                            | Abs                                                          |
15| Activation             | Computes the activation function.                                                    | Celu<br>Clip<br>Elu<br>Gelu<br>HSigmoid<br>LeakyRelu<br>PRelu<br>Relu<br>Sigmoid<br>SoftMax<br>SoftPlus<br>SoftSign<br>Tanh |
16| AddFusion              | Computes element-wise addition.                                              | Add                                                          |
17| ArgMaxFusion           | Computes the maximum value along a specified dimension.                                            | ArgMax                                                       |
18| AvgPoolFusion          | Performs average pooling.                                                    | AveragePool<br>GlobalAveragePool<br>GlobalMaxPool<br>MaxPool |
19| BatchNorm              | Performs batch normalization.                                                  | BatchNormalization                                           |
20| BroadcastTo            | Expands the dimensions of a tensor.                                                        | Expand                                                       |
21| Cast                   | Converts the data type.                                                | Cast                                                         |
22| Ceil                   | Rounds up to an integer.                                                    | Ceil                                                         |
23| Clip                   | Limits the element range.                                                | Clip                                                         |
24| Concat                 | Concatenates tensors.                                                    | Concat                                                       |
25| Conv2DFusion           | Performs 2D convolution.                                                      | Conv                                                         |
26| Cos                    | Computes the cosine element-wise.                                              | Cos                                                          |
27| CumSum                 | Accumulates the elements.                                                  | CumSum                                                       |
28| DepthToSpace           | Rearranges data from depth into blocks of spatial data.                              | DepthToSpace                                                 |
29| DivFusion              | Computes element-wise division.                                                  | Div                                                          |
30| Eltwise                | Computes element-wise summation.                                                  | Sum                                                          |
31| Equal                  | Checks whether the inputs are equal.                                            | Equal                                                        |
32| Erf                    | Computes the error function.                                                    | Erf                                                          |
33| ExpFusion              | Computes the exponential element-wise.                                                | Exp                                                          |
34| Flatten                | Flattens data by dimension.                                              | Flatten                                                      |
35| Floor                  | Rounds down to the nearest integer.                                                    | Floor                                                        |
36| FusedBatchNorm         | Performs fused batch normalization.                                              | BatchNormalization                                           |
37| Gather                 | Gathers elements from a tensor along a specified axis.                            | Gather                                                       |
38| GatherD                | Gathers elements from a tensor using dynamic indices.                  | GatherElements                                               |
39| GatherNd               | Gathers elements from a tensor using N-dimensional indices.           | GatherND                                                     |
40| InstanceNorm           | Performs instance normalization.                                                  | InstanceNormalization                                        |
41| Log                    | Computes the natural logarithm element-wise.                                                | Log                                                          |
42| LogicalNot             | Computes the element-wise logical NOT.                                                | Not                                                          |
43| LogSoftmax             | Applies Softmax followed by Log to the input tensor.        | LogSoftmax                                                   |
44| LRN                    | Applies local response normalization to reduce overfitting.                        | LRN                                                          |
45| MatMulFusion           | Performs matrix multiplication on two input tensors by computing the inner product using the input tensors and a set of learned weights, followed by adding a bias.| Gemm<br>MatMul                                             |
46| Maximum                | Computes the element-wise maximum.                                              | Max                                                          |
47| MaxPoolFusion          | Performs max pooling operation.                                                    | GlobalMaxPool<br>MaxPool                                   |
48| Minimum                | Computes the element-wise minimum.                                              | Min                                                          |
49| Mod                    | Computes the element-wise modulus.                                          | Mod                                                          |
50| MulFusion              | Computes the element-wise multiplication.                                                  | Mul                                                          |
51| Neg                    | Computes the element-wise negation.                                                | Neg                                                          |
52| PadFusion              | Adds padding to a tensor.            | Pad                                                          |
53| PowFusion              | Computes the element-wise power.                                                  | Pow                                                          |
54| PReLUFusion            | Performs parametric ReLU activation.                                               | PRelu                                                        |
55| Range                  | Generates a sequence of numbers with a specified start, end, and step.                                        | Range                                                        |
56| Reciprocal             | Computes the element-wise reciprocal.                                                    | Reciprocal                                                   |
57| Reshape                | Reshapes a tensor.                                | Reshape                                                      |
58| Round                  | Rounds to the nearest integer.                                  | Round                                                        |
59| ScatterNdUpdate        | Updates specified elements of a tensor using given indices and values.                      | ScatterND                                                    |
60| Shape                  | Obtains the shape of a tensor.                                               | Shape                                                        |
61| Sin                    | Computes the element-wise sine.                                              | Sin                                                          |
62| Size                   | Obtains the size of a tensor.                                            | Size                                                         |
63| SliceFusion            | Slices a tensor.                                                | Slice                                                        |
64| Softmax                | Applies the Softmax function to normalize a tensor along a specified axis.                                                  | Softmax                                                      |
65| SpaceToDepth           | Rearranges blocks of spatial data into depth.                              | SpaceToDepth                                                 |
66| Sqrt                   | Computes the element-wise square root.                                                | Sqrt                                                         |
67| Squeeze                | Removes dimensions of size 1.                                           | Squeeze                                                      |
68| StridedSlice           | Slices a tensor with stride.                                                  | Slice                                                        |
69| SubFusion              | Computes the element-wise subtraction.                                                  | Sub                                                          |
70| TileFusion             | Constructs a tensor by replicating input tensor multiple times.                                                | Tile                                                         |
71| TopKFusion             | Obtains the top K elements from the input tensor.                                 | TopK                                                         |
72| Transpose              | Transposes a tensor.                                                  | Transpose                                                    |
73| Tril                   | Obtains the lower triangular part of a matrix.                                                  | Trilu (upper=0)                                        |
74| Triu                   | Obtains the upper triangular part of a matrix.                                                  | Trilu (upper=1)                                        |
75| Unsqueeze              | Inserts a new dimension into the input tensor.                                  | Unsqueeze                                                    |
76| Where                  | Selects elements based on specified conditions.                                                    | Where                                                        |
77