blob: 6977d27cb63f3d12f081a03826a27b4a895d3008 [file] [log] [blame]
Gian Marcoe75a02b2017-11-08 12:24:09 +00001/*
Michele Di Giorgiod9eaf612020-07-08 11:12:57 +01002 * Copyright (c) 2017-2020 Arm Limited.
Gian Marcoe75a02b2017-11-08 12:24:09 +00003 *
4 * SPDX-License-Identifier: MIT
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to
8 * deal in the Software without restriction, including without limitation the
9 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10 * sell copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in all
14 * copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 * SOFTWARE.
23 */
Michalis Spyrouf4643372019-11-29 16:17:13 +000024#ifndef ARM_COMPUTE_NEGEMMLOWPOUTPUTSTAGE_H
25#define ARM_COMPUTE_NEGEMMLOWPOUTPUTSTAGE_H
Gian Marcoe75a02b2017-11-08 12:24:09 +000026
Michalis Spyrouebcebf12020-10-21 00:04:14 +010027#include "arm_compute/core/Types.h"
Michalis Spyrou95abfdd2018-11-28 14:59:47 +000028#include "arm_compute/runtime/NEON/INESimpleFunctionNoBorder.h"
Gian Marcoe75a02b2017-11-08 12:24:09 +000029
30/** This file contains all available output stages for GEMMLowp on NEON.
31 *
32 * In gemmlowp, the "output stage" is the process that takes a final int32 accumulator value (the output of @ref NEGEMMLowpMatrixMultiplyCore),
33 * and processes it to obtain the final ASYMM8 value.
34 *
35 * More information about the GEMMLowp output stage can be found at https://github.com/google/gemmlowp/blob/master/doc/output.md
36 */
37
38namespace arm_compute
39{
40class ITensor;
Michalis Spyrouebcebf12020-10-21 00:04:14 +010041class ITensorInfo;
Gian Marcoe75a02b2017-11-08 12:24:09 +000042
Gian Marco58c57942017-11-28 09:10:03 +000043/** Basic function to execute NEGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPoint on NEON.
44 *
45 * NEGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPoint depends on 3 parameters:
46 *
47 * result_fixedpoint_multiplier, result_shift, result_offset_after_shift
48 *
49 * The final result is:
50 *
51 * (FixedPointMul(input[i][k], result_fixedpoint_multiplier) >> result_shift) + result_offset_after_shift
52 *
53 * where FixedPointMul(x, y) is the nearest integer to the following
54 * mathematical expression, evaluated without overflow or intermediate rounding:
55 *
56 * (x * y) / 2^31
57 *
58 * For more information: https://github.com/google/gemmlowp/blob/master/public/output_stages.h#L68
59 *
60 * In case the bias tensor is provided, the final result is:
61 *
62 * ((FixedPointMul(input[i][k] + bias[k], result_fixedpoint_multiplier)) >> result_shift) + result_offset_after_shift
63 *
64 * This function calls the following NEON kernels:
65 *
66 * -# @ref NEGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPointKernel
67 *
68 * @note The function accepts also 2 optional input arguments (min and max) which can be used to implement "rectified linear unit" activation functions
69 * after the result is shifted right by result_shift
70*/
Michalis Spyrou95abfdd2018-11-28 14:59:47 +000071class NEGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPoint : public INESimpleFunctionNoBorder
Gian Marco58c57942017-11-28 09:10:03 +000072{
73public:
Michalis Spyrouebcebf12020-10-21 00:04:14 +010074 /** Constructor */
75 NEGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPoint() = default;
76 /** Prevent instances of this class from being copied (As this class contains pointers) */
77 NEGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPoint(const NEGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPoint &) = delete;
78 /** Prevent instances of this class from being copied (As this class contains pointers) */
79 NEGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPoint &operator=(const NEGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPoint &) = delete;
80 /** Prevent instances of this class from being moved (As this class contains non movable objects) */
81 NEGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPoint(NEGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPoint &&) = delete;
82 /** Prevent instances of this class from being moved (As this class contains non movable objects) */
83 NEGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPoint &operator=(NEGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPoint &&) = delete;
84 /** Default destructor */
85 ~NEGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPoint();
Gian Marco58c57942017-11-28 09:10:03 +000086 /** Initialise the kernel's inputs, output
87 *
88 * @param[in] input Input tensor. Data type supported: S32
89 * @param[in] bias Biases tensor. Only shared biases supported and it can be a nullptr if the biases addition is not required.
90 * Biases are 1D tensor with dimensions [OFM]. Data type supported: Same as @p input.
91 * @param[out] output Output tensor. Data type supported: Data type supported: QASYMM8
92 * @param[in] result_fixedpoint_multiplier Fixed point value to be multiplied to each element of the input matrix when once the result_offset has been add
93 * @param[in] result_shift Number of bits to shift right the result after the fixed point multiplication
94 * @param[in] result_offset_after_shift Offset to be applied to result before converting it back to QASYMM8
Giorgio Arena1856ff72020-02-07 13:46:45 +000095 * @param[in] min (Optional) Min value used to saturate down the output result before converting back to QASYMM8. Defaults to the minimum possible 32-bit signed integer.
Gian Marco58c57942017-11-28 09:10:03 +000096 * @param[in] max (Optional) Max value used to saturate up the output result before converting back to QASYMM8,
Giorgio Arena1856ff72020-02-07 13:46:45 +000097 * Along with @p min, this value can be used to implement "rectified linear unit" activation functions. Defaults to the maximum possible 32-bit signed integer.
Gian Marco58c57942017-11-28 09:10:03 +000098 */
Giorgio Arena1856ff72020-02-07 13:46:45 +000099 void configure(const ITensor *input, const ITensor *bias, ITensor *output, int result_fixedpoint_multiplier, int result_shift, int result_offset_after_shift,
100 int min = std::numeric_limits<int32_t>::lowest(), int max = std::numeric_limits<int32_t>::max());
Gian Marco58c57942017-11-28 09:10:03 +0000101 /** Static function to check if given info will lead to a valid configuration of @ref NEGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPoint
102 *
Georgios Pinitasbb081ca2018-11-08 10:22:01 +0000103 * @param[in] input Input tensor. It is the output of @ref NEGEMMLowpMatrixMultiplyCore function. Data type supported: S32
104 * @param[in] bias Biases tensor. Only shared biases supported and it can be a nullptr if the addition of biases is not required.
105 * Biases are 1D tensor with dimensions [OFM]. Data type supported: Same as @p input.
106 * @param[in] output Output tensor. Data type supported: Data type supported: QASYMM8
Giorgio Arena1856ff72020-02-07 13:46:45 +0000107 * @param[in] min (Optional) Min value used to saturate down the output result before converting back to QASYMM8. Defaults to the minimum possible 32-bit signed integer.
Georgios Pinitasbb081ca2018-11-08 10:22:01 +0000108 * @param[in] max (Optional) Max value used to saturate up the output result before converting back to QASYMM8,
Giorgio Arena1856ff72020-02-07 13:46:45 +0000109 * Along with @p min, this value can be used to implement "rectified linear unit" activation functions. Defaults to the maximum possible 32-bit signed integer.
Gian Marco58c57942017-11-28 09:10:03 +0000110 *
Georgios Pinitas631c41a2017-12-06 11:53:03 +0000111 * @return a status
Anthony Barbierf202e502017-11-23 18:02:04 +0000112 */
Giorgio Arena1856ff72020-02-07 13:46:45 +0000113 static Status validate(const ITensorInfo *input, const ITensorInfo *bias, const ITensorInfo *output, int min = std::numeric_limits<int32_t>::lowest(), int max = std::numeric_limits<int32_t>::max());
Gian Marcoe75a02b2017-11-08 12:24:09 +0000114};
Georgios Pinitas448a81f2019-11-21 14:10:25 +0000115/** Basic function to execute NEGEMMLowpQuantizeDownInt32ToInt8ScaleByFixedPoint on NEON.
116 *
117 * NEGEMMLowpQuantizeDownInt32ToInt8ScaleByFixedPoint depends on 3 parameters:
118 *
119 * result_fixedpoint_multiplier, result_shift, result_offset_after_shift
120 *
121 * The final result is:
122 *
123 * (FixedPointMul(input[i][k], result_fixedpoint_multiplier) >> result_shift) + result_offset_after_shift
124 *
125 * where FixedPointMul(x, y) is the nearest integer to the following
126 * mathematical expression, evaluated without overflow or intermediate rounding:
127 *
128 * (x * y) / 2^31
129 *
130 * For more information: https://github.com/google/gemmlowp/blob/master/public/output_stages.h#L68
131 *
132 * In case the bias tensor is provided, the final result is:
133 *
134 * ((FixedPointMul(input[i][k] + bias[k], result_fixedpoint_multiplier)) >> result_shift) + result_offset_after_shift
135 *
136 * This function calls the following NEON kernels:
137 *
138 * -# @ref NEGEMMLowpQuantizeDownInt32ToInt8ScaleByFixedPointKernel
139 *
140 * @note The function accepts also 2 optional input arguments (min and max) which can be used to implement "rectified linear unit" activation functions
141 * after the result is shifted right by result_shift
142*/
143class NEGEMMLowpQuantizeDownInt32ToInt8ScaleByFixedPoint : public INESimpleFunctionNoBorder
144{
145public:
Michalis Spyrouebcebf12020-10-21 00:04:14 +0100146 /** Constructor */
147 NEGEMMLowpQuantizeDownInt32ToInt8ScaleByFixedPoint() = default;
148 /** Prevent instances of this class from being copied (As this class contains pointers) */
149 NEGEMMLowpQuantizeDownInt32ToInt8ScaleByFixedPoint(const NEGEMMLowpQuantizeDownInt32ToInt8ScaleByFixedPoint &) = delete;
150 /** Prevent instances of this class from being copied (As this class contains pointers) */
151 NEGEMMLowpQuantizeDownInt32ToInt8ScaleByFixedPoint &operator=(const NEGEMMLowpQuantizeDownInt32ToInt8ScaleByFixedPoint &) = delete;
152 /** Prevent instances of this class from being moved (As this class contains non movable objects) */
153 NEGEMMLowpQuantizeDownInt32ToInt8ScaleByFixedPoint(NEGEMMLowpQuantizeDownInt32ToInt8ScaleByFixedPoint &&) = delete;
154 /** Prevent instances of this class from being moved (As this class contains non movable objects) */
155 NEGEMMLowpQuantizeDownInt32ToInt8ScaleByFixedPoint &operator=(NEGEMMLowpQuantizeDownInt32ToInt8ScaleByFixedPoint &&) = delete;
156 /** Default destructor */
157 ~NEGEMMLowpQuantizeDownInt32ToInt8ScaleByFixedPoint();
Georgios Pinitas448a81f2019-11-21 14:10:25 +0000158 /** Initialise the kernel's inputs, output
159 *
160 * @param[in] input Input tensor. Data type supported: S32
161 * @param[in] bias Biases tensor. Only shared biases supported and it can be a nullptr if the biases addition is not required.
162 * Biases are 1D tensor with dimensions [OFM]. Data type supported: Same as @p input.
163 * @param[out] output Output tensor. Data type supported: Data type supported: QASYMM8_SIGNED
164 * @param[in] result_fixedpoint_multiplier Fixed point value to be multiplied to each element of the input matrix when once the result_offset has been add
165 * @param[in] result_shift Number of bits to shift right the result after the fixed point multiplication
166 * @param[in] result_offset_after_shift Offset to be applied to result before converting it back to QASYMM8_SIGNED
Giorgio Arena1856ff72020-02-07 13:46:45 +0000167 * @param[in] min (Optional) Min value used to saturate down the output result before converting back to QASYMM8_SIGNED. Defaults to the minimum possible 32-bit signed integer.
Georgios Pinitas448a81f2019-11-21 14:10:25 +0000168 * @param[in] max (Optional) Max value used to saturate up the output result before converting back to QASYMM8_SIGNED,
Giorgio Arena1856ff72020-02-07 13:46:45 +0000169 * Along with @p min, this value can be used to implement "rectified linear unit" activation functions. Defaults to the maximum possible 32-bit signed integer.
Georgios Pinitas448a81f2019-11-21 14:10:25 +0000170 */
Giorgio Arena1856ff72020-02-07 13:46:45 +0000171 void configure(const ITensor *input, const ITensor *bias, ITensor *output, int result_fixedpoint_multiplier, int result_shift, int result_offset_after_shift,
172 int min = std::numeric_limits<int32_t>::lowest(), int max = std::numeric_limits<int32_t>::max());
Georgios Pinitas448a81f2019-11-21 14:10:25 +0000173 /** Static function to check if given info will lead to a valid configuration of @ref NEGEMMLowpQuantizeDownInt32ToInt8ScaleByFixedPoint
174 *
175 * @param[in] input Input tensor. It is the output of @ref NEGEMMLowpMatrixMultiplyCore function. Data type supported: S32
176 * @param[in] bias Biases tensor. Only shared biases supported and it can be a nullptr if the addition of biases is not required.
177 * Biases are 1D tensor with dimensions [OFM]. Data type supported: Same as @p input.
178 * @param[in] output Output tensor. Data type supported: Data type supported: QASYMM8_SIGNED
Giorgio Arena1856ff72020-02-07 13:46:45 +0000179 * @param[in] min (Optional) Min value used to saturate down the output result before converting back to QASYMM8_SIGNED. Defaults to the minimum possible 32-bit signed integer.
Georgios Pinitas448a81f2019-11-21 14:10:25 +0000180 * @param[in] max (Optional) Max value used to saturate up the output result before converting back to QASYMM8_SIGNED,
Giorgio Arena1856ff72020-02-07 13:46:45 +0000181 * Along with @p min, this value can be used to implement "rectified linear unit" activation functions. Defaults to the maximum possible 32-bit signed integer.
Georgios Pinitas448a81f2019-11-21 14:10:25 +0000182 *
183 * @return a status
184 */
Giorgio Arena1856ff72020-02-07 13:46:45 +0000185 static Status validate(const ITensorInfo *input, const ITensorInfo *bias, const ITensorInfo *output, int min = std::numeric_limits<int32_t>::lowest(), int max = std::numeric_limits<int32_t>::max());
Georgios Pinitas448a81f2019-11-21 14:10:25 +0000186};
Gian Marco Iodicebc415af2019-06-13 15:58:32 +0100187/** Basic function to execute NEGEMMLowpQuantizeDownInt32ToInt16ScaleByFixedPoint on NEON.
188 *
189 * NEGEMMLowpQuantizeDownInt32ToInt16ScaleByFixedPoint depends on 2 parameters:
190 *
191 * result_fixedpoint_multiplier, result_shift
192 *
193 * The final result is:
194 *
195 * (FixedPointMul(input[i][k], result_fixedpoint_multiplier) >> result_shift)
196 *
197 * where FixedPointMul(x, y) is the nearest integer to the following
198 * mathematical expression, evaluated without overflow or intermediate rounding:
199 *
200 * (x * y) / 2^31
201 *
202 * For more information: https://github.com/google/gemmlowp/blob/master/public/output_stages.h#L68
203 *
204 * In case the bias tensor is provided, the final result is:
205 *
206 * ((FixedPointMul(input[i][k] + bias[k], result_fixedpoint_multiplier)) >> result_shift) + result_offset_after_shift
207 *
208 * This function calls the following NEON kernels:
209 *
210 * -# @ref NEGEMMLowpQuantizeDownInt32ToInt16ScaleByFixedPointKernel
211 *
212 * @note The function accepts also 2 optional input arguments (min and max) which can be used to implement "rectified linear unit" activation functions
213 * after the result is shifted right by result_shift
214*/
215class NEGEMMLowpQuantizeDownInt32ToInt16ScaleByFixedPoint : public INESimpleFunctionNoBorder
216{
217public:
Michalis Spyrouebcebf12020-10-21 00:04:14 +0100218 /** Constructor */
219 NEGEMMLowpQuantizeDownInt32ToInt16ScaleByFixedPoint() = default;
220 /** Prevent instances of this class from being copied (As this class contains pointers) */
221 NEGEMMLowpQuantizeDownInt32ToInt16ScaleByFixedPoint(const NEGEMMLowpQuantizeDownInt32ToInt16ScaleByFixedPoint &) = delete;
222 /** Prevent instances of this class from being copied (As this class contains pointers) */
223 NEGEMMLowpQuantizeDownInt32ToInt16ScaleByFixedPoint &operator=(const NEGEMMLowpQuantizeDownInt32ToInt16ScaleByFixedPoint &) = delete;
224 /** Prevent instances of this class from being moved (As this class contains non movable objects) */
225 NEGEMMLowpQuantizeDownInt32ToInt16ScaleByFixedPoint(NEGEMMLowpQuantizeDownInt32ToInt16ScaleByFixedPoint &&) = delete;
226 /** Prevent instances of this class from being moved (As this class contains non movable objects) */
227 NEGEMMLowpQuantizeDownInt32ToInt16ScaleByFixedPoint &operator=(NEGEMMLowpQuantizeDownInt32ToInt16ScaleByFixedPoint &&) = delete;
228 /** Default destructor */
229 ~NEGEMMLowpQuantizeDownInt32ToInt16ScaleByFixedPoint();
Gian Marco Iodicebc415af2019-06-13 15:58:32 +0100230 /** Initialise the kernel's inputs, output
231 *
232 * @param[in] input Input tensor. Data type supported: S32
233 * @param[in] bias Biases tensor. Only shared biases supported and it can be a nullptr if the biases addition is not required.
234 * Biases are 1D tensor with dimensions [OFM]. Data type supported: Same as @p input.
235 * @param[out] output Output tensor. Data type supported: Data type supported: QSYMM16
236 * @param[in] result_fixedpoint_multiplier Fixed point value to be multiplied to each element of the input matrix when once the result_offset has been add
237 * @param[in] result_shift Number of bits to shift right the result after the fixed point multiplication
Giorgio Arena1856ff72020-02-07 13:46:45 +0000238 * @param[in] min (Optional) Min value used to saturate down the output result before converting back to QSYMM16. Defaults to the minimum possible 32-bit signed integer.
Gian Marco Iodicebc415af2019-06-13 15:58:32 +0100239 * @param[in] max (Optional) Max value used to saturate up the output result before converting back to QSYMM16.
Giorgio Arena1856ff72020-02-07 13:46:45 +0000240 * Along with @p min, this value can be used to implement "rectified linear unit" activation functions. Defaults to the maximum possible 32-bit signed integer.
Gian Marco Iodicebc415af2019-06-13 15:58:32 +0100241 */
Giorgio Arena1856ff72020-02-07 13:46:45 +0000242 void configure(const ITensor *input, const ITensor *bias, ITensor *output, int result_fixedpoint_multiplier, int result_shift, int min = std::numeric_limits<int32_t>::lowest(),
243 int max = std::numeric_limits<int32_t>::max());
Gian Marco Iodicebc415af2019-06-13 15:58:32 +0100244 /** Static function to check if given info will lead to a valid configuration of @ref NEGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPoint
245 *
246 * @param[in] input Input tensor info. It is the output of @ref NEGEMMLowpMatrixMultiplyCore function. Data type supported: S32
247 * @param[in] bias Biases tensor info. Only shared biases supported and it can be a nullptr if the addition of biases is not required.
248 * Biases are 1D tensor with dimensions [OFM]. Data type supported: Same as @p input.
249 * @param[in] output Output tensor info. Data type supported: Data type supported: QSYMM16
Giorgio Arena1856ff72020-02-07 13:46:45 +0000250 * @param[in] min (Optional) Min value used to saturate down the output result before converting back to QSYMM16. Defaults to the minimum possible 32-bit signed integer.
Gian Marco Iodicebc415af2019-06-13 15:58:32 +0100251 * @param[in] max (Optional) Max value used to saturate up the output result before converting back to QSYMM16,
Giorgio Arena1856ff72020-02-07 13:46:45 +0000252 * Along with @p min, this value can be used to implement "rectified linear unit" activation functions. Defaults to the maximum possible 32-bit signed integer.
Gian Marco Iodicebc415af2019-06-13 15:58:32 +0100253 *
254 * @return a status
255 */
Giorgio Arena1856ff72020-02-07 13:46:45 +0000256 static Status validate(const ITensorInfo *input, const ITensorInfo *bias, const ITensorInfo *output, int min = std::numeric_limits<int32_t>::lowest(), int max = std::numeric_limits<int32_t>::max());
Gian Marco Iodicebc415af2019-06-13 15:58:32 +0100257};
Michele Di Giorgio9c700372020-01-08 11:33:44 +0000258
259/** Basic function to execute GEMMLowpQuantizeDown kernels on NEON.
260 *
261 * This function calls the following NEON kernels:
262 *
Luca Foschiani4b869532020-02-13 15:07:36 +0000263 * -# @ref NEGEMMLowpQuantizeDownInt32ScaleKernel
Michele Di Giorgio9c700372020-01-08 11:33:44 +0000264 * -# @ref NEGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPointKernel
265 * -# @ref NEGEMMLowpQuantizeDownInt32ToInt8ScaleByFixedPointKernel
266 * -# @ref NEGEMMLowpQuantizeDownInt32ToInt16ScaleByFixedPointKernel
267*/
268class NEGEMMLowpOutputStage : public INESimpleFunctionNoBorder
269{
270public:
Michalis Spyrouebcebf12020-10-21 00:04:14 +0100271 /** Constructor */
272 NEGEMMLowpOutputStage() = default;
273 /** Prevent instances of this class from being copied (As this class contains pointers) */
274 NEGEMMLowpOutputStage(const NEGEMMLowpOutputStage &) = delete;
275 /** Prevent instances of this class from being copied (As this class contains pointers) */
276 NEGEMMLowpOutputStage &operator=(const NEGEMMLowpOutputStage &) = delete;
277 /** Prevent instances of this class from being moved (As this class contains non movable objects) */
278 NEGEMMLowpOutputStage(NEGEMMLowpOutputStage &&) = delete;
279 /** Prevent instances of this class from being moved (As this class contains non movable objects) */
280 NEGEMMLowpOutputStage &operator=(NEGEMMLowpOutputStage &&) = delete;
281 /** Default destructor */
282 ~NEGEMMLowpOutputStage();
Michele Di Giorgio9c700372020-01-08 11:33:44 +0000283 /** Initialise the kernel's inputs, output
284 *
285 * @param[in] input Input tensor. Data type supported: S32
286 * @param[in] bias Biases tensor. Only shared biases supported and it can be a nullptr if the biases addition is not required.
287 * Biases are 1D tensor with dimensions [OFM]. Data type supported: Same as @p input.
288 * @param[out] output Output tensor. Data type supported: Data type supported: QASYMM8/QASYMM8_SIGNED/QSYMM16
289 * @param[in] info GEMMLowp output stage metadata.
290 */
291 void configure(const ITensor *input, const ITensor *bias, ITensor *output, const GEMMLowpOutputStageInfo &info);
292 /** Static function to check if given info will lead to a valid configuration of @ref NEGEMMLowpOutputStage
293 *
294 * @param[in] input Input tensor info. It is the output of @ref NEGEMMLowpMatrixMultiplyCore function. Data type supported: S32
295 * @param[in] bias Biases tensor info. Only shared biases supported and it can be a nullptr if the addition of biases is not required.
296 * Biases are 1D tensor with dimensions [OFM]. Data type supported: Same as @p input.
297 * @param[in] output Output tensor info. Data type supported: Data type supported: QASYMM8/QASYMM8_SIGNED/QSYMM16
298 * @param[in] info GEMMLowp output stage metadata.
299 *
300 * @return a status
301 */
302 static Status validate(const ITensorInfo *input, const ITensorInfo *bias, const ITensorInfo *output, const GEMMLowpOutputStageInfo &info);
303};
Georgios Pinitas041f36d2018-09-18 18:38:37 +0100304} // namespace arm_compute
Michalis Spyrouf4643372019-11-29 16:17:13 +0000305#endif /*ARM_COMPUTE_NEGEMMLOWPOUTPUTSTAGE_H */