17. Appendix.07: Supported Operations

17.1. List of operators currently supported by TPU-MLIR

Table 17.1 A

Onnx

Pytorch

Caffe

TOP

Abs

aten::abs

AbsVal

top.A16MatMul

Acos

aten::acos

ArgMax

top.Abs

Add

aten::adaptive_avg_pool1d

top.AdaptiveAvgPool

And

aten::adaptive_avg_pool2d

top.Add

ArgMax

aten::add

top.AddConst

ArgMin

aten::addmm

top.Arange

Atan

aten::arange

top.Arccos

Atanh

aten::argmax

top.Arctanh

AveragePool

aten::argmin

top.Arg

aten::atan

top.Attention

aten::atanh

top.AvgPool

aten::avg_pool1d

aten::avg_pool2d

aten::avg_pool3d

Table 17.2 B

Onnx

Pytorch

Caffe

TOP

BatchNormalization

aten::baddbmm

BatchNorm

top.BatchNorm

aten::batch_norm

BN

top.BatchNormBwd

aten::bmm

top.BatchNormTrain

top.BinaryConstShift

top.BinaryShift

Table 17.3 C

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::clone

top.Concat

Conv

aten::constant_pad_nd

top.ConstantFill

ConvTranspose

aten::contiguous

top.Conv

Correlation

aten::_convolution

top.ConvBwd_Weight

Cos

aten::_convolution_mode

top.Convbwd

CumSum

aten::copy

top.Copy

aten::cos

top.Correlation

aten::cosh

top.Cos

aten::cumsum

top.Cosh

top.Csc

top.CumSum

top.Custom

Table 17.4 D

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

top.DivConst

top.DtypeCast

Table 17.5 E

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

Table 17.6 F

Onnx

Pytorch

Caffe

TOP

Flatten

aten::flatten

Flatten

top.FAttention

Floor

aten::flip

FrcnDetection

top.Flatten

aten::floor

top.Floor

aten::floor_divide

top.FrcnDetection

aten::frobenius_norm

Table 17.7 G

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

top.GroupNormTrain

GreaterOrEqual

GridSample

GroupNormalization

GRU

Table 17.8 H

Onnx

Pytorch

Caffe

TOP

HardSigmoid

aten::hardsigmoid

top.HardSigmoid

HardSwish

aten::hardswish

top.HardSwish

aten::hardtanh

Table 17.9 I

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

Table 17.10 L

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

aten::lt

top.Loop

top.Lut

Table 17.11 M

Onnx

Pytorch

Caffe

TOP

MatMul

aten::masked_fill

MatMul

top.MaskRCNN_BboxPooler

Max

aten::matmul

Mish

top.MaskRCNN_GetBboxB

MaxPool

aten::max

top.MaskRCNN_MaskPooler

Min

aten::max_pool1d

top.MaskRCNN_RPNGetBboxes

Mod

aten::max_pool2d

top.MaskedFill

Mul

aten::max_pool2d_with_indices

top.MatMul

aten::max_pool3d

top.MatchTemplate

aten::mean

top.Max

aten::meshgrid

top.MaxConst

aten::min

top.MaxPool

aten::mish

top.MaxPoolWithMask

aten::mm

top.MaxPoolingIndicesBwd

aten::mul

top.MaxUnpool

aten::mv

top.MeanRstd

top.MeanStdScale

top.MeshGrid

top.Min

top.MinConst

top.Mish

top.Mmap2Rgbmap

top.Mod

top.Mul

top.MulConst

Table 17.12 N

Onnx

Pytorch

Caffe

TOP

Neg

aten::_native_batch_norm_legit_functional

Normalize

top.Nms

NonMaxSuppression

aten::native_group_norm

top.NonZero

NonZero

aten::native_layer_norm

top.None

Not

aten::ne

top.Normalize

aten::neg

aten::new_full

aten::new_ones

aten::new_zeros

aten::nonzero

