TFLite Operations

NeuroPilot supports a wide variety of operations in TFLite. This allows most neural network models to run on the specialized compute cores available on MediaTek platforms.

Supported Data Types

The following table lists the supported data types of each hardware target.

Device

AsymU8

AsymI8

SymI8

SymI16

FP16

FP32

Bool8

Int32

MDLA 2.0

O

O

O

O

O

VPU

O

O

O

O

O

CPU

O

O

O

O

O

O

Supported NeuroPilot Operations

The following table lists the TFLite operations supported for each data type.

Note

For full details of each operation, see the corresponding hardware guidelines section.

OP Name

TFLite OP

Ncc-tflite

AsymU8

AsymI8

SymI8

SymI16

Fp16

Fp32

Bool8

Int32

Abs

kTfLiteBuiltinAbs

O

O

O

O

O

O

O

ArgMax

kTfLiteBuiltinArgMax

O

O

O

O

O

ArgMin

kTfLiteBuiltinArgMin

O

O

O

O

O

AvgPooling

kTfLiteBuiltinAveragePool2d

O

O

O

O

O

O

O

Cast

kTfLiteBuiltinCast

O

O

O

O

Concat

kTfLiteBuiltinConcatenation

O

O

O

O

O

O

O

Conv2D

kTfLiteBuiltinConv2d

O

O

O

O

O

O

O

DepthToSpace

kTfLiteBuiltinDepthToSpace

O

O

O

O

O

O

O

DepthwiseConv2D

kTfLiteBuiltinDepthwiseConv2d

O

O

O

O

O

O

O

Dequantize

kTfLiteBuiltinDequantize

O

O

O

O

O

O

O

ElementWiseAdd

kTfLiteBuiltinAdd

O

O

O

O

O

O

O

ElementWiseDiv

kTfLiteBuiltinDiv

O

O

O

O

O

O

O

ElementWiseMul

kTfLiteBuiltinMul

O

O

O

O

O

O

O

ElementWiseSub

kTfLiteBuiltinSub

O

O

O

O

O

O

O

Elu

kTfLiteBuiltinElu

O

O

O

O

O

O

O

Equal

kTfLiteBuiltinEqual

O

O

O

O

O

O

O

FullyConnected

kTfLiteBuiltinFullyConnected

O

O

O

O

O

O

O

Gather

kTfLiteBuiltinGather

O

O

O

Greater

kTfLiteBuiltinGreater

O

O

O

O

O

O

O

GreaterEqual

kTfLiteBuiltinGreaterEqual

O

O

O

O

O

O

O

HardSwish

kTfLiteBuiltinHardSwish

O

O

O

O

O

O

O

L2Norm

kTfLiteBuiltinL2Normalization

O

O

O

O

Less

kTfLiteBuiltinLess

O

O

O

O

O

O

O

LessEqual

kTfLiteBuiltinLessEqual

O

O

O

O

O

O

O

Maximum

kTfLiteBuiltinMaximum

O

O

O

O

O

O

O

MaxPooling

kTfLiteBuiltinMaxPool2d

O

O

O

O

O

O

O

Mean

kTfLiteBuiltinMean

O

O

O

O

O

O

O

Minimum

kTfLiteBuiltinMinimum

O

O

O

O

O

O

O

Neg

kTfLiteBuiltinNeg

O

O

O

O

O

O

O

NotEqual

kTfLiteBuiltinNotEqual

O

O

O

O

O

O

O

Pack

kTfLiteBuiltinPack

O

O

O

O

O

O

Pad

kTfLiteBuiltinPad

O

O

O

O

O

O

O

Pad

kTfLiteBuiltinPadv2

O

O

O

O

O

O

O

Pow

kTfLiteBuiltinPow

O

O

O

O

O

O

PRelu

kTfLiteBuiltinPrelu

O

O

O

O

O

O

O

PRelu

kTfLiteBuiltinLeakyRelu

O

O

O

O

O

O

O

Quantize

kTfLiteBuiltinQuantize

O

O

O

O

O

O

O

ReduceAny

kTfLiteBuiltinReduceAny

O

O

O

ReduceMax

kTfLiteBuiltinReduceMax

O

O

O

ReduceMin

kTfLiteBuiltinReduceMin

O

O

O

ReLU

kTfLiteBuiltinRelu

O

O

O

O

O

O

O

ReLU6

kTfLiteBuiltinRelu6

O

O

O

O

O

O

O

Reshape

kTfLiteBuiltinReshape

O

O

O

O

O

O

O

Reshape

kTfLiteBuiltinSqueeze

O

O

O

O

O

O

O

Resize::BILINEAR

kTfLiteBuiltinResizeBilinear

O

O

O

O

O

O

O

Resize::NEAREST

kTfLiteBuiltinResizeNearestNeighbor

O

O

O

O

O

O

O

RSqrt

kTfLiteBuiltinRsqrt

O

O

O

O

O

O

O

Sigmoid

kTfLiteBuiltinLogistic

