blob: 75ebf9c4ac707febd99f7a633efbb47a050903d2 [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
Teresa Charlin077cddb2023-09-15 15:19:21 +010089- GELU
90
Jan Eilers31a7c892021-01-29 14:18:13 +000091- GREATER
92
Matthew Sloyanffa34932022-11-04 11:25:27 +000093- GREATER_EQUAL
Jan Eilers31a7c892021-01-29 14:18:13 +000094
95- HARD_SWISH
96
Matthew Sloyanffa34932022-11-04 11:25:27 +000097- L2_NORMALIZATION
98
99- L2_POOL_2D
100
Jan Eilers31a7c892021-01-29 14:18:13 +0000101- LESS
102
Matthew Sloyanffa34932022-11-04 11:25:27 +0000103- LESS_EQUAL
Jan Eilers31a7c892021-01-29 14:18:13 +0000104
105- LOCAL_RESPONSE_NORMALIZATION
106
Teresa Charlinb1f5f702022-07-12 14:16:24 +0100107- LOG
108
Jan Eilers31a7c892021-01-29 14:18:13 +0000109- LOGICAL_AND
Jan Eilers1121c6b2021-02-19 09:38:03 +0000110
Jan Eilers31a7c892021-01-29 14:18:13 +0000111- LOGICAL_NOT
Jan Eilers1121c6b2021-02-19 09:38:03 +0000112
Jan Eilers31a7c892021-01-29 14:18:13 +0000113- LOGICAL_OR
114
115- LOGISTIC
116
117- LOG_SOFTMAX
118
Jan Eilers1121c6b2021-02-19 09:38:03 +0000119- LSTM
120
Jan Eilers31a7c892021-01-29 14:18:13 +0000121- MAXIMUM
122
Matthew Sloyanffa34932022-11-04 11:25:27 +0000123- MAX_POOL_2D, Supported Fused Activation: RELU, RELU6, RELU_N1_TO_1, SIGMOID, TANH, NONE
Jan Eilers31a7c892021-01-29 14:18:13 +0000124
Matthew Sloyanffa34932022-11-04 11:25:27 +0000125- MAX_POOL_3D, Supported Fused Activation: RELU, RELU6, RELU_N1_TO_1, SIGMOID, SIGN_BIT, TANH, NONE
Ryan OShead21abaf2022-06-10 14:49:11 +0100126
Jan Eilers31a7c892021-01-29 14:18:13 +0000127- MEAN
128
129- MINIMUM
130
Matthew Sloyanaf3a4ef2021-10-22 15:48:12 +0100131- MIRROR_PAD
132
Jan Eilers31a7c892021-01-29 14:18:13 +0000133- MUL
134
135- NEG
136
137- NOT_EQUAL
138
Kevin Mayc7bd7e82021-05-10 12:46:40 +0100139- PACK
140
Jan Eilers31a7c892021-01-29 14:18:13 +0000141- PAD
142
Matthew Sloyanffa34932022-11-04 11:25:27 +0000143- PADV2
144
John Mcloughlin0ec00872023-05-15 17:03:49 +0100145- POW
146
Jan Eilers1121c6b2021-02-19 09:38:03 +0000147- PRELU
148
Jan Eilers31a7c892021-01-29 14:18:13 +0000149- QUANTIZE
150
Jan Eilers1121c6b2021-02-19 09:38:03 +0000151- RANK
152
153- REDUCE_MAX
154
155- REDUCE_MIN
156
Matthew Sloyanffa34932022-11-04 11:25:27 +0000157- REDUCE_PROD
158
159- RELU
160
161- RELU6
162
163- RELU_N1_TO_1
164
Jan Eilers31a7c892021-01-29 14:18:13 +0000165- RESHAPE
166
167- RESIZE_BILINEAR
168
169- RESIZE_NEAREST_NEIGHBOR
170
Tracy Narine7306bbe2023-07-17 16:06:26 +0100171- REVERSEV2
172
Jan Eilers31a7c892021-01-29 14:18:13 +0000173- RSQRT
174
Kevin May93bbf002024-03-11 09:31:10 +0000175- SCATTERND
176
Matthew Sloyane369dbd2021-08-19 12:05:44 +0100177- SHAPE
178
Teresa Charlinb1f5f702022-07-12 14:16:24 +0100179- SIN
180
Jan Eilers31a7c892021-01-29 14:18:13 +0000181- SOFTMAX
182
Matthew Sloyana35b40b2021-02-05 17:22:28 +0000183- SPACE_TO_BATCH_ND
184
Jan Eilers31a7c892021-01-29 14:18:13 +0000185- SPACE_TO_DEPTH
186
187- SPLIT
188
189- SPLIT_V
190
191- SQRT
192
John Mcloughlin0ec00872023-05-15 17:03:49 +0100193- SQUARE_DIFFERENCE
194
Matthew Sloyanffa34932022-11-04 11:25:27 +0000195- SQUEEZE
196
Matthew Sloyanf6ed6d42023-05-08 15:01:55 +0100197- SLICE
198
Jan Eilers1121c6b2021-02-19 09:38:03 +0000199- STRIDED_SLICE
200
Jan Eilers31a7c892021-01-29 14:18:13 +0000201- SUB
202
Jan Eilers1121c6b2021-02-19 09:38:03 +0000203- SUM
204
Jan Eilers31a7c892021-01-29 14:18:13 +0000205- TANH
206
Tianle Cheng92ce35c2023-07-25 16:41:00 +0100207- TILE
208
Jan Eilers31a7c892021-01-29 14:18:13 +0000209- TRANSPOSE
210
211- TRANSPOSE_CONV
212
Narumol Prangnawaratbd575b22021-08-31 16:53:54 +0100213- UNIDIRECTIONAL_SEQUENCE_LSTM
214
Kevin Mayc7bd7e82021-05-10 12:46:40 +0100215- UNPACK
216
Jan Eilers31a7c892021-01-29 14:18:13 +0000217More machine learning operators will be supported in future releases.
Colm Donelan09026932022-09-14 18:04:00 +0100218
219@section delegateoptions Delegate Options
220
221The general list of runtime options are described in @subpage runtimeoptions
222
Narumol Prangnawaratcb2ad742023-06-28 13:32:46 +0100223@subsection opaquedelegateoptions Opaque Delegate Options
224
225In Opaque Delegate, delegate options are passed via ArmNNSettings which is a FlatBuffer of tflite::TFLiteSettings.
226
227Arm NN Settings | Possible Values | Description
228:--------------- ------------- | :----- | :----------
229backends | ["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.
230fastmath | [true/false] | Allows the use of optimisation techniques e.g. Winograd that will reduce execution time with the possibility of a drop in accuracy.
231additional_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).
232
Jan Eilers31a7c892021-01-29 14:18:13 +0000233**/
234}