blob: fec73d08f4b7c13b35bba90c6da572e6aaae3a7f [file] [log] [blame]
telsoa014fcda012018-03-09 14:13:49 +00001//
2// Copyright © 2017 Arm Ltd. All rights reserved.
David Beckecb56cd2018-09-05 12:52:57 +01003// SPDX-License-Identifier: MIT
telsoa014fcda012018-03-09 14:13:49 +00004//
5#pragma once
6
7#include "armnn/ArmNN.hpp"
8#include "armnn/Tensor.hpp"
arovir01616e7752018-10-01 17:08:59 +01009#include "armnnUtils/Half.hpp"
telsoa014fcda012018-03-09 14:13:49 +000010
11#include <boost/multi_array.hpp>
12#include <boost/assert.hpp>
13#include <array>
14
telsoa01c577f2c2018-08-31 09:22:23 +010015// Layer callables.
telsoa014fcda012018-03-09 14:13:49 +000016
17namespace armnn
18{
19class IWorkloadFactory;
20}
21
22template <std::size_t n>
23boost::array<unsigned int, n> GetTensorShapeAsArray(const armnn::TensorInfo& tensorInfo)
24{
25 BOOST_ASSERT_MSG(n == tensorInfo.GetNumDimensions(),
26 "Attempting to construct a shape array of mismatching size");
27
28 boost::array<unsigned int, n> shape;
29 for (unsigned int i = 0; i < n; i++)
30 {
31 shape[i] = tensorInfo.GetShape()[i];
32 }
33 return shape;
34}
35
36template <typename T, std::size_t n>
37struct LayerTestResult
38{
39 LayerTestResult(const armnn::TensorInfo& outputInfo)
40 {
41 auto shape( GetTensorShapeAsArray<n>(outputInfo) );
42 output.resize(shape);
43 outputExpected.resize(shape);
44 supported = true;
45 }
46
47 boost::multi_array<T, n> output;
48 boost::multi_array<T, n> outputExpected;
49 bool supported;
50};
51
52LayerTestResult<float, 4> SimpleConvolution2d3x5Test(armnn::IWorkloadFactory& workloadFactory,
jimfly010a088a62018-10-25 17:05:05 +010053 bool biasEnabled,
54 const armnn::DataLayoutIndexed& layout);
telsoa014fcda012018-03-09 14:13:49 +000055
56LayerTestResult<float, 4> SimpleConvolution2d3x3Test(armnn::IWorkloadFactory& workloadFactory,
narpra015f703182018-10-26 16:24:58 +010057 bool biasEnabled,
58 const armnn::DataLayoutIndexed& layout);
Francis Murtaghd59116e2018-10-04 16:03:07 +010059
60LayerTestResult<float, 4> SimpleConvolution2d3x3NhwcTest(armnn::IWorkloadFactory& workloadFactory,
61 bool biasEnabled);
telsoa014fcda012018-03-09 14:13:49 +000062
63LayerTestResult<float, 4>
narpra015f703182018-10-26 16:24:58 +010064Convolution2dAsymmetricPaddingLargerThanHalfKernelSizeTest(armnn::IWorkloadFactory& workloadFactory,
65 const armnn::DataLayoutIndexed& layout);
66LayerTestResult<float, 4> Convolution2dAsymmetricPaddingTest(armnn::IWorkloadFactory& workloadFactory,
67 const armnn::DataLayoutIndexed& layout);
telsoa014fcda012018-03-09 14:13:49 +000068
69
narpra015f703182018-10-26 16:24:58 +010070LayerTestResult<float, 4> Convolution1dTest(armnn::IWorkloadFactory& workloadFactory,
71 bool biasEnabled);
72LayerTestResult<uint8_t, 4> Convolution1dUint8Test(armnn::IWorkloadFactory& workloadFactory,
73 bool biasEnabled);
telsoa014fcda012018-03-09 14:13:49 +000074
75LayerTestResult<float, 4> DepthwiseConvolution2dTest(armnn::IWorkloadFactory& workloadFactory, bool biasEnabled);
76
Nikhil Rajcec6b652018-10-12 13:51:57 +010077LayerTestResult<float, 4> DepthwiseConvolution2dDepthNhwcTest(armnn::IWorkloadFactory& workloadFactory,
78 bool biasEnabled);
79
telsoa014fcda012018-03-09 14:13:49 +000080LayerTestResult<float, 4> DepthwiseConvolution2dDepthMul1Test(armnn::IWorkloadFactory& workloadFactory,
81 bool biasEnabled);
82
surmeh013537c2c2018-05-18 16:31:43 +010083LayerTestResult<float, 4> DepthwiseConvolution2dAsymmetricTest(armnn::IWorkloadFactory& workloadFactory,
jimfly01382a91d2018-10-26 15:55:50 +010084 bool biasEnabled,
85 const armnn::DataLayoutIndexed& layout);
surmeh013537c2c2018-05-18 16:31:43 +010086
telsoa014fcda012018-03-09 14:13:49 +000087LayerTestResult<float, 4> SimpleMaxPooling2dSize2x2Stride2x2Test(armnn::IWorkloadFactory& workloadFactory,
88 bool forceNoPadding);
89LayerTestResult<uint8_t, 4> SimpleMaxPooling2dSize2x2Stride2x2Uint8Test(armnn::IWorkloadFactory& workloadFactory,
90 bool forceNoPadding);
91LayerTestResult<float, 4> SimpleMaxPooling2dSize3x3Stride2x4Test(armnn::IWorkloadFactory& workloadFactory,
92 bool forceNoPadding);
93LayerTestResult<uint8_t, 4> SimpleMaxPooling2dSize3x3Stride2x4Uint8Test(armnn::IWorkloadFactory& workloadFactory,
94 bool forceNoPadding );
95LayerTestResult<float, 4> IgnorePaddingSimpleMaxPooling2dTest(armnn::IWorkloadFactory& workloadFactory);
96LayerTestResult<uint8_t, 4> IgnorePaddingSimpleMaxPooling2dUint8Test(armnn::IWorkloadFactory& workloadFactory);
97LayerTestResult<float, 4> IgnorePaddingMaxPooling2dSize3Test(armnn::IWorkloadFactory& workloadFactory);
98LayerTestResult<uint8_t, 4> IgnorePaddingMaxPooling2dSize3Uint8Test(armnn::IWorkloadFactory& workloadFactory);
99
100LayerTestResult<float, 4> SimpleAveragePooling2dTest(armnn::IWorkloadFactory& workloadFactory);
Francis Murtagh043d0d02018-10-05 14:08:48 +0100101LayerTestResult<float, 4> SimpleAveragePooling2dNhwcTest(armnn::IWorkloadFactory& workloadFactory);
telsoa014fcda012018-03-09 14:13:49 +0000102LayerTestResult<uint8_t, 4> SimpleAveragePooling2dUint8Test(armnn::IWorkloadFactory& workloadFactory);
James Conroy69482272018-10-19 10:41:35 +0100103LayerTestResult<uint8_t, 4> SimpleAveragePooling2dUint8NhwcTest(armnn::IWorkloadFactory& workloadFactory);
surmeh01bceff2f2018-03-29 16:29:27 +0100104LayerTestResult<float, 4> IgnorePaddingAveragePooling2dSize3x2Stride2x2Test(armnn::IWorkloadFactory& workloadFactory,
105 bool forceNoPadding);
telsoa014fcda012018-03-09 14:13:49 +0000106LayerTestResult<float, 4> IgnorePaddingSimpleAveragePooling2dTest(armnn::IWorkloadFactory& workloadFactory);
107LayerTestResult<uint8_t, 4> IgnorePaddingSimpleAveragePooling2dUint8Test(armnn::IWorkloadFactory& workloadFactory);
108LayerTestResult<float, 4> IgnorePaddingSimpleAveragePooling2dNoPaddingTest(armnn::IWorkloadFactory& workloadFactory);
109LayerTestResult<uint8_t, 4> IgnorePaddingSimpleAveragePooling2dNoPaddingUint8Test(
110 armnn::IWorkloadFactory& workloadFactory);
111LayerTestResult<float, 4> IgnorePaddingAveragePooling2dSize3Test(armnn::IWorkloadFactory& workloadFactory);
112LayerTestResult<uint8_t, 4> IgnorePaddingAveragePooling2dSize3Uint8Test(armnn::IWorkloadFactory& workloadFactory);
113
114LayerTestResult<float, 4> SimpleL2Pooling2dTest(armnn::IWorkloadFactory& workloadFactory);
115LayerTestResult<uint8_t, 4> SimpleL2Pooling2dUint8Test(armnn::IWorkloadFactory& workloadFactory);
116
117LayerTestResult<float, 4> L2Pooling2dSize3Stride1Test(armnn::IWorkloadFactory& workloadFactory);
118LayerTestResult<uint8_t, 4> L2Pooling2dSize3Stride1Uint8Test(armnn::IWorkloadFactory& workloadFactory);
119LayerTestResult<float, 4> L2Pooling2dSize3Stride3Test(armnn::IWorkloadFactory& workloadFactory);
120LayerTestResult<uint8_t, 4> L2Pooling2dSize3Stride3Uint8Test(armnn::IWorkloadFactory& workloadFactory);
121LayerTestResult<float, 4> L2Pooling2dSize3Stride4Test(armnn::IWorkloadFactory& workloadFactory);
122LayerTestResult<uint8_t, 4> L2Pooling2dSize3Stride4Uint8Test(armnn::IWorkloadFactory& workloadFactory);
123LayerTestResult<float, 4> L2Pooling2dSize7Test(armnn::IWorkloadFactory& workloadFactory);
124LayerTestResult<uint8_t, 4> L2Pooling2dSize7Uint8Test(armnn::IWorkloadFactory& workloadFactory);
125LayerTestResult<float, 4> L2Pooling2dSize9Test(armnn::IWorkloadFactory& workloadFactory);
126LayerTestResult<uint8_t, 4> L2Pooling2dSize9Uint8Test(armnn::IWorkloadFactory& workloadFactory);
127LayerTestResult<float, 4> LargeTensorsAveragePooling2dTest(armnn::IWorkloadFactory& workloadFactory);
128LayerTestResult<uint8_t, 4> LargeTensorsAveragePooling2dUint8Test(armnn::IWorkloadFactory& workloadFactory);
129
130LayerTestResult<float, 4> IgnorePaddingSimpleL2Pooling2dTest(armnn::IWorkloadFactory& workloadFactory);
131LayerTestResult<uint8_t, 4> IgnorePaddingSimpleL2Pooling2dUint8Test(armnn::IWorkloadFactory& workloadFactory);
132LayerTestResult<float, 4> IgnorePaddingL2Pooling2dSize3Test(armnn::IWorkloadFactory& workloadFactory);
133LayerTestResult<uint8_t, 4> IgnorePaddingL2Pooling2dSize3Uint8Test(armnn::IWorkloadFactory& workloadFactory);
134
135LayerTestResult<float, 4> AsymmetricNonSquarePooling2dTest(armnn::IWorkloadFactory& workloadFactory);
136LayerTestResult<uint8_t, 4> AsymmetricNonSquarePooling2dUint8Test(armnn::IWorkloadFactory& workloadFactory);
137
138LayerTestResult<float, 4> ComparePooling2dTest(armnn::IWorkloadFactory& workloadFactory,
139 armnn::IWorkloadFactory& refWorkloadFactory,
140 armnn::PoolingAlgorithm poolingType);
141LayerTestResult<uint8_t, 4> ComparePooling2dUint8Test(armnn::IWorkloadFactory& workloadFactory,
142 armnn::IWorkloadFactory& refWorkloadFactory,
143 armnn::PoolingAlgorithm poolingType);
144
145LayerTestResult<float, 4> ConstantLinearActivationTest(armnn::IWorkloadFactory& workloadFactory);
146
147LayerTestResult<float, 4> SimpleNormalizationAcrossTest(armnn::IWorkloadFactory& workloadFactory);
148LayerTestResult<float, 4> SimpleNormalizationWithinTest(armnn::IWorkloadFactory& workloadFactory);
narpra0155a97bc2018-10-02 14:35:53 +0100149LayerTestResult<float,4> SimpleNormalizationAcrossNhwcTest(armnn::IWorkloadFactory& workloadFactory);
telsoa014fcda012018-03-09 14:13:49 +0000150
151LayerTestResult<float, 2> SimpleSoftmaxTest(armnn::IWorkloadFactory& workloadFactory, float beta);
152LayerTestResult<uint8_t, 2> SimpleSoftmaxUint8Test(armnn::IWorkloadFactory& workloadFactory, float beta);
153
154LayerTestResult<float, 4> SimpleSigmoidTest(armnn::IWorkloadFactory& workloadFactory);
155
156LayerTestResult<float, 4> SimpleReshapeFloat32Test(armnn::IWorkloadFactory& workloadFactory);
157LayerTestResult<uint8_t, 4> SimpleReshapeUint8Test(armnn::IWorkloadFactory& workloadFactory);
158
159LayerTestResult<float, 4> SimpleFloorTest(armnn::IWorkloadFactory& workloadFactory);
160
161LayerTestResult<float, 1> Concatenation1dTest(armnn::IWorkloadFactory& workloadFactory);
162LayerTestResult<float, 2> Concatenation2dDim0Test(armnn::IWorkloadFactory& workloadFactory);
163LayerTestResult<float, 2> Concatenation2dDim1Test(armnn::IWorkloadFactory& workloadFactory);
164LayerTestResult<float, 2> Concatenation2dDim0DiffInputDimsTest(armnn::IWorkloadFactory& workloadFactory);
165LayerTestResult<float, 2> Concatenation2dDim1DiffInputDimsTest(armnn::IWorkloadFactory& workloadFactory);
166LayerTestResult<float, 3> Concatenation3dDim0Test(armnn::IWorkloadFactory& workloadFactory);
167LayerTestResult<float, 3> Concatenation3dDim1Test(armnn::IWorkloadFactory& workloadFactory);
168LayerTestResult<float, 3> Concatenation3dDim2Test(armnn::IWorkloadFactory& workloadFactory);
169LayerTestResult<float, 3> Concatenation3dDim0DiffInputDimsTest(armnn::IWorkloadFactory& workloadFactory);
170LayerTestResult<float, 3> Concatenation3dDim1DiffInputDimsTest(armnn::IWorkloadFactory& workloadFactory);
171LayerTestResult<float, 3> Concatenation3dDim2DiffInputDimsTest(armnn::IWorkloadFactory& workloadFactory);
172
173LayerTestResult<uint8_t, 4> SimpleSigmoidUint8Test(armnn::IWorkloadFactory& workloadFactory);
174
175LayerTestResult<float, 4> CompareConvolution2dTest(armnn::IWorkloadFactory& workloadFactory,
176 armnn::IWorkloadFactory& refWorkloadFactory);
177
178template<typename T>
179LayerTestResult<T, 4> CompareDepthwiseConvolution2dTest(armnn::IWorkloadFactory& workloadFactory,
180 armnn::IWorkloadFactory& refWorkloadFactory);
181
182LayerTestResult<float, 4> CompareNormalizationTest(armnn::IWorkloadFactory& workloadFactory,
183 armnn::IWorkloadFactory& refWorkloadFactory,
184 armnn::NormalizationAlgorithmChannel normChannel,
185 armnn::NormalizationAlgorithmMethod normMethod);
186
187LayerTestResult<float, 2> CompareSoftmaxTest(armnn::IWorkloadFactory& workloadFactory,
188 armnn::IWorkloadFactory& refWorkloadFactory, float beta);
189
190LayerTestResult<float, 2> FullyConnectedFloat32Test(armnn::IWorkloadFactory& workloadFactory,
191 bool biasEnabled,
192 bool transposeWeights);
193
194std::vector<LayerTestResult<float, 3>> SplitterTest(armnn::IWorkloadFactory& workloadFactory);
195LayerTestResult<float, 3> CopyViaSplitterTest(armnn::IWorkloadFactory& workloadFactory);
196
197LayerTestResult<float, 3> MergerTest(armnn::IWorkloadFactory& workloadFactory);
198
199LayerTestResult<float, 4> AdditionTest(armnn::IWorkloadFactory& workloadFactory);
200LayerTestResult<float, 4> AdditionBroadcast1ElementTest(armnn::IWorkloadFactory& workloadFactory);
201LayerTestResult<float, 4> AdditionBroadcastTest(armnn::IWorkloadFactory& workloadFactory);
202
203LayerTestResult<float, 4> CompareAdditionTest(armnn::IWorkloadFactory& workloadFactory,
David Beckf195f032018-09-06 16:46:34 +0100204 armnn::IWorkloadFactory& refWorkloadFactory);
205
206LayerTestResult<float, 4> SubtractionTest(armnn::IWorkloadFactory& workloadFactory);
207LayerTestResult<float, 4> SubtractionBroadcast1ElementTest(armnn::IWorkloadFactory& workloadFactory);
208LayerTestResult<float, 4> SubtractionBroadcastTest(armnn::IWorkloadFactory& workloadFactory);
telsoa014fcda012018-03-09 14:13:49 +0000209
210LayerTestResult<float, 4> CompareActivationTest(armnn::IWorkloadFactory& workloadFactory,
211 armnn::IWorkloadFactory& refWorkloadFactory,
212 armnn::ActivationFunction f,
213 unsigned int batchSize);
214
Francis Murtaghe7a86a42018-08-29 12:42:10 +0100215LayerTestResult<float, 4> DivisionTest(armnn::IWorkloadFactory& workloadFactory);
Francis Murtagh8c5e3dc2018-08-30 17:18:37 +0100216LayerTestResult<float, 4> DivisionByZeroTest(armnn::IWorkloadFactory& workloadFactory);
Francis Murtaghe7a86a42018-08-29 12:42:10 +0100217LayerTestResult<float, 4> DivisionBroadcast1ElementTest(armnn::IWorkloadFactory& workloadFactory);
218LayerTestResult<float, 4> DivisionBroadcast1DVectorTest(armnn::IWorkloadFactory& workloadFactory);
219
telsoa014fcda012018-03-09 14:13:49 +0000220LayerTestResult<float, 4> MultiplicationTest(armnn::IWorkloadFactory& workloadFactory);
surmeh01bceff2f2018-03-29 16:29:27 +0100221LayerTestResult<float, 4> MultiplicationBroadcast1ElementTest(armnn::IWorkloadFactory& workloadFactory);
222LayerTestResult<float, 4> MultiplicationBroadcast1DVectorTest(armnn::IWorkloadFactory& workloadFactory);
telsoa014fcda012018-03-09 14:13:49 +0000223
224LayerTestResult<float, 4> CompareMultiplicationTest(armnn::IWorkloadFactory& workloadFactory,
225 armnn::IWorkloadFactory& refWorkloadFactory);
226
227LayerTestResult<float, 4> BatchNormTest(armnn::IWorkloadFactory& workloadFactory);
Matteo Martincigh8eb675e2018-10-17 14:43:29 +0100228LayerTestResult<float, 4> BatchNormNhwcTest(armnn::IWorkloadFactory& workloadFactory);
telsoa014fcda012018-03-09 14:13:49 +0000229
230LayerTestResult<float, 4> CompareBatchNormTest(armnn::IWorkloadFactory& workloadFactory,
231 armnn::IWorkloadFactory& refWorkloadFactory);
232
233LayerTestResult<float, 4> BoundedReLuUpperAndLowerBoundTest(armnn::IWorkloadFactory& workloadFactory);
234LayerTestResult<uint8_t, 4> BoundedReLuUint8UpperAndLowerBoundTest(armnn::IWorkloadFactory& workloadFactory);
235LayerTestResult<float, 4> BoundedReLuUpperBoundOnlyTest(armnn::IWorkloadFactory& workloadFactory);
236LayerTestResult<uint8_t, 4> BoundedReLuUint8UpperBoundOnlyTest(armnn::IWorkloadFactory& workloadFactory);
237
238LayerTestResult<float, 4> CompareBoundedReLuTest(armnn::IWorkloadFactory& workloadFactory,
239 armnn::IWorkloadFactory& refWorkloadFactory,
240 float upperBound,
241 float lowerBound);
242
telsoa01c577f2c2018-08-31 09:22:23 +0100243// Tests that the output should be identical to the input when the output dimensions match the input ones.
telsoa014fcda012018-03-09 14:13:49 +0000244LayerTestResult<float, 4> ResizeBilinearNopTest(armnn::IWorkloadFactory& workloadFactory);
245
telsoa01c577f2c2018-08-31 09:22:23 +0100246// Tests the behaviour of the resize bilinear operation when rescaling a 2x2 image into a 1x1 image.
telsoa014fcda012018-03-09 14:13:49 +0000247LayerTestResult<float, 4> SimpleResizeBilinearTest(armnn::IWorkloadFactory& workloadFactory);
248
telsoa01c577f2c2018-08-31 09:22:23 +0100249// Tests the resize bilinear for minification of a square input matrix (also: input dimensions are a
250// multiple of output dimensions).
telsoa014fcda012018-03-09 14:13:49 +0000251LayerTestResult<float, 4> ResizeBilinearSqMinTest(armnn::IWorkloadFactory& workloadFactory);
252
telsoa01c577f2c2018-08-31 09:22:23 +0100253// Tests the resize bilinear for minification (output dimensions smaller than input dimensions).
telsoa014fcda012018-03-09 14:13:49 +0000254LayerTestResult<float, 4> ResizeBilinearMinTest(armnn::IWorkloadFactory& workloadFactory);
255
telsoa01c577f2c2018-08-31 09:22:23 +0100256// Tests the resize bilinear for magnification (output dimensions bigger than input dimensions).
telsoa014fcda012018-03-09 14:13:49 +0000257LayerTestResult<float, 4> ResizeBilinearMagTest(armnn::IWorkloadFactory& workloadFactory);
258
James Conroy074f3712018-10-03 09:32:03 +0100259// Tests that execute Resize Bilinear with NHWC data layout
260LayerTestResult<float, 4> ResizeBilinearNopNhwcTest(armnn::IWorkloadFactory& workloadFactory);
261LayerTestResult<float, 4> SimpleResizeBilinearNhwcTest(armnn::IWorkloadFactory& workloadFactory);
262LayerTestResult<float, 4> ResizeBilinearSqMinNhwcTest(armnn::IWorkloadFactory& workloadFactory);
263LayerTestResult<float, 4> ResizeBilinearMinNhwcTest(armnn::IWorkloadFactory& workloadFactory);
264LayerTestResult<float, 4> ResizeBilinearMagNhwcTest(armnn::IWorkloadFactory& workloadFactory);
265
telsoa014fcda012018-03-09 14:13:49 +0000266LayerTestResult<float, 4> BatchNormTest(armnn::IWorkloadFactory& workloadFactory);
Nikhil Rajd1340932018-10-18 14:27:50 +0100267LayerTestResult<float, 4> BatchNormNhwcTest(armnn::IWorkloadFactory& workloadFactory);
telsoa014fcda012018-03-09 14:13:49 +0000268
269LayerTestResult<float, 2> FakeQuantizationTest(armnn::IWorkloadFactory& workloadFactory);
270
271LayerTestResult<float, 4> L2Normalization1dTest(armnn::IWorkloadFactory& workloadFactory);
272LayerTestResult<float, 4> L2Normalization2dTest(armnn::IWorkloadFactory& workloadFactory);
273LayerTestResult<float, 4> L2Normalization3dTest(armnn::IWorkloadFactory& workloadFactory);
274LayerTestResult<float, 4> L2Normalization4dTest(armnn::IWorkloadFactory& workloadFactory);
275
Matteo Martincigh539b44d2018-10-01 09:26:39 +0100276LayerTestResult<float, 4> L2Normalization1dNhwcTest(armnn::IWorkloadFactory& workloadFactory);
277LayerTestResult<float, 4> L2Normalization2dNhwcTest(armnn::IWorkloadFactory& workloadFactory);
278LayerTestResult<float, 4> L2Normalization3dNhwcTest(armnn::IWorkloadFactory& workloadFactory);
279LayerTestResult<float, 4> L2Normalization4dNhwcTest(armnn::IWorkloadFactory& workloadFactory);
280
telsoa014fcda012018-03-09 14:13:49 +0000281LayerTestResult<float, 4> ConstantTest(armnn::IWorkloadFactory& workloadFactory);
282
283LayerTestResult<uint8_t, 4> ConstantTestUint8(armnn::IWorkloadFactory& workloadFactory);
284
285LayerTestResult<uint8_t, 4> BoundedReLuUint8Test(armnn::IWorkloadFactory& workloadFactory, float upperBound);
286LayerTestResult<uint8_t, 4> BoundedReLuUint8Test(armnn::IWorkloadFactory& workloadFactory,
287 float upperBound,
288 float lowerBound);
289
290LayerTestResult<uint8_t, 2> FullyConnectedUint8Test(armnn::IWorkloadFactory& workloadFactory, bool biasEnabled);
291
292std::vector<LayerTestResult<uint8_t, 3>> SplitterUint8Test(armnn::IWorkloadFactory& workloadFactory);
293LayerTestResult<uint8_t, 3> CopyViaSplitterUint8Test(armnn::IWorkloadFactory& workloadFactory);
294
295LayerTestResult<uint8_t, 3> MergerUint8Test(armnn::IWorkloadFactory& workloadFactory);
296
297LayerTestResult<uint8_t, 4> AdditionUint8Test(armnn::IWorkloadFactory& workloadFactory);
298LayerTestResult<uint8_t, 4> AdditionBroadcast1ElementUint8Test(armnn::IWorkloadFactory& workloadFactory);
299LayerTestResult<uint8_t, 4> AdditionBroadcastUint8Test(armnn::IWorkloadFactory& workloadFactory);
300
David Beckf195f032018-09-06 16:46:34 +0100301LayerTestResult<uint8_t, 4> SubtractionUint8Test(armnn::IWorkloadFactory& workloadFactory);
302LayerTestResult<uint8_t, 4> SubtractionBroadcast1ElementUint8Test(armnn::IWorkloadFactory& workloadFactory);
303LayerTestResult<uint8_t, 4> SubtractionBroadcastUint8Test(armnn::IWorkloadFactory& workloadFactory);
304
telsoa014fcda012018-03-09 14:13:49 +0000305LayerTestResult<uint8_t, 4> CompareActivationUint8Test(armnn::IWorkloadFactory& workloadFactory,
306 armnn::IWorkloadFactory& refWorkloadFactory,
307 armnn::ActivationFunction f);
308
309LayerTestResult<uint8_t, 2> CompareSoftmaxUint8Test(armnn::IWorkloadFactory& workloadFactory,
310 armnn::IWorkloadFactory& refWorkloadFactory,
311 float beta);
312
313LayerTestResult<uint8_t, 4> MultiplicationUint8Test(armnn::IWorkloadFactory& workloadFactory);
surmeh01bceff2f2018-03-29 16:29:27 +0100314LayerTestResult<uint8_t, 4> MultiplicationBroadcast1ElementUint8Test(armnn::IWorkloadFactory& workloadFactory);
315LayerTestResult<uint8_t, 4> MultiplicationBroadcast1DVectorUint8Test(armnn::IWorkloadFactory& workloadFactory);
telsoa014fcda012018-03-09 14:13:49 +0000316
David Beck5cd01f32018-09-12 16:00:08 +0100317LayerTestResult<uint8_t, 4> DivisionUint8Test(armnn::IWorkloadFactory& workloadFactory);
318LayerTestResult<uint8_t, 4> DivisionBroadcast1ElementUint8Test(armnn::IWorkloadFactory& workloadFactory);
319LayerTestResult<uint8_t, 4> DivisionBroadcast1DVectorUint8Test(armnn::IWorkloadFactory& workloadFactory);
320
telsoa014fcda012018-03-09 14:13:49 +0000321LayerTestResult<uint8_t, 4> SimpleConvolution2d3x5Uint8Test(armnn::IWorkloadFactory& workloadFactory,
jimfly010a088a62018-10-25 17:05:05 +0100322 bool biasEnabled,
323 const armnn::DataLayoutIndexed& layout);
telsoa014fcda012018-03-09 14:13:49 +0000324
325LayerTestResult<uint8_t, 4> SimpleConvolution2d3x3Uint8Test(armnn::IWorkloadFactory& workloadFactory,
narpra015f703182018-10-26 16:24:58 +0100326 bool biasEnabled,
327 const armnn::DataLayoutIndexed& layout);
telsoa014fcda012018-03-09 14:13:49 +0000328
329LayerTestResult<uint8_t, 4> DepthwiseConvolution2dUint8Test(armnn::IWorkloadFactory& workloadFactory,
330 bool biasEnabled);
331
332LayerTestResult<uint8_t, 4> DepthwiseConvolution2dDepthMul1Uint8Test(armnn::IWorkloadFactory& workloadFactory,
333 bool biasEnabled);
334
335LayerTestResult<uint8_t, 4> ConstantLinearActivationUint8Test(armnn::IWorkloadFactory& workloadFactory);
336
337LayerTestResult<uint8_t, 4> ResizeBilinearNopUint8Test(armnn::IWorkloadFactory& workloadFactory);
338LayerTestResult<uint8_t, 4> SimpleResizeBilinearUint8Test(armnn::IWorkloadFactory& workloadFactory);
339LayerTestResult<uint8_t, 4> ResizeBilinearSqMinUint8Test(armnn::IWorkloadFactory& workloadFactory);
340LayerTestResult<uint8_t, 4> ResizeBilinearMinUint8Test(armnn::IWorkloadFactory& workloadFactory);
341LayerTestResult<uint8_t, 4> ResizeBilinearMagUint8Test(armnn::IWorkloadFactory& workloadFactory);
342
343LayerTestResult<uint8_t, 4> BatchNormUint8Test(armnn::IWorkloadFactory& workloadFactory);
Matteo Martincigh8eb675e2018-10-17 14:43:29 +0100344LayerTestResult<uint8_t, 4> BatchNormUint8NhwcTest(armnn::IWorkloadFactory& workloadFactory);
telsoa014fcda012018-03-09 14:13:49 +0000345
346LayerTestResult<uint8_t, 4> ConstantUint8Test(armnn::IWorkloadFactory& workloadFactory);
347
348LayerTestResult<uint8_t, 1> Concatenation1dUint8Test(armnn::IWorkloadFactory& workloadFactory);
349LayerTestResult<uint8_t, 2> Concatenation2dDim0Uint8Test(armnn::IWorkloadFactory& workloadFactory);
350LayerTestResult<uint8_t, 2> Concatenation2dDim1Uint8Test(armnn::IWorkloadFactory& workloadFactory);
351LayerTestResult<uint8_t, 2> Concatenation2dDim0DiffInputDimsUint8Test(armnn::IWorkloadFactory& workloadFactory);
352LayerTestResult<uint8_t, 2> Concatenation2dDim1DiffInputDimsUint8Test(armnn::IWorkloadFactory& workloadFactory);
353LayerTestResult<uint8_t, 3> Concatenation3dDim0Uint8Test(armnn::IWorkloadFactory& workloadFactory);
354LayerTestResult<uint8_t, 3> Concatenation3dDim1Uint8Test(armnn::IWorkloadFactory& workloadFactory);
355LayerTestResult<uint8_t, 3> Concatenation3dDim2Uint8Test(armnn::IWorkloadFactory& workloadFactory);
356LayerTestResult<uint8_t, 3> Concatenation3dDim0DiffInputDimsUint8Test(armnn::IWorkloadFactory& workloadFactory);
357LayerTestResult<uint8_t, 3> Concatenation3dDim1DiffInputDimsUint8Test(armnn::IWorkloadFactory& workloadFactory);
358LayerTestResult<uint8_t, 3> Concatenation3dDim2DiffInputDimsUint8Test(armnn::IWorkloadFactory& workloadFactory);
359
360
361LayerTestResult<float, 2> FullyConnectedLargeTest(armnn::IWorkloadFactory& workloadFactory,
362 bool transposeWeights);
363LayerTestResult<float, 4> SimplePermuteFloat32Test(armnn::IWorkloadFactory& workloadFactory);
364LayerTestResult<uint8_t, 4> SimplePermuteUint8Test(armnn::IWorkloadFactory& workloadFactory);
365
Mohamed Nour Abouelseouddd6acea2018-10-18 12:26:19 +0100366LayerTestResult<uint8_t, 2> PadUint82dTest(armnn::IWorkloadFactory& workloadFactory);
367LayerTestResult<uint8_t, 3> PadUint83dTest(armnn::IWorkloadFactory& workloadFactory);
368LayerTestResult<uint8_t, 4> PadUint84dTest(armnn::IWorkloadFactory& workloadFactory);
Mohamed Nour Abouelseoud7420e552018-10-12 12:26:24 +0100369
Mohamed Nour Abouelseouddd6acea2018-10-18 12:26:19 +0100370LayerTestResult<float, 2> PadFloat322dTest(armnn::IWorkloadFactory& workloadFactory);
371LayerTestResult<float, 3> PadFloat323dTest(armnn::IWorkloadFactory& workloadFactory);
372LayerTestResult<float, 4> PadFloat324dTest(armnn::IWorkloadFactory& workloadFactory);
Mohamed Nour Abouelseoud7420e552018-10-12 12:26:24 +0100373
surmeh01bceff2f2018-03-29 16:29:27 +0100374LayerTestResult<float, 4> PermuteFloat32ValueSet1Test(armnn::IWorkloadFactory& workloadFactory);
375LayerTestResult<float, 4> PermuteFloat32ValueSet2Test(armnn::IWorkloadFactory& workloadFactory);
376LayerTestResult<float, 4> PermuteFloat32ValueSet3Test(armnn::IWorkloadFactory& workloadFactory);
telsoa01c577f2c2018-08-31 09:22:23 +0100377
378LayerTestResult<float, 2> LstmLayerFloat32WithCifgWithPeepholeNoProjectionTest
379 (armnn::IWorkloadFactory& workloadFactory);
380LayerTestResult<float, 2>
381 LstmLayerFloat32NoCifgNoPeepholeNoProjectionTest(armnn::IWorkloadFactory& workloadFactory);
382LayerTestResult<float, 2>
383LstmLayerFloat32NoCifgWithPeepholeWithProjectionTest(armnn::IWorkloadFactory& workloadFactory);
384
385LayerTestResult<float, 4> SimpleConvertFp16ToFp32Test(armnn::IWorkloadFactory& workloadFactory);
386LayerTestResult<armnn::Half, 4> SimpleConvertFp32ToFp16Test(armnn::IWorkloadFactory& workloadFactory);
narpra011e4c31d2018-09-28 11:07:51 +0100387
388
389LayerTestResult<uint8_t, 1> MeanUint8SimpleTest(armnn::IWorkloadFactory& workloadFactory);
390LayerTestResult<uint8_t, 3> MeanUint8SimpleAxisTest(armnn::IWorkloadFactory& workloadFactory);
391LayerTestResult<uint8_t, 4> MeanUint8KeepDimsTest(armnn::IWorkloadFactory& workloadFactory);
392LayerTestResult<uint8_t, 4> MeanUint8MultipleDimsTest(armnn::IWorkloadFactory& workloadFactory);
393LayerTestResult<uint8_t, 1> MeanVtsUint8Test(armnn::IWorkloadFactory& workloadFactory);
394LayerTestResult<float, 1> MeanFloatSimpleTest(armnn::IWorkloadFactory& workloadFactory);
395LayerTestResult<float, 3> MeanFloatSimpleAxisTest(armnn::IWorkloadFactory& workloadFactory);
396LayerTestResult<float, 4> MeanFloatKeepDimsTest(armnn::IWorkloadFactory& workloadFactory);
397LayerTestResult<float, 4> MeanFloatMultipleDimsTest(armnn::IWorkloadFactory& workloadFactory);
398LayerTestResult<float, 1> MeanVtsFloat1Test(armnn::IWorkloadFactory& workloadFactory);
399LayerTestResult<float, 3> MeanVtsFloat2Test(armnn::IWorkloadFactory& workloadFactory);
Matteo Martincigh28dcab62018-10-19 16:40:03 +0100400LayerTestResult<float, 3> MeanVtsFloat3Test(armnn::IWorkloadFactory& workloadFactory);
401
Matteo Martincigh8eb675e2018-10-17 14:43:29 +0100402LayerTestResult<float, 4> AdditionAfterMaxPoolTest(armnn::IWorkloadFactory& workloadFactory);