O

O

O

O

O

O

O

Slice

kTfLiteBuiltinSlice

O

O

O

O

O

O

SoftMax

kTfLiteBuiltinSoftmax

O

O

O

O

O

O

O

SpaceToDepth

kTfLiteBuiltinSpaceToDepth

O

O

O

O

O

O

O

Split

kTfLiteBuiltinSplit

O

O

O

O

O

O

O

Sqrt

kTfLiteBuiltinSqrt

O

O

O

O

O

O

O

Square

kTfLiteBuiltinSquare

O

O

O

O

O

O

SquaredDifference

kTfLiteBuiltinSquaredDifference

O

O

O

O

O

O

StridedSlice

kTfLiteBuiltinStridedSlice

O

O

O

O

O

O

O

Tanh

kTfLiteBuiltinTanh

O

O

O

O

O

O

O

Tile

kTfLiteBuiltinTile

O

O

O

Transpose

kTfLiteBuiltinTranspose

O

O

O

O

O

O

O

TransposeConv2D

kTfLiteBuiltinTransposeConv

O

O

O

O

O

O

O

Supported Hardware Operations

The table below lists the supported TFLite operations (OPs) for hardware targets on different MediaTek platforms.

Note

  • Each OP has both might have hardware and software constraints.

  • For details on MDLA constrains, see MDLA 2.0 Guidelines.

  • To check the supported TFLite OP versions, use the command --show-builtin-ops in ncc-tflite.

TFLite operations

MDLA 1.0

MDLA 1.5/1.7

MDLA 2.0

MDLA 3.0

VPU (asym8)

VPU (FP16)

MVPU 2.0

ABS

O

O

O

O

ADD

O

O

O

O

O

O

O

ARG_MAX

O

O

ARG_MIN

O

O

AVERAGE_POOL_2D

O

O

O

O

O

O

BATCH_TO_SPACE_ND

O

O

O

O

O

CAST

O

O

O

O

O

CEIL

O

CHANNEL_SHUFFLE

O

CONCATENATION

O

O

O

O

O

CONV_2D

O

O

O

O

O

DEPTH_TO_SPACE

O

O

O

O

O

DEPTHWISE_CONV_2D

O

O

O

O

O

DEQUANTIZE

O

O

O

O

O

O

DIV

O

O

O

O

O

O

ELU

O

O

O

O

EQUAL

O

O

EXP

O

EXPAND_DIMS

O

O

O

O

O

FILL

O

FLOOR

O

FULLY_CONNECTED

O

O

O

O

O

O

GATHER

O

O

GREATER

O

O

GREATER_EQUAL

O

O

HARD_SWISH

O

O

O

O

O

L2_NORMALIZATION

O

O

L2_POOL_2D

O

O

O

O

LEAKY_RELU

O

LESS

O

O

LESS_EQUAL

O

O

LOCAL_RESPONSE_NORMALIZATION

LOG

O

LOG_SOFTMAX

O

LOGICAL_AND

O

LOGICAL_NOT

O

LOGICAL_OR

O

LOGISTIC

O

O

O

O

O

O

LSTM (QSTM)

O

O

O

O

O

MAX_POOL_2D

O

O

O

O

O

O

MAXIMUM

O

O

O

O

O

O

MEAN

O

O

O

O

O

O

MINIMUM

O

O

O

O

O

O

MIRRORPAD

O

O

O

MUL

O

O

O

O

O

O

O

NEG

O

O

O

NOT_EQUAL

O

O

PACK

O

O

O

O

PAD

O

O

O

O

O

POW

O

O

O

O (SQRT)

PRELU

O

O

O

O

O

O

QUANTIZE

O

O

O

O

O

O

REDUCE_ANY

O

O

REDUCE_MAX

O

O

O

O

O

REDUCE_MIN

O

O

O

O

O

RELU

O

O

O

O

O

O

RELU_N1_TO_1

O

O

O

O

O

O

RELU6

O

O

O

O

O

O

RESHAPE

O

O

O

O

O

O

RESIZE_BILINEAR

O

O

O

O

O

RESIZE_NEAREAST

O

O

O

O

ROUND

O

RSQRT

O

O

O

O

SELECT

O

SLICE

O

O

O

O

O

SOFTMAX

O

O

O

O

O

SPACE_TO_BATCH_ND

O

O

O

O

SPACE_TO_DEPTH

O

O

O

O

O

SPLIT

O

O

O

O

O

SPLIT_V

O

O

O

O

O

SQRT

O

O

O

O

SQUARE

O

O

O

O

O

SQUARED_DIFFERENCE

O

O

O

SQUEEZE

O

O

O

O

STRIDED_SLICE

O

O

O

O

SUB

O

O

O

O

O

O

SUM

O

TANH

O

O

O

O

O

O

TILE

O

TOPK_V2

O

O

TRANSPOSE

O

O

O

O

O

TRANSPOSE_CONV

O

O

O

O

O

UNPACK

O

O

O