Table 17.13 O

Onnx

Pytorch

Caffe

TOP

OneHot

aten::ones

aten::ones_like

Table 17.14 P

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

top.Preprocess

top.PriorBox

top.Proposal

Table 17.15 Q

Onnx

Pytorch

Caffe

TOP

QuantizeLinear

top.QuantizeLinear

Table 17.16 R

Onnx

Pytorch

Caffe

TOP

RandomNormalLike

aten::reflection_pad1d

Reduction

top.RMSNorm

Range

aten::reflection_pad2d

ReLU

top.ROIPooling

Reciprocal

aten::relu

ReLU6

top.RandnLike

ReduceL1

aten::remainder

Reorg

top.Range

ReduceL2

aten::repeat

Reshape

top.Reciprocal

ReduceLogSumExp

aten::replication_pad1d

RetinaFaceDetection

top.Reduce

ReduceMax

aten::replication_pad2d

Reverse

top.Relu

ReduceMean

aten::reshape

ROIPooling

top.Remainder

ReduceMin

aten::roll

top.Repeat

ReduceProd

aten::rsqrt

top.RequantFp

ReduceSum

aten::rsub

top.RequantInt

Relu

top.Reshape

Reshape

top.RetinaFaceDetection

Resize

top.Reverse

ReverseSequence

top.RoiAlign

RoiAlign

top.RoiExtractor

Round

top.Rope

top.Round

top.Rsqrt

Table 17.17 S

Onnx

Pytorch

Caffe

TOP

ScatterElements

aten::scaled_dot_product_attention

Scale

top.Scale

ScatterND

aten::scatter

ShuffleChannel

top.ScaleDotProductAttention

Shape

aten::select

Sigmoid

top.ScaleLut

Sigmoid

aten::sigmoid

Silence

top.ScatterElements

Sign

aten::sign

Slice

top.ScatterND

Sin

aten::silu

Softmax

top.Shape

Slice

aten::sin

Split

top.ShuffleChannel

Softmax

aten::sinh

top.SiLU

Softplus

aten::size

top.Sigmoid

SpaceToDepth

aten::slice

top.Sign

Split

aten::softmax

top.Sin

Sqrt

aten::_softmax

top.Sinh

Squeeze

aten::softplus

top.Size

Sub

aten::sort

top.Slice

Sum

aten::split

top.SliceAxis

aten::split_with_sizes

top.Softmax

aten::sqrt

top.SoftmaxBwd

aten::squeeze

top.Softplus

aten::stack

top.Softsign

aten::sub

top.Sort

aten::sum

top.Split

top.Sqrt

top.Squeeze

top.StridedSlice

top.Sub

top.SubConst

top.SwapChannel

top.SwapDimInner

top.Swish

Table 17.18 T

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::_to_copy

top.Trilu

aten::topk

top.Tuple

aten::transpose

aten::type_as

Table 17.19 U

Onnx

Pytorch

Caffe

TOP

Unsqueeze

aten::unbind

Upsample

top.UnTuple

Upsample

aten::_unsafe_view

top.Unpack

aten::unsqueeze

top.Unsqueeze

aten::upsample_bilinear2d

top.Upsample

aten::upsample_linear1d

aten::upsample_nearest1d

aten::upsample_nearest2d

aten::upsample_nearest3d

Table 17.20 V

Onnx

Pytorch

Caffe

TOP

aten::view

top.Variance

top.View

Table 17.21 W

Onnx

Pytorch

Caffe

TOP

Where

aten::where

top.Weight

top.WeightReorder

top.Where

Table 17.22 X

Onnx

Pytorch

Caffe

TOP

Xor

Table 17.23 Y

Onnx

Pytorch

Caffe

TOP

YoloDetection

top.Yield

top.YoloDetection

top.Yuv2rgbFormula

Table 17.24 Z

Onnx

Pytorch

Caffe

TOP

aten::zeros

aten::zeros_like