blob: 632afa0cf0bb47f92813a080ebb78509fca2a580 [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
10@tableofcontents
11
12
13@section delegateintro About the delegate
14'armnnDelegate' is a library for accelerating certain TensorFlow Lite (TfLite) operators on Arm hardware. It can be
15integrated in TfLite using its delegation mechanism. TfLite will then delegate the execution of operators supported by
16Arm NN to Arm NN.
17
18The main difference to our @ref S6_tf_lite_parser is the amount of operators you can run with it. If none of the active
19backends support an operation in your model you won't be able to execute it with our parser. In contrast to that, TfLite
20only delegates operations to the armnnDelegate if it does support them and otherwise executes them itself. In other
21words, every TfLite model can be executed and every operation in your model that we can accelerate will be accelerated.
22That is the reason why the armnnDelegate is our recommended way to accelerate TfLite models.
23
24If you need help building the armnnDelegate, please take a look at our [build guide](delegate/BuildGuideNative.md).
25An example how to setup TfLite to integrate the armnnDelegate can be found in this
26guide: [Integrate the delegate into python](delegate/IntegrateDelegateIntoPython.md)
27
28
29@section delegatesupport Supported Operators
30This reference guide provides a list of TensorFlow Lite operators the Arm NN SDK currently supports.
31
32@subsection delegatefullysupported Fully supported
33
34The Arm NN SDK TensorFlow Lite delegate currently supports the following operators:
35
36- ABS
37
38- ADD
39
Matthew Sloyanffa34932022-11-04 11:25:27 +000040- ARG_MAX
Jan Eilers31a7c892021-01-29 14:18:13 +000041
Matthew Sloyanffa34932022-11-04 11:25:27 +000042- ARG_MIN
Jan Eilers31a7c892021-01-29 14:18:13 +000043
Matthew Sloyanffa34932022-11-04 11:25:27 +000044- AVERAGE_POOL_2D, Supported Fused Activation: RELU, RELU6, RELU_N1_TO_1, SIGMOID, TANH, NONE
Jan Eilers31a7c892021-01-29 14:18:13 +000045
Matthew Sloyanffa34932022-11-04 11:25:27 +000046- AVERAGE_POOL_3D, Supported Fused Activation: RELU, RELU6, RELU_N1_TO_1, SIGMOID, SIGN_BIT, TANH, NONE
Ryan OShead21abaf2022-06-10 14:49:11 +010047
Ryan OShea49ed0df2022-09-21 16:09:41 +010048- BATCH_MATMUL
49
Matthew Sloyana35b40b2021-02-05 17:22:28 +000050- BATCH_TO_SPACE_ND
51
Sadik Armagan937565b2021-04-21 14:03:28 +010052- CAST
53
Matthew Sloyanf6ed6d42023-05-08 15:01:55 +010054- CEIL
55
Matthew Sloyanffa34932022-11-04 11:25:27 +000056- CONCATENATION, Supported Fused Activation: RELU, RELU6, RELU_N1_TO_1, SIGMOID, TANH, NONE
Jan Eilers31a7c892021-01-29 14:18:13 +000057
Matthew Sloyanffa34932022-11-04 11:25:27 +000058- CONV_2D, Supported Fused Activation: RELU, RELU6, RELU_N1_TO_1, SIGMOID, TANH, NONE
Jan Eilers31a7c892021-01-29 14:18:13 +000059
Matthew Sloyanffa34932022-11-04 11:25:27 +000060- CONV_3D, Supported Fused Activation: RELU, RELU6, RELU_N1_TO_1, SIGMOID, TANH, NONE
Matthew Sloyan81ec9942021-10-12 10:26:30 +010061
Jan Eilers31a7c892021-01-29 14:18:13 +000062- DEPTH_TO_SPACE
63
Matthew Sloyanffa34932022-11-04 11:25:27 +000064- DEPTHWISE_CONV_2D, Supported Fused Activation: RELU, RELU6, RELU_N1_TO_1, SIGMOID, TANH, NONE
Jan Eilers31a7c892021-01-29 14:18:13 +000065
66- DEQUANTIZE
67
68- DIV
69
70- EQUAL
71
72- ELU
73
74- EXP
75
Matthew Sloyanffa34932022-11-04 11:25:27 +000076- EXPAND_DIMS
77
78- FILL
Jan Eilers31a7c892021-01-29 14:18:13 +000079
Sadik Armagan788e2c62021-02-10 16:26:44 +000080- FLOOR
81
Matthew Sloyanffa34932022-11-04 11:25:27 +000082- FLOOR_DIV
83
84- FULLY_CONNECTED, Supported Fused Activation: RELU, RELU6, RELU_N1_TO_1, SIGMOID, TANH, NONE
85
Jan Eilers31a7c892021-01-29 14:18:13 +000086- GATHER
87
Teresa Charlind5c0ed22022-04-25 18:23:41 +010088- GATHER_ND
89
Jan Eilers31a7c892021-01-29 14:18:13 +000090- GREATER
91
Matthew Sloyanffa34932022-11-04 11:25:27 +000092- GREATER_EQUAL
Jan Eilers31a7c892021-01-29 14:18:13 +000093
94- HARD_SWISH
95
Matthew Sloyanffa34932022-11-04 11:25:27 +000096- L2_NORMALIZATION
97
98- L2_POOL_2D
99
Jan Eilers31a7c892021-01-29 14:18:13 +0000100- LESS
101
Matthew Sloyanffa34932022-11-04 11:25:27 +0000102- LESS_EQUAL
Jan Eilers31a7c892021-01-29 14:18:13 +0000103
104- LOCAL_RESPONSE_NORMALIZATION
105
Teresa Charlinb1f5f702022-07-12 14:16:24 +0100106- LOG
107
Jan Eilers31a7c892021-01-29 14:18:13 +0000108- LOGICAL_AND
Jan Eilers1121c6b2021-02-19 09:38:03 +0000109
Jan Eilers31a7c892021-01-29 14:18:13 +0000110- LOGICAL_NOT
Jan Eilers1121c6b2021-02-19 09:38:03 +0000111
Jan Eilers31a7c892021-01-29 14:18:13 +0000112- LOGICAL_OR
113
114- LOGISTIC
115
116- LOG_SOFTMAX
117
Jan Eilers1121c6b2021-02-19 09:38:03 +0000118- LSTM
119
Jan Eilers31a7c892021-01-29 14:18:13 +0000120- MAXIMUM
121
Matthew Sloyanffa34932022-11-04 11:25:27 +0000122- MAX_POOL_2D, Supported Fused Activation: RELU, RELU6, RELU_N1_TO_1, SIGMOID, TANH, NONE
Jan Eilers31a7c892021-01-29 14:18:13 +0000123
Matthew Sloyanffa34932022-11-04 11:25:27 +0000124- MAX_POOL_3D, Supported Fused Activation: RELU, RELU6, RELU_N1_TO_1, SIGMOID, SIGN_BIT, TANH, NONE
Ryan OShead21abaf2022-06-10 14:49:11 +0100125
Jan Eilers31a7c892021-01-29 14:18:13 +0000126- MEAN
127
128- MINIMUM
129
Matthew Sloyanaf3a4ef2021-10-22 15:48:12 +0100130- MIRROR_PAD
131
Jan Eilers31a7c892021-01-29 14:18:13 +0000132- MUL
133
134- NEG
135
136- NOT_EQUAL
137
Kevin Mayc7bd7e82021-05-10 12:46:40 +0100138- PACK
139
Jan Eilers31a7c892021-01-29 14:18:13 +0000140- PAD
141
Matthew Sloyanffa34932022-11-04 11:25:27 +0000142- PADV2
143
John Mcloughlin0ec00872023-05-15 17:03:49 +0100144- POW
145
Jan Eilers1121c6b2021-02-19 09:38:03 +0000146- PRELU
147
Jan Eilers31a7c892021-01-29 14:18:13 +0000148- QUANTIZE
149
Jan Eilers1121c6b2021-02-19 09:38:03 +0000150- RANK
151
152- REDUCE_MAX
153
154- REDUCE_MIN
155
Matthew Sloyanffa34932022-11-04 11:25:27 +0000156- REDUCE_PROD
157
158- RELU
159
160- RELU6
161
162- RELU_N1_TO_1
163
Jan Eilers31a7c892021-01-29 14:18:13 +0000164- RESHAPE
165
166- RESIZE_BILINEAR
167
168- RESIZE_NEAREST_NEIGHBOR
169
Tracy Narine7306bbe2023-07-17 16:06:26 +0100170- REVERSEV2
171
Jan Eilers31a7c892021-01-29 14:18:13 +0000172- RSQRT
173
Matthew Sloyane369dbd2021-08-19 12:05:44 +0100174- SHAPE
175
Teresa Charlinb1f5f702022-07-12 14:16:24 +0100176- SIN
177
Jan Eilers31a7c892021-01-29 14:18:13 +0000178- SOFTMAX
179
Matthew Sloyana35b40b2021-02-05 17:22:28 +0000180- SPACE_TO_BATCH_ND
181
Jan Eilers31a7c892021-01-29 14:18:13 +0000182- SPACE_TO_DEPTH
183
184- SPLIT
185
186- SPLIT_V
187
188- SQRT
189
John Mcloughlin0ec00872023-05-15 17:03:49 +0100190- SQUARE_DIFFERENCE
191
Matthew Sloyanffa34932022-11-04 11:25:27 +0000192- SQUEEZE
193
Matthew Sloyanf6ed6d42023-05-08 15:01:55 +0100194- SLICE
195
Jan Eilers1121c6b2021-02-19 09:38:03 +0000196- STRIDED_SLICE
197
Jan Eilers31a7c892021-01-29 14:18:13 +0000198- SUB
199
Jan Eilers1121c6b2021-02-19 09:38:03 +0000200- SUM
201
Jan Eilers31a7c892021-01-29 14:18:13 +0000202- TANH
203
204- TRANSPOSE
205
206- TRANSPOSE_CONV
207
Narumol Prangnawaratbd575b22021-08-31 16:53:54 +0100208- UNIDIRECTIONAL_SEQUENCE_LSTM
209
Kevin Mayc7bd7e82021-05-10 12:46:40 +0100210- UNPACK
211
Jan Eilers31a7c892021-01-29 14:18:13 +0000212More machine learning operators will be supported in future releases.
Colm Donelan09026932022-09-14 18:04:00 +0100213
214@section delegateoptions Delegate Options
215
216The general list of runtime options are described in @subpage runtimeoptions
217
Narumol Prangnawaratcb2ad742023-06-28 13:32:46 +0100218@subsection opaquedelegateoptions Opaque Delegate Options
219
220In Opaque Delegate, delegate options are passed via ArmNNSettings which is a FlatBuffer of tflite::TFLiteSettings.
221
222Arm NN Settings | Possible Values | Description
223:--------------- ------------- | :----- | :----------
224backends | ["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.
225fastmath | [true/false] | Allows the use of optimisation techniques e.g. Winograd that will reduce execution time with the possibility of a drop in accuracy.
226additional_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).
227
Jan Eilers31a7c892021-01-29 14:18:13 +0000228**/
229}