97eb9fea创建于 2025年10月11日历史提交

MindSpore Lite Kit Operator List

This 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.

NOTE

  • All the following operators do not support int64 input tensors.
MindSpore Lite Operator Description ONNX Operator Operator Specifications
Abs Computes the absolute value element-wise. Abs Do not support uint8 tensors. Do not support empty input tensor quantization parameters.
Activation Computes the activation function. Celu
Clip
Elu
Gelu
HSigmoid
LeakyRelu
PRelu
Relu
Sigmoid
SoftMax
SoftPlus
Tanh
-
AddFusion Computes element-wise addition. Add -
ArgMaxFusion Computes the maximum value along a specified dimension. ArgMax Do not support uint8 tensors. Do not support empty input tensor quantization parameters.
AvgPoolFusion Performs average pooling. AveragePool
GlobalAveragePool
GlobalMaxPool
MaxPool
-
BatchNorm Performs batch normalization. BatchNormalization -
BroadcastTo Expands the dimensions of a tensor. Expand -
Cast Converts the data type. Cast Do not support the following conversions: fp32 to int8, fp32 to uint32, int32 to int8, int32 to uint32, int32 to uint8, int8 to bool, and int8 to uint8.
Ceil Rounds up to an integer. Ceil -
Clip Limits the element range. Clip -
Concat Concatenates tensors. Concat -
Conv2DFusion Performs 2D convolution. Conv -
Cos Computes the cosine element-wise. Cos -
CumSum Accumulates the elements. CumSum -
DepthToSpace Rearranges data from depth into blocks of spatial data. DepthToSpace Do not support uint8 tensors. Do not support input tensors with unknown dimensions.
DivFusion Computes element-wise division. Div Do not support division by 0.
Eltwise Computes element-wise summation. Sum -
Equal Checks whether the inputs are equal. Equal Do not support uint8 input tensors, or output of bool tensors for input int8 tensors.
Erf Computes the error function. Erf -
ExpFusion Computes the exponential element-wise. Exp -
Flatten Flattens data by dimension. Flatten Do not support uint8 tensors.
Floor Rounds down to the nearest integer. Floor -
FusedBatchNorm Performs fused batch normalization. BatchNormalization -
Gather Gathers elements from a tensor along a specified axis. Gather Do not support uint8 tensors. Do not support QuantType_QUANT_NONE.
GatherD Gathers elements from a tensor using dynamic indices. GatherElements -
GatherNd Gathers elements from a tensor using N-dimensional indices. GatherND -
InstanceNorm Performs instance normalization. InstanceNormalization -
Log Computes the natural logarithm element-wise. Log Do not support negative input tensors.
LogicalNot Computes the element-wise logical NOT. Not -
LogSoftmax Applies Softmax followed by Log to the input tensor. LogSoftmax Do not support inf input tensors.
LRN Applies local response normalization to reduce overfitting. LRN -
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
MatMul
-
Maximum Computes the element-wise maximum. Max -
MaxPoolFusion Performs max pooling operation. GlobalMaxPool
MaxPool
-
Minimum Computes the element-wise minimum. Min -
Mod Computes the element-wise modulus. Mod -
MulFusion Computes the element-wise multiplication. Mul -
Neg Computes the element-wise negation. Neg -
PadFusion Adds padding to a tensor. Pad Do not support int32 tensors.
PowFusion Computes the element-wise power. Pow Support only exponents that are a single constant.
PReLUFusion Performs parametric ReLU activation. PRelu -
Range Generates a sequence of numbers with a specified start, end, and step. Range -
Reciprocal Computes the element-wise reciprocal. Reciprocal -
Reshape Reshapes a tensor. Reshape -
Round Rounds to the nearest integer. Round -
ScatterNdUpdate Updates specified elements of a tensor using given indices and values. ScatterND -
Shape Obtains the shape of a tensor. Shape -
Sin Computes the element-wise sine. Sin -
Size Obtains the size of a tensor. Size -
SliceFusion Slices a tensor. Slice -
Softmax Applies the Softmax function to normalize a tensor along a specified axis. Softmax -
SpaceToDepth Rearranges blocks of spatial data into depth. SpaceToDepth -
Sqrt Computes the element-wise square root. Sqrt -
Squeeze Removes dimensions of size 1. Squeeze -
StridedSlice Slices a tensor with stride. Slice -
SubFusion Computes the element-wise subtraction. Sub -
TileFusion Constructs a tensor by replicating input tensor multiple times. Tile Do not support int8 tensors.
TopKFusion Obtains the top K elements from the input tensor. TopK -
Transpose Transposes a tensor. Transpose -
Tril Obtains the lower triangular part of a matrix. Trilu (upper=0) -
Triu Obtains the upper triangular part of a matrix. Trilu (upper=1) -
Unsqueeze Inserts a new dimension into the input tensor. Unsqueeze -
Where Selects elements based on specified conditions. Where -