16. 附录07:已支持的算子
16.1. 本章节主要提供目前TPU-MLIR支持的算子列表
Onnx |
Pytorch |
Caffe |
TOP |
---|---|---|---|
Abs |
aten::abs |
AbsVal |
top.Abs |
Acos |
aten::acos |
ArgMax |
top.AdaptiveAvgPool |
Add |
aten::adaptive_avg_pool1d |
top.Add |
|
And |
aten::adaptive_avg_pool2d |
top.AddConst |
|
ArgMax |
aten::add |
top.Arange |
|
ArgMin |
aten::addmm |
top.Arccos |
|
Atan |
aten::arange |
top.Arctanh |
|
Atanh |
aten::argmax |
top.Arg |
|
AveragePool |
aten::argmin |
top.Attention |
|
aten::atan |
top.AvgPool |
||
aten::atanh |
|||
aten::avg_pool1d |
|||
aten::avg_pool2d |
|||
aten::avg_pool3d |
Onnx |
Pytorch |
Caffe |
TOP |
---|---|---|---|
BatchNormalization |
aten::baddbmm |
BatchNorm |
top.BatchNorm |
aten::batch_norm |
BN |
top.BatchNormBwd |
|
aten::bmm |
top.BatchNormTrain |
||
top.BinaryConstShift |
|||
top.BinaryShift |
Onnx |
Pytorch |
Caffe |
TOP |
---|---|---|---|
Cast |
aten::cat |
Concat |
top.Cast |
Ceil |
aten::ceil |
ContinuationIndicator |
top.Ceil |
Clip |
aten::channel_shuffle |
Convolution |
top.Clip |
Concat |
aten::chunk |
ConvolutionDepthwise |
top.Compare |
Constant |
aten::clamp |
Crop |
top.CompareConst |
ConstantOfShape |
aten::constant_pad_nd |
top.Concat |
|
Conv |
aten::contiguous |
top.ConstantFill |
|
ConvTranspose |
aten::_convolution |
top.Conv |
|
Cos |
aten::_convolution_mode |
top.ConvBwd_Weight |
|
CumSum |
aten::copy |
top.Copy |
|
aten::cos |
top.Cos |
||
aten::cosh |
top.Cosh |
||
aten::cumsum |
top.Csc |
||
top.CumSum |
|||
top.Custom |
Onnx |
Pytorch |
Caffe |
TOP |
---|---|---|---|
DepthToSpace |
aten::detach |
Deconvolution |
top.Deconv |
DequantizeLinear |
aten::div |
DetectionOutput |
top.DeformConv2D |
Div |
aten::dot |
Dropout |
top.DepackRaw |
Dropout |
aten::dropout |
DummyData |
top.Depth2Space |
top.DequantInt |
|||
top.DequantizeLinear |
|||
top.DetectionOutput |
|||
top.Div |
Onnx |
Pytorch |
Caffe |
TOP |
---|---|---|---|
Einsum |
aten::elu |
Eltwise |
top.Einsum |
Elu |
aten::embedding |
Embed |
top.Elu |
Equal |
aten::empty |
top.EmbDenseBwd |
|
Erf |
aten::eq |
top.Erf |
|
Exp |
aten::erf |
top.Exp |
|
Expand |
aten::exp |
top.Expand |
|
aten::expand |
|||
aten::expand_as |
Onnx |
Pytorch |
Caffe |
TOP |
---|---|---|---|
Flatten |
aten::flatten |
Flatten |
top.Flatten |
Floor |
aten::flip |
FrcnDetection |
top.Floor |
aten::floor |
top.FrcnDetection |
||
aten::floor_divide |
|||
aten::frobenius_norm |
Onnx |
Pytorch |
Caffe |
TOP |
---|---|---|---|
Gather |
aten::gather |
top.GELU |
|
GatherElements |
aten::ge |
top.GRU |
|
GatherND |
aten::gelu |
top.Gather |
|
GELU |
aten::grid_sampler |
top.GatherElements |
|
Gemm |
aten::group_norm |
top.GatherND |
|
GlobalAveragePool |
aten::gru |
top.GridSampler |
|
GlobalMaxPool |
aten::gt |
top.GroupNorm |
|
Greater |
|||
GreaterOrEqual |
|||
GridSample |
|||
GroupNormalization |
|||
GRU |
Onnx |
Pytorch |
Caffe |
TOP |
---|---|---|---|
HardSigmoid |
aten::hardsigmoid |
top.HardSigmoid |
|
HardSwish |
aten::hardswish |
top.HardSwish |
|
aten::hardtanh |
Onnx |
Pytorch |
Caffe |
TOP |
---|---|---|---|
Identity |
aten::index |
ImageData |
top.If |
If |
aten::index_put_ |
InnerProduct |
top.IndexPut |
InstanceNormalization |
aten::index_put |
Input |
top.Input |
aten::index_select |
Interp |
top.InstanceNorm |
|
aten::instance_norm |
top.Interp |
Onnx |
Pytorch |
Caffe |
TOP |
---|---|---|---|
LayerNormalization |
aten::layer_norm |
LRN |
top.LRN |
LeakyRelu |
aten::le |
LSTM |
top.LSTM |
Less |
aten::leaky_relu |
Lstm |
top.LayerNorm |
LessOrEqual |
aten::linalg_norm |
top.LayerNormBwd |
|
Log |
aten::linear |
top.LayerNormTrain |
|
LogSoftmax |
aten::log |
top.LeakyRelu |
|
Loop |
aten::log2 |
top.List |
|
LRN |
aten::log_sigmoid |
top.Log |
|
LSTM |
aten::log_softmax |
top.LogB |
|
aten::lstm |
top.Loop |
||
aten::lt |
top.Lut |
Onnx |
Pytorch |
Caffe |
TOP |
---|---|---|---|
MatMul |
aten::masked_fill |
MatMul |
top.MaskedFill |
Max |
aten::matmul |
Mish |
top.MatMul |
MaxPool |
aten::max |
top.MatchTemplate |
|
Min |
aten::max_pool1d |
top.Max |
|
Mul |
aten::max_pool2d |
top.MaxConst |
|
aten::max_pool3d |
top.MaxPool |
||
aten::mean |
top.MaxPoolWithMask |
||
aten::meshgrid |
top.MaxUnpool |
||
aten::min |
top.MeanRstd |
||
aten::mish |
top.MeshGrid |
||
aten::mm |
top.Min |
||
aten::mul |
top.MinConst |
||
aten::mv |
top.Mish |
||
top.Mul |
|||
top.MulConst |
Onnx |
Pytorch |
Caffe |
TOP |
---|---|---|---|
Neg |
aten::ne |
Normalize |
top.Nms |
NonMaxSuppression |
aten::neg |
top.NonZero |
|
NonZero |
aten::new_full |
top.None |
|
Not |
aten::new_ones |
top.Normalize |
|
aten::new_zeros |
|||
aten::nonzero |
Onnx |
Pytorch |
Caffe |
TOP |
---|---|---|---|
OneHot |
aten::ones |
||
aten::ones_like |
Onnx |
Pytorch |
Caffe |
TOP |
---|---|---|---|
Pad |
aten::pad |
Padding |
top.PRelu |
PixelNormalization |
aten::permute |
Permute |
top.Pack |
Pow |
aten::pixel_shuffle |
Pooling |
top.Pad |
PRelu |
aten::pixel_unshuffle |
Power |
top.Permute |
aten::pow |
PReLU |
top.PixelNorm |
|
aten::prelu |
PriorBox |
top.PoolMask |
|
Proposal |
top.Pow |
||
top.Pow2 |
|||
top.Preprocess |
|||
top.PriorBox |
|||
top.Proposal |
Onnx |
Pytorch |
Caffe |
TOP |
---|---|---|---|
QuantizeLinear |
top.QuantizeLinear |
Onnx |
Pytorch |
Caffe |
TOP |
---|---|---|---|
Range |
aten::reflection_pad1d |
ReLU |
top.RMSNorm |
Reciprocal |
aten::reflection_pad2d |
ReLU6 |
top.ROIPooling |
ReduceL1 |
aten::relu |
Reorg |
top.Range |
ReduceL2 |
aten::remainder |
Reshape |
top.Reciprocal |
ReduceMax |
aten::repeat |
RetinaFaceDetection |
top.Reduce |
ReduceMean |
aten::replication_pad1d |
Reverse |
top.Relu |
ReduceMin |
aten::replication_pad2d |
ROIPooling |
top.Remainder |
ReduceProd |
aten::reshape |
top.Repeat |
|
ReduceSum |
aten::roll |
top.RequantFp |
|
Relu |
aten::rsqrt |
top.RequantInt |
|
Reshape |
aten::rsub |
top.Reshape |
|
Resize |
top.RetinaFaceDetection |
||
RoiAlign |
top.Reverse |
||
Round |
top.RoiAlign |
||
top.Round |
|||
top.Rsqrt |
Onnx |
Pytorch |
Caffe |
TOP |
---|---|---|---|
ScatterElements |
aten::scatter |
Scale |
top.Scale |
ScatterND |
aten::select |
ShuffleChannel |
top.ScaleLut |
Shape |
aten::sigmoid |
Sigmoid |
top.ScatterElements |
Sigmoid |
aten::sign |
Silence |
top.ScatterND |
Sign |
aten::silu |
Slice |
top.Shape |
Sin |
aten::sin |
Softmax |
top.ShuffleChannel |
Slice |
aten::sinh |
Split |
top.SiLU |
Softmax |
aten::size |
top.Sigmoid |
|
Softplus |
aten::slice |
top.Sign |
|
Split |
aten::softmax |
top.Sin |
|
Sqrt |
aten::softplus |
top.Sinh |
|
Squeeze |
aten::sort |
top.Size |
|
Sub |
aten::split |
top.Slice |
|
Sum |
aten::split_with_sizes |
top.SliceAxis |
|
aten::sqrt |
top.Softmax |
||
aten::squeeze |
top.SoftmaxBwd |
||
aten::stack |
top.Softplus |
||
aten::sub |
top.Softsign |
||
aten::sum |
top.Sort |
||
top.Split |
|||
top.Sqrt |
|||
top.Squeeze |
|||
top.StridedSlice |
|||
top.Sub |
|||
top.SubConst |
|||
top.SwapChannel |
|||
top.SwapDimInner |
Onnx |
Pytorch |
Caffe |
TOP |
---|---|---|---|
Tanh |
aten::t |
TanH |
top.Tan |
Tile |
aten::tan |
Tile |
top.Tanh |
TopK |
aten::tanh |
top.Tile |
|
Transpose |
aten::tile |
top.TopK |
|
Trilu |
aten::to |
top.Transpose |
|
aten::topk |
top.Trilu |
||
aten::transpose |
top.Tuple |
||
aten::type_as |
Onnx |
Pytorch |
Caffe |
TOP |
---|---|---|---|
Unsqueeze |
aten::unbind |
Upsample |
top.UnTuple |
Upsample |
aten::unsqueeze |
top.Unpack |
|
aten::upsample_bilinear2d |
top.Unsqueeze |
||
aten::upsample_linear1d |
top.Upsample |
||
aten::upsample_nearest1d |
|||
aten::upsample_nearest2d |
|||
aten::upsample_nearest3d |
Onnx |
Pytorch |
Caffe |
TOP |
---|---|---|---|
aten::view |
top.Variance |
||
top.View |
Onnx |
Pytorch |
Caffe |
TOP |
---|---|---|---|
Where |
aten::where |
top.Weight |
|
top.WeightReorder |
|||
top.Where |
Onnx |
Pytorch |
Caffe |
TOP |
---|---|---|---|
YoloDetection |
top.Yield |
||
top.YoloDetection |
Onnx |
Pytorch |
Caffe |
TOP |
---|---|---|---|
aten::zeros |
|||
aten::zeros_like |