blob: 624f06f7c2c6c477f10df18edd522c8389dcb8af [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
Sadik Armagan937565b2021-04-21 14:03:28 +010049- CAST
50
Matthew Sloyanf6ed6d42023-05-08 15:01:55 +010051- CEIL
52
Matthew Sloyanffa34932022-11-04 11:25:27 +000053- CONCATENATION, Supported Fused Activation: RELU, RELU6, RELU_N1_TO_1, SIGMOID, TANH, NONE
Jan Eilers31a7c892021-01-29 14:18:13 +000054
Matthew Sloyanffa34932022-11-04 11:25:27 +000055- CONV_2D, 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_3D, Supported Fused Activation: RELU, RELU6, RELU_N1_TO_1, SIGMOID, TANH, NONE
Matthew Sloyan81ec9942021-10-12 10:26:30 +010058
Jan Eilers31a7c892021-01-29 14:18:13 +000059- DEPTH_TO_SPACE
60
Matthew Sloyanffa34932022-11-04 11:25:27 +000061- DEPTHWISE_CONV_2D, Supported Fused Activation: RELU, RELU6, RELU_N1_TO_1, SIGMOID, TANH, NONE
Jan Eilers31a7c892021-01-29 14:18:13 +000062
63- DEQUANTIZE
64
65- DIV
66
67- EQUAL
68
69- ELU
70
71- EXP
72
Matthew Sloyanffa34932022-11-04 11:25:27 +000073- EXPAND_DIMS
74
75- FILL
Jan Eilers31a7c892021-01-29 14:18:13 +000076
Sadik Armagan788e2c62021-02-10 16:26:44 +000077- FLOOR
78
Matthew Sloyanffa34932022-11-04 11:25:27 +000079- FLOOR_DIV
80
81- FULLY_CONNECTED, Supported Fused Activation: RELU, RELU6, RELU_N1_TO_1, SIGMOID, TANH, NONE
82
Jan Eilers31a7c892021-01-29 14:18:13 +000083- GATHER
84
Teresa Charlind5c0ed22022-04-25 18:23:41 +010085- GATHER_ND
86
Jan Eilers31a7c892021-01-29 14:18:13 +000087- GREATER
88
Matthew Sloyanffa34932022-11-04 11:25:27 +000089- GREATER_EQUAL
Jan Eilers31a7c892021-01-29 14:18:13 +000090
91- HARD_SWISH
92
Matthew Sloyanffa34932022-11-04 11:25:27 +000093- L2_NORMALIZATION
94
95- L2_POOL_2D
96
Jan Eilers31a7c892021-01-29 14:18:13 +000097- LESS
98
Matthew Sloyanffa34932022-11-04 11:25:27 +000099- LESS_EQUAL
Jan Eilers31a7c892021-01-29 14:18:13 +0000100
101- LOCAL_RESPONSE_NORMALIZATION
102
Teresa Charlinb1f5f702022-07-12 14:16:24 +0100103- LOG
104
Jan Eilers31a7c892021-01-29 14:18:13 +0000105- LOGICAL_AND
Jan Eilers1121c6b2021-02-19 09:38:03 +0000106
Jan Eilers31a7c892021-01-29 14:18:13 +0000107- LOGICAL_NOT
Jan Eilers1121c6b2021-02-19 09:38:03 +0000108
Jan Eilers31a7c892021-01-29 14:18:13 +0000109- LOGICAL_OR
110
111- LOGISTIC
112
113- LOG_SOFTMAX
114
Jan Eilers1121c6b2021-02-19 09:38:03 +0000115- LSTM
116
Jan Eilers31a7c892021-01-29 14:18:13 +0000117- MAXIMUM
118
Matthew Sloyanffa34932022-11-04 11:25:27 +0000119- MAX_POOL_2D, Supported Fused Activation: RELU, RELU6, RELU_N1_TO_1, SIGMOID, TANH, NONE
Jan Eilers31a7c892021-01-29 14:18:13 +0000120
Matthew Sloyanffa34932022-11-04 11:25:27 +0000121- MAX_POOL_3D, Supported Fused Activation: RELU, RELU6, RELU_N1_TO_1, SIGMOID, SIGN_BIT, TANH, NONE
Ryan OShead21abaf2022-06-10 14:49:11 +0100122
Jan Eilers31a7c892021-01-29 14:18:13 +0000123- MEAN
124
125- MINIMUM
126
Matthew Sloyanaf3a4ef2021-10-22 15:48:12 +0100127- MIRROR_PAD
128
Jan Eilers31a7c892021-01-29 14:18:13 +0000129- MUL
130
131- NEG
132
133- NOT_EQUAL
134
Kevin Mayc7bd7e82021-05-10 12:46:40 +0100135- PACK
136
Jan Eilers31a7c892021-01-29 14:18:13 +0000137- PAD
138
Matthew Sloyanffa34932022-11-04 11:25:27 +0000139- PADV2
140
John Mcloughlin0ec00872023-05-15 17:03:49 +0100141- POW
142
Jan Eilers1121c6b2021-02-19 09:38:03 +0000143- PRELU
144
Jan Eilers31a7c892021-01-29 14:18:13 +0000145- QUANTIZE
146
Jan Eilers1121c6b2021-02-19 09:38:03 +0000147- RANK
148
149- REDUCE_MAX
150
151- REDUCE_MIN
152
Matthew Sloyanffa34932022-11-04 11:25:27 +0000153- REDUCE_PROD
154
155- RELU
156
157- RELU6
158
159- RELU_N1_TO_1
160
Jan Eilers31a7c892021-01-29 14:18:13 +0000161- RESHAPE
162
163- RESIZE_BILINEAR
164
165- RESIZE_NEAREST_NEIGHBOR
166
Tracy Narine7306bbe2023-07-17 16:06:26 +0100167- REVERSEV2
168
Jan Eilers31a7c892021-01-29 14:18:13 +0000169- RSQRT
170
Matthew Sloyane369dbd2021-08-19 12:05:44 +0100171- SHAPE
172
Teresa Charlinb1f5f702022-07-12 14:16:24 +0100173- SIN
174
Jan Eilers31a7c892021-01-29 14:18:13 +0000175- SOFTMAX
176
Matthew Sloyana35b40b2021-02-05 17:22:28 +0000177- SPACE_TO_BATCH_ND
178
Jan Eilers31a7c892021-01-29 14:18:13 +0000179- SPACE_TO_DEPTH
180
181- SPLIT
182
183- SPLIT_V
184
185- SQRT
186
John Mcloughlin0ec00872023-05-15 17:03:49 +0100187- SQUARE_DIFFERENCE
188
Matthew Sloyanffa34932022-11-04 11:25:27 +0000189- SQUEEZE
190
Matthew Sloyanf6ed6d42023-05-08 15:01:55 +0100191- SLICE
192
Jan Eilers1121c6b2021-02-19 09:38:03 +0000193- STRIDED_SLICE
194
Jan Eilers31a7c892021-01-29 14:18:13 +0000195- SUB
196
Jan Eilers1121c6b2021-02-19 09:38:03 +0000197- SUM
198
Jan Eilers31a7c892021-01-29 14:18:13 +0000199- TANH
200
Tianle Cheng92ce35c2023-07-25 16:41:00 +0100201- TILE
202
Jan Eilers31a7c892021-01-29 14:18:13 +0000203- TRANSPOSE
204
205- TRANSPOSE_CONV
206
Narumol Prangnawaratbd575b22021-08-31 16:53:54 +0100207- UNIDIRECTIONAL_SEQUENCE_LSTM
208
Kevin Mayc7bd7e82021-05-10 12:46:40 +0100209- UNPACK
210
Jan Eilers31a7c892021-01-29 14:18:13 +0000211More machine learning operators will be supported in future releases.
Colm Donelan09026932022-09-14 18:04:00 +0100212
213@section delegateoptions Delegate Options
214
215The general list of runtime options are described in @subpage runtimeoptions
216
Narumol Prangnawaratcb2ad742023-06-28 13:32:46 +0100217@subsection opaquedelegateoptions Opaque Delegate Options
218
219In Opaque Delegate, delegate options are passed via ArmNNSettings which is a FlatBuffer of tflite::TFLiteSettings.
220
221Arm NN Settings | Possible Values | Description
222:--------------- ------------- | :----- | :----------
223backends | ["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.
224fastmath | [true/false] | Allows the use of optimisation techniques e.g. Winograd that will reduce execution time with the possibility of a drop in accuracy.
225additional_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).
226
Jan Eilers31a7c892021-01-29 14:18:13 +0000227**/
228}