Teresa Charlin | b1f5f70 | 2022-07-12 14:16:24 +0100 | [diff] [blame] | 1 | /// Copyright (c) 2022 ARM Limited and Contributors. All rights reserved. |
Jan Eilers | 31a7c89 | 2021-01-29 14:18:13 +0000 | [diff] [blame] | 2 | /// |
| 3 | /// SPDX-License-Identifier: MIT |
| 4 | /// |
| 5 | |
| 6 | namespace 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 |
| 15 | integrated in TfLite using its delegation mechanism. TfLite will then delegate the execution of operators supported by |
| 16 | Arm NN to Arm NN. |
| 17 | |
| 18 | The main difference to our @ref S6_tf_lite_parser is the amount of operators you can run with it. If none of the active |
| 19 | backends support an operation in your model you won't be able to execute it with our parser. In contrast to that, TfLite |
| 20 | only delegates operations to the armnnDelegate if it does support them and otherwise executes them itself. In other |
| 21 | words, every TfLite model can be executed and every operation in your model that we can accelerate will be accelerated. |
| 22 | That is the reason why the armnnDelegate is our recommended way to accelerate TfLite models. |
| 23 | |
| 24 | If you need help building the armnnDelegate, please take a look at our [build guide](delegate/BuildGuideNative.md). |
| 25 | An example how to setup TfLite to integrate the armnnDelegate can be found in this |
| 26 | guide: [Integrate the delegate into python](delegate/IntegrateDelegateIntoPython.md) |
| 27 | |
| 28 | |
| 29 | @section delegatesupport Supported Operators |
| 30 | This reference guide provides a list of TensorFlow Lite operators the Arm NN SDK currently supports. |
| 31 | |
| 32 | @subsection delegatefullysupported Fully supported |
| 33 | |
| 34 | The Arm NN SDK TensorFlow Lite delegate currently supports the following operators: |
| 35 | |
| 36 | - ABS |
| 37 | |
| 38 | - ADD |
| 39 | |
Matthew Sloyan | ffa3493 | 2022-11-04 11:25:27 +0000 | [diff] [blame] | 40 | - ARG_MAX |
Jan Eilers | 31a7c89 | 2021-01-29 14:18:13 +0000 | [diff] [blame] | 41 | |
Matthew Sloyan | ffa3493 | 2022-11-04 11:25:27 +0000 | [diff] [blame] | 42 | - ARG_MIN |
Jan Eilers | 31a7c89 | 2021-01-29 14:18:13 +0000 | [diff] [blame] | 43 | |
Matthew Sloyan | ffa3493 | 2022-11-04 11:25:27 +0000 | [diff] [blame] | 44 | - AVERAGE_POOL_2D, Supported Fused Activation: RELU, RELU6, RELU_N1_TO_1, SIGMOID, TANH, NONE |
Jan Eilers | 31a7c89 | 2021-01-29 14:18:13 +0000 | [diff] [blame] | 45 | |
Matthew Sloyan | ffa3493 | 2022-11-04 11:25:27 +0000 | [diff] [blame] | 46 | - AVERAGE_POOL_3D, Supported Fused Activation: RELU, RELU6, RELU_N1_TO_1, SIGMOID, SIGN_BIT, TANH, NONE |
Ryan OShea | d21abaf | 2022-06-10 14:49:11 +0100 | [diff] [blame] | 47 | |
Ryan OShea | 49ed0df | 2022-09-21 16:09:41 +0100 | [diff] [blame] | 48 | - BATCH_MATMUL |
| 49 | |
Matthew Sloyan | a35b40b | 2021-02-05 17:22:28 +0000 | [diff] [blame] | 50 | - BATCH_TO_SPACE_ND |
| 51 | |
Sadik Armagan | 937565b | 2021-04-21 14:03:28 +0100 | [diff] [blame] | 52 | - CAST |
| 53 | |
Matthew Sloyan | f6ed6d4 | 2023-05-08 15:01:55 +0100 | [diff] [blame] | 54 | - CEIL |
| 55 | |
Matthew Sloyan | ffa3493 | 2022-11-04 11:25:27 +0000 | [diff] [blame] | 56 | - CONCATENATION, Supported Fused Activation: RELU, RELU6, RELU_N1_TO_1, SIGMOID, TANH, NONE |
Jan Eilers | 31a7c89 | 2021-01-29 14:18:13 +0000 | [diff] [blame] | 57 | |
Matthew Sloyan | ffa3493 | 2022-11-04 11:25:27 +0000 | [diff] [blame] | 58 | - CONV_2D, Supported Fused Activation: RELU, RELU6, RELU_N1_TO_1, SIGMOID, TANH, NONE |
Jan Eilers | 31a7c89 | 2021-01-29 14:18:13 +0000 | [diff] [blame] | 59 | |
Matthew Sloyan | ffa3493 | 2022-11-04 11:25:27 +0000 | [diff] [blame] | 60 | - CONV_3D, Supported Fused Activation: RELU, RELU6, RELU_N1_TO_1, SIGMOID, TANH, NONE |
Matthew Sloyan | 81ec994 | 2021-10-12 10:26:30 +0100 | [diff] [blame] | 61 | |
Jan Eilers | 31a7c89 | 2021-01-29 14:18:13 +0000 | [diff] [blame] | 62 | - DEPTH_TO_SPACE |
| 63 | |
Matthew Sloyan | ffa3493 | 2022-11-04 11:25:27 +0000 | [diff] [blame] | 64 | - DEPTHWISE_CONV_2D, Supported Fused Activation: RELU, RELU6, RELU_N1_TO_1, SIGMOID, TANH, NONE |
Jan Eilers | 31a7c89 | 2021-01-29 14:18:13 +0000 | [diff] [blame] | 65 | |
| 66 | - DEQUANTIZE |
| 67 | |
| 68 | - DIV |
| 69 | |
| 70 | - EQUAL |
| 71 | |
| 72 | - ELU |
| 73 | |
| 74 | - EXP |
| 75 | |
Matthew Sloyan | ffa3493 | 2022-11-04 11:25:27 +0000 | [diff] [blame] | 76 | - EXPAND_DIMS |
| 77 | |
| 78 | - FILL |
Jan Eilers | 31a7c89 | 2021-01-29 14:18:13 +0000 | [diff] [blame] | 79 | |
Sadik Armagan | 788e2c6 | 2021-02-10 16:26:44 +0000 | [diff] [blame] | 80 | - FLOOR |
| 81 | |
Matthew Sloyan | ffa3493 | 2022-11-04 11:25:27 +0000 | [diff] [blame] | 82 | - FLOOR_DIV |
| 83 | |
| 84 | - FULLY_CONNECTED, Supported Fused Activation: RELU, RELU6, RELU_N1_TO_1, SIGMOID, TANH, NONE |
| 85 | |
Jan Eilers | 31a7c89 | 2021-01-29 14:18:13 +0000 | [diff] [blame] | 86 | - GATHER |
| 87 | |
Teresa Charlin | d5c0ed2 | 2022-04-25 18:23:41 +0100 | [diff] [blame] | 88 | - GATHER_ND |
| 89 | |
Jan Eilers | 31a7c89 | 2021-01-29 14:18:13 +0000 | [diff] [blame] | 90 | - GREATER |
| 91 | |
Matthew Sloyan | ffa3493 | 2022-11-04 11:25:27 +0000 | [diff] [blame] | 92 | - GREATER_EQUAL |
Jan Eilers | 31a7c89 | 2021-01-29 14:18:13 +0000 | [diff] [blame] | 93 | |
| 94 | - HARD_SWISH |
| 95 | |
Matthew Sloyan | ffa3493 | 2022-11-04 11:25:27 +0000 | [diff] [blame] | 96 | - L2_NORMALIZATION |
| 97 | |
| 98 | - L2_POOL_2D |
| 99 | |
Jan Eilers | 31a7c89 | 2021-01-29 14:18:13 +0000 | [diff] [blame] | 100 | - LESS |
| 101 | |
Matthew Sloyan | ffa3493 | 2022-11-04 11:25:27 +0000 | [diff] [blame] | 102 | - LESS_EQUAL |
Jan Eilers | 31a7c89 | 2021-01-29 14:18:13 +0000 | [diff] [blame] | 103 | |
| 104 | - LOCAL_RESPONSE_NORMALIZATION |
| 105 | |
Teresa Charlin | b1f5f70 | 2022-07-12 14:16:24 +0100 | [diff] [blame] | 106 | - LOG |
| 107 | |
Jan Eilers | 31a7c89 | 2021-01-29 14:18:13 +0000 | [diff] [blame] | 108 | - LOGICAL_AND |
Jan Eilers | 1121c6b | 2021-02-19 09:38:03 +0000 | [diff] [blame] | 109 | |
Jan Eilers | 31a7c89 | 2021-01-29 14:18:13 +0000 | [diff] [blame] | 110 | - LOGICAL_NOT |
Jan Eilers | 1121c6b | 2021-02-19 09:38:03 +0000 | [diff] [blame] | 111 | |
Jan Eilers | 31a7c89 | 2021-01-29 14:18:13 +0000 | [diff] [blame] | 112 | - LOGICAL_OR |
| 113 | |
| 114 | - LOGISTIC |
| 115 | |
| 116 | - LOG_SOFTMAX |
| 117 | |
Jan Eilers | 1121c6b | 2021-02-19 09:38:03 +0000 | [diff] [blame] | 118 | - LSTM |
| 119 | |
Jan Eilers | 31a7c89 | 2021-01-29 14:18:13 +0000 | [diff] [blame] | 120 | - MAXIMUM |
| 121 | |
Matthew Sloyan | ffa3493 | 2022-11-04 11:25:27 +0000 | [diff] [blame] | 122 | - MAX_POOL_2D, Supported Fused Activation: RELU, RELU6, RELU_N1_TO_1, SIGMOID, TANH, NONE |
Jan Eilers | 31a7c89 | 2021-01-29 14:18:13 +0000 | [diff] [blame] | 123 | |
Matthew Sloyan | ffa3493 | 2022-11-04 11:25:27 +0000 | [diff] [blame] | 124 | - MAX_POOL_3D, Supported Fused Activation: RELU, RELU6, RELU_N1_TO_1, SIGMOID, SIGN_BIT, TANH, NONE |
Ryan OShea | d21abaf | 2022-06-10 14:49:11 +0100 | [diff] [blame] | 125 | |
Jan Eilers | 31a7c89 | 2021-01-29 14:18:13 +0000 | [diff] [blame] | 126 | - MEAN |
| 127 | |
| 128 | - MINIMUM |
| 129 | |
Matthew Sloyan | af3a4ef | 2021-10-22 15:48:12 +0100 | [diff] [blame] | 130 | - MIRROR_PAD |
| 131 | |
Jan Eilers | 31a7c89 | 2021-01-29 14:18:13 +0000 | [diff] [blame] | 132 | - MUL |
| 133 | |
| 134 | - NEG |
| 135 | |
| 136 | - NOT_EQUAL |
| 137 | |
Kevin May | c7bd7e8 | 2021-05-10 12:46:40 +0100 | [diff] [blame] | 138 | - PACK |
| 139 | |
Jan Eilers | 31a7c89 | 2021-01-29 14:18:13 +0000 | [diff] [blame] | 140 | - PAD |
| 141 | |
Matthew Sloyan | ffa3493 | 2022-11-04 11:25:27 +0000 | [diff] [blame] | 142 | - PADV2 |
| 143 | |
John Mcloughlin | 0ec0087 | 2023-05-15 17:03:49 +0100 | [diff] [blame^] | 144 | - POW |
| 145 | |
Jan Eilers | 1121c6b | 2021-02-19 09:38:03 +0000 | [diff] [blame] | 146 | - PRELU |
| 147 | |
Jan Eilers | 31a7c89 | 2021-01-29 14:18:13 +0000 | [diff] [blame] | 148 | - QUANTIZE |
| 149 | |
Jan Eilers | 1121c6b | 2021-02-19 09:38:03 +0000 | [diff] [blame] | 150 | - RANK |
| 151 | |
| 152 | - REDUCE_MAX |
| 153 | |
| 154 | - REDUCE_MIN |
| 155 | |
Matthew Sloyan | ffa3493 | 2022-11-04 11:25:27 +0000 | [diff] [blame] | 156 | - REDUCE_PROD |
| 157 | |
| 158 | - RELU |
| 159 | |
| 160 | - RELU6 |
| 161 | |
| 162 | - RELU_N1_TO_1 |
| 163 | |
Jan Eilers | 31a7c89 | 2021-01-29 14:18:13 +0000 | [diff] [blame] | 164 | - RESHAPE |
| 165 | |
| 166 | - RESIZE_BILINEAR |
| 167 | |
| 168 | - RESIZE_NEAREST_NEIGHBOR |
| 169 | |
Jan Eilers | 31a7c89 | 2021-01-29 14:18:13 +0000 | [diff] [blame] | 170 | - RSQRT |
| 171 | |
Matthew Sloyan | e369dbd | 2021-08-19 12:05:44 +0100 | [diff] [blame] | 172 | - SHAPE |
| 173 | |
Teresa Charlin | b1f5f70 | 2022-07-12 14:16:24 +0100 | [diff] [blame] | 174 | - SIN |
| 175 | |
Jan Eilers | 31a7c89 | 2021-01-29 14:18:13 +0000 | [diff] [blame] | 176 | - SOFTMAX |
| 177 | |
Matthew Sloyan | a35b40b | 2021-02-05 17:22:28 +0000 | [diff] [blame] | 178 | - SPACE_TO_BATCH_ND |
| 179 | |
Jan Eilers | 31a7c89 | 2021-01-29 14:18:13 +0000 | [diff] [blame] | 180 | - SPACE_TO_DEPTH |
| 181 | |
| 182 | - SPLIT |
| 183 | |
| 184 | - SPLIT_V |
| 185 | |
| 186 | - SQRT |
| 187 | |
John Mcloughlin | 0ec0087 | 2023-05-15 17:03:49 +0100 | [diff] [blame^] | 188 | - SQUARE_DIFFERENCE |
| 189 | |
Matthew Sloyan | ffa3493 | 2022-11-04 11:25:27 +0000 | [diff] [blame] | 190 | - SQUEEZE |
| 191 | |
Matthew Sloyan | f6ed6d4 | 2023-05-08 15:01:55 +0100 | [diff] [blame] | 192 | - SLICE |
| 193 | |
Jan Eilers | 1121c6b | 2021-02-19 09:38:03 +0000 | [diff] [blame] | 194 | - STRIDED_SLICE |
| 195 | |
Jan Eilers | 31a7c89 | 2021-01-29 14:18:13 +0000 | [diff] [blame] | 196 | - SUB |
| 197 | |
Jan Eilers | 1121c6b | 2021-02-19 09:38:03 +0000 | [diff] [blame] | 198 | - SUM |
| 199 | |
Jan Eilers | 31a7c89 | 2021-01-29 14:18:13 +0000 | [diff] [blame] | 200 | - TANH |
| 201 | |
| 202 | - TRANSPOSE |
| 203 | |
| 204 | - TRANSPOSE_CONV |
| 205 | |
Narumol Prangnawarat | bd575b2 | 2021-08-31 16:53:54 +0100 | [diff] [blame] | 206 | - UNIDIRECTIONAL_SEQUENCE_LSTM |
| 207 | |
Kevin May | c7bd7e8 | 2021-05-10 12:46:40 +0100 | [diff] [blame] | 208 | - UNPACK |
| 209 | |
Jan Eilers | 31a7c89 | 2021-01-29 14:18:13 +0000 | [diff] [blame] | 210 | More machine learning operators will be supported in future releases. |
Colm Donelan | 0902693 | 2022-09-14 18:04:00 +0100 | [diff] [blame] | 211 | |
| 212 | @section delegateoptions Delegate Options |
| 213 | |
| 214 | The general list of runtime options are described in @subpage runtimeoptions |
| 215 | |
Jan Eilers | 31a7c89 | 2021-01-29 14:18:13 +0000 | [diff] [blame] | 216 | **/ |
| 217 | } |