blob: 9a40a8ac9ef9e4d34d2130d4ac97eb558532ad43 [file] [log] [blame]
Narumol Prangnawaratcb2ad742023-06-28 13:32:46 +01001/// Copyright (c) 2022-2023 ARM Limited and Contributors. All rights reserved.
Jan Eilers31a7c892021-01-29 14:18:13 +00002///
3/// SPDX-License-Identifier: MIT
4///
5
6namespace armnn
7{
8/**
9@page delegate TfLite Delegate
Jan Eilers31a7c892021-01-29 14:18:13 +000010
11
12@section delegateintro About the delegate
13'armnnDelegate' is a library for accelerating certain TensorFlow Lite (TfLite) operators on Arm hardware. It can be
14integrated in TfLite using its delegation mechanism. TfLite will then delegate the execution of operators supported by
15Arm NN to Arm NN.
16
17The main difference to our @ref S6_tf_lite_parser is the amount of operators you can run with it. If none of the active
18backends support an operation in your model you won't be able to execute it with our parser. In contrast to that, TfLite
19only delegates operations to the armnnDelegate if it does support them and otherwise executes them itself. In other
20words, every TfLite model can be executed and every operation in your model that we can accelerate will be accelerated.
21That is the reason why the armnnDelegate is our recommended way to accelerate TfLite models.
22
23If you need help building the armnnDelegate, please take a look at our [build guide](delegate/BuildGuideNative.md).
Jan Eilers31a7c892021-01-29 14:18:13 +000024
25
26@section delegatesupport Supported Operators
27This reference guide provides a list of TensorFlow Lite operators the Arm NN SDK currently supports.
28
Nikhil Rajc377eb82023-08-01 15:00:39 +010029@section delegatefullysupported Fully supported
Jan Eilers31a7c892021-01-29 14:18:13 +000030
31The Arm NN SDK TensorFlow Lite delegate currently supports the following operators:
32
33- ABS
34
35- ADD
36
Matthew Sloyanffa34932022-11-04 11:25:27 +000037- ARG_MAX
Jan Eilers31a7c892021-01-29 14:18:13 +000038
Matthew Sloyanffa34932022-11-04 11:25:27 +000039- ARG_MIN
Jan Eilers31a7c892021-01-29 14:18:13 +000040
Matthew Sloyanffa34932022-11-04 11:25:27 +000041- AVERAGE_POOL_2D, Supported Fused Activation: RELU, RELU6, RELU_N1_TO_1, SIGMOID, TANH, NONE
Jan Eilers31a7c892021-01-29 14:18:13 +000042
Matthew Sloyanffa34932022-11-04 11:25:27 +000043- AVERAGE_POOL_3D, Supported Fused Activation: RELU, RELU6, RELU_N1_TO_1, SIGMOID, SIGN_BIT, TANH, NONE
Ryan OShead21abaf2022-06-10 14:49:11 +010044
Ryan OShea49ed0df2022-09-21 16:09:41 +010045- BATCH_MATMUL
46
Matthew Sloyana35b40b2021-02-05 17:22:28 +000047- BATCH_TO_SPACE_ND
48
Idriss Chaouchcbf79292023-09-08 11:18:16 +010049- BROADCAST_TO
50
Sadik Armagan937565b2021-04-21 14:03:28 +010051- CAST
52
Matthew Sloyanf6ed6d42023-05-08 15:01:55 +010053- CEIL
54
Matthew Sloyanffa34932022-11-04 11:25:27 +000055- CONCATENATION, Supported Fused Activation: RELU, RELU6, RELU_N1_TO_1, SIGMOID, TANH, NONE
Jan Eilers31a7c892021-01-29 14:18:13 +000056
Matthew Sloyanffa34932022-11-04 11:25:27 +000057- CONV_2D, Supported Fused Activation: RELU, RELU6, RELU_N1_TO_1, SIGMOID, TANH, NONE
Jan Eilers31a7c892021-01-29 14:18:13 +000058
Matthew Sloyanffa34932022-11-04 11:25:27 +000059- CONV_3D, Supported Fused Activation: RELU, RELU6, RELU_N1_TO_1, SIGMOID, TANH, NONE
Matthew Sloyan81ec9942021-10-12 10:26:30 +010060
Jan Eilers31a7c892021-01-29 14:18:13 +000061- DEPTH_TO_SPACE
62
Matthew Sloyanffa34932022-11-04 11:25:27 +000063- DEPTHWISE_CONV_2D, Supported Fused Activation: RELU, RELU6, RELU_N1_TO_1, SIGMOID, TANH, NONE
Jan Eilers31a7c892021-01-29 14:18:13 +000064
65- DEQUANTIZE
66
67- DIV
68
69- EQUAL
70
71- ELU
72
73- EXP
74
Matthew Sloyanffa34932022-11-04 11:25:27 +000075- EXPAND_DIMS
76
77- FILL
Jan Eilers31a7c892021-01-29 14:18:13 +000078
Sadik Armagan788e2c62021-02-10 16:26:44 +000079- FLOOR
80
Matthew Sloyanffa34932022-11-04 11:25:27 +000081- FLOOR_DIV
82
83- FULLY_CONNECTED, Supported Fused Activation: RELU, RELU6, RELU_N1_TO_1, SIGMOID, TANH, NONE
84
Jan Eilers31a7c892021-01-29 14:18:13 +000085- GATHER
86
Teresa Charlind5c0ed22022-04-25 18:23:41 +010087- GATHER_ND
88
Jan Eilers31a7c892021-01-29 14:18:13 +000089- GREATER
90
Matthew Sloyanffa34932022-11-04 11:25:27 +000091- GREATER_EQUAL
Jan Eilers31a7c892021-01-29 14:18:13 +000092
93- HARD_SWISH
94
Matthew Sloyanffa34932022-11-04 11:25:27 +000095- L2_NORMALIZATION
96
97- L2_POOL_2D
98
Jan Eilers31a7c892021-01-29 14:18:13 +000099- LESS
100
Matthew Sloyanffa34932022-11-04 11:25:27 +0000101- LESS_EQUAL
Jan Eilers31a7c892021-01-29 14:18:13 +0000102
103- LOCAL_RESPONSE_NORMALIZATION
104
Teresa Charlinb1f5f702022-07-12 14:16:24 +0100105- LOG
106
Jan Eilers31a7c892021-01-29 14:18:13 +0000107- LOGICAL_AND
Jan Eilers1121c6b2021-02-19 09:38:03 +0000108
Jan Eilers31a7c892021-01-29 14:18:13 +0000109- LOGICAL_NOT
Jan Eilers1121c6b2021-02-19 09:38:03 +0000110
Jan Eilers31a7c892021-01-29 14:18:13 +0000111- LOGICAL_OR
112
113- LOGISTIC
114
115- LOG_SOFTMAX
116
Jan Eilers1121c6b2021-02-19 09:38:03 +0000117- LSTM
118
Jan Eilers31a7c892021-01-29 14:18:13 +0000119- MAXIMUM
120
Matthew Sloyanffa34932022-11-04 11:25:27 +0000121- MAX_POOL_2D, Supported Fused Activation: RELU, RELU6, RELU_N1_TO_1, SIGMOID, TANH, NONE
Jan Eilers31a7c892021-01-29 14:18:13 +0000122
Matthew Sloyanffa34932022-11-04 11:25:27 +0000123- MAX_POOL_3D, Supported Fused Activation: RELU, RELU6, RELU_N1_TO_1, SIGMOID, SIGN_BIT, TANH, NONE
Ryan OShead21abaf2022-06-10 14:49:11 +0100124
Jan Eilers31a7c892021-01-29 14:18:13 +0000125- MEAN
126
127- MINIMUM
128
Matthew Sloyanaf3a4ef2021-10-22 15:48:12 +0100129- MIRROR_PAD
130
Jan Eilers31a7c892021-01-29 14:18:13 +0000131- MUL
132
133- NEG
134
135- NOT_EQUAL
136
Kevin Mayc7bd7e82021-05-10 12:46:40 +0100137- PACK
138
Jan Eilers31a7c892021-01-29 14:18:13 +0000139- PAD
140
Matthew Sloyanffa34932022-11-04 11:25:27 +0000141- PADV2
142
John Mcloughlin0ec00872023-05-15 17:03:49 +0100143- POW
144
Jan Eilers1121c6b2021-02-19 09:38:03 +0000145- PRELU
146
Jan Eilers31a7c892021-01-29 14:18:13 +0000147- QUANTIZE
148
Jan Eilers1121c6b2021-02-19 09:38:03 +0000149- RANK
150
151- REDUCE_MAX
152
153- REDUCE_MIN
154
Matthew Sloyanffa34932022-11-04 11:25:27 +0000155- REDUCE_PROD
156
157- RELU
158
159- RELU6
160
161- RELU_N1_TO_1
162
Jan Eilers31a7c892021-01-29 14:18:13 +0000163- RESHAPE
164
165- RESIZE_BILINEAR
166
167- RESIZE_NEAREST_NEIGHBOR
168
Tracy Narine7306bbe2023-07-17 16:06:26 +0100169- REVERSEV2
170
Jan Eilers31a7c892021-01-29 14:18:13 +0000171- RSQRT
172
Matthew Sloyane369dbd2021-08-19 12:05:44 +0100173- SHAPE
174
Teresa Charlinb1f5f702022-07-12 14:16:24 +0100175- SIN
176
Jan Eilers31a7c892021-01-29 14:18:13 +0000177- SOFTMAX
178
Matthew Sloyana35b40b2021-02-05 17:22:28 +0000179- SPACE_TO_BATCH_ND
180
Jan Eilers31a7c892021-01-29 14:18:13 +0000181- SPACE_TO_DEPTH
182
183- SPLIT
184
185- SPLIT_V
186
187- SQRT
188
John Mcloughlin0ec00872023-05-15 17:03:49 +0100189- SQUARE_DIFFERENCE
190
Matthew Sloyanffa34932022-11-04 11:25:27 +0000191- SQUEEZE
192
Matthew Sloyanf6ed6d42023-05-08 15:01:55 +0100193- SLICE
194
Jan Eilers1121c6b2021-02-19 09:38:03 +0000195- STRIDED_SLICE
196
Jan Eilers31a7c892021-01-29 14:18:13 +0000197- SUB
198
Jan Eilers1121c6b2021-02-19 09:38:03 +0000199- SUM
200
Jan Eilers31a7c892021-01-29 14:18:13 +0000201- TANH
202
Tianle Cheng92ce35c2023-07-25 16:41:00 +0100203- TILE
204
Jan Eilers31a7c892021-01-29 14:18:13 +0000205- TRANSPOSE
206
207- TRANSPOSE_CONV
208
Narumol Prangnawaratbd575b22021-08-31 16:53:54 +0100209- UNIDIRECTIONAL_SEQUENCE_LSTM
210
Kevin Mayc7bd7e82021-05-10 12:46:40 +0100211- UNPACK
212
Jan Eilers31a7c892021-01-29 14:18:13 +0000213More machine learning operators will be supported in future releases.
Colm Donelan09026932022-09-14 18:04:00 +0100214
215@section delegateoptions Delegate Options
216
217The general list of runtime options are described in @subpage runtimeoptions
218
Narumol Prangnawaratcb2ad742023-06-28 13:32:46 +0100219@subsection opaquedelegateoptions Opaque Delegate Options
220
221In Opaque Delegate, delegate options are passed via ArmNNSettings which is a FlatBuffer of tflite::TFLiteSettings.
222
223Arm NN Settings | Possible Values | Description
224:--------------- ------------- | :----- | :----------
225backends | ["GpuAcc"/"CpuAcc"] | A comma separated list without whitespaces of backends which should be used for execution. Falls back to next backend in list if previous does not provide support for operation.
226fastmath | [true/false] | Allows the use of optimisation techniques e.g. Winograd that will reduce execution time with the possibility of a drop in accuracy.
227additional_parameters | JSON string of additional Arm NN delegate options | JSON string of additional Arm NN delegate options. The general list of runtime options are described in [Runtime options](\ref runtimeoptions).
228
Jan Eilers31a7c892021-01-29 14:18:13 +0000229**/
230}