blob: 8a513347cf1115e6e1473624005ee9b0389495c2 [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//
telsoa014fcda012018-03-09 14:13:49 +00005
Aron Virginas-Tar56055192018-11-12 18:10:43 +00006#include "NeonWorkloadFactoryHelper.hpp"
7
Aron Virginas-Tarc9cc8042018-11-01 16:15:57 +00008#include <test/TensorHelpers.hpp>
9#include <test/UnitTests.hpp>
telsoa014fcda012018-03-09 14:13:49 +000010
Aron Virginas-Tarc9cc8042018-11-01 16:15:57 +000011#include <neon/NeonLayerSupport.hpp>
12#include <neon/NeonWorkloadFactory.hpp>
Aron Virginas-Tar00d306e2019-08-28 18:08:46 +010013
Aron Virginas-Tarc9cc8042018-11-01 16:15:57 +000014#include <reference/RefWorkloadFactory.hpp>
Aron Virginas-Tar00d306e2019-08-28 18:08:46 +010015
Aron Virginas-Tarc9cc8042018-11-01 16:15:57 +000016#include <backendsCommon/test/ActivationFixture.hpp>
17#include <backendsCommon/test/LayerTests.hpp>
telsoa014fcda012018-03-09 14:13:49 +000018
arovir0143095f32018-10-09 18:04:24 +010019#include <boost/test/unit_test.hpp>
telsoa014fcda012018-03-09 14:13:49 +000020
21BOOST_AUTO_TEST_SUITE(Compute_ArmComputeNeon)
Sadik Armagan581742d2019-08-12 14:11:37 +010022
23using namespace armnn;
24
25using FactoryType = NeonWorkloadFactory;
telsoa014fcda012018-03-09 14:13:49 +000026
27// ============================================================================
28// UNIT tests
29
30// Convolution
31ARMNN_AUTO_TEST_CASE(SimpleConvolution1d, Convolution1dTest, true)
32
Sadik Armagan581742d2019-08-12 14:11:37 +010033ARMNN_AUTO_TEST_CASE(SimpleConvolution2d, SimpleConvolution2d3x5Test, true, DataLayout::NCHW)
34ARMNN_AUTO_TEST_CASE(SimpleConvolution2dNhwc, SimpleConvolution2d3x5Test, true, DataLayout::NHWC)
35ARMNN_AUTO_TEST_CASE(SimpleConvolution2d3x3Uint8, SimpleConvolution2d3x3Uint8Test, true, DataLayout::NCHW)
36ARMNN_AUTO_TEST_CASE(SimpleConvolution2d3x3Uint8Nhwc, SimpleConvolution2d3x3Uint8Test, true, DataLayout::NHWC)
37ARMNN_AUTO_TEST_CASE(UnbiasedConvolution2d, SimpleConvolution2d3x5Test, false, DataLayout::NCHW)
38ARMNN_AUTO_TEST_CASE(UnbiasedConvolution2dNhwc, SimpleConvolution2d3x5Test, false, DataLayout::NHWC)
Mike Kelly7332ed82018-12-20 17:03:06 +000039ARMNN_AUTO_TEST_CASE(UnbiasedConvolution2dStride2x2Nhwc,
Sadik Armagan581742d2019-08-12 14:11:37 +010040 SimpleConvolution2d3x3Stride2x2Test, false, DataLayout::NHWC)
jimfly010a088a62018-10-25 17:05:05 +010041
Sadik Armagan581742d2019-08-12 14:11:37 +010042ARMNN_AUTO_TEST_CASE(UnbiasedConvolution2dSquare, SimpleConvolution2d3x3Test, false, DataLayout::NCHW)
43ARMNN_AUTO_TEST_CASE(SimpleConvolution2dAsymmetricPadding, Convolution2dAsymmetricPaddingTest, DataLayout::NCHW)
narpra015f703182018-10-26 16:24:58 +010044
Sadik Armagan581742d2019-08-12 14:11:37 +010045ARMNN_AUTO_TEST_CASE(UnbiasedConvolution2dSquareNhwc, SimpleConvolution2d3x3Test, false, DataLayout::NHWC)
narpra015f703182018-10-26 16:24:58 +010046ARMNN_AUTO_TEST_CASE(SimpleConvolution2dAsymmetricPaddingNhwc,
47 Convolution2dAsymmetricPaddingTest,
Sadik Armagan581742d2019-08-12 14:11:37 +010048 DataLayout::NHWC)
telsoa014fcda012018-03-09 14:13:49 +000049
Francis Murtaghd59116e2018-10-04 16:03:07 +010050ARMNN_AUTO_TEST_CASE(SimpleConvolution2dSquareNhwc, SimpleConvolution2d3x3NhwcTest, false)
telsoa014fcda012018-03-09 14:13:49 +000051
Jan Eilers59c66702019-07-11 10:22:36 +010052ARMNN_AUTO_TEST_CASE(Convolution2d3x3Dilation3x3,
Sadik Armagan581742d2019-08-12 14:11:37 +010053 Convolution2d3x3Dilation3x3Test<DataType::Float32, DataType::Float32>,
Jan Eilers59c66702019-07-11 10:22:36 +010054 false,
Sadik Armagan581742d2019-08-12 14:11:37 +010055 DataLayout::NCHW)
Jan Eilers59c66702019-07-11 10:22:36 +010056ARMNN_AUTO_TEST_CASE(Convolution2d3x3Dilation3x3Nhwc,
Sadik Armagan581742d2019-08-12 14:11:37 +010057 Convolution2d3x3Dilation3x3Test<DataType::Float32, DataType::Float32>,
Jan Eilers59c66702019-07-11 10:22:36 +010058 false,
Sadik Armagan581742d2019-08-12 14:11:37 +010059 DataLayout::NHWC)
Jan Eilers59c66702019-07-11 10:22:36 +010060ARMNN_AUTO_TEST_CASE(Convolution2d3x3Dilation3x3Uint8,
Sadik Armagan581742d2019-08-12 14:11:37 +010061 Convolution2d3x3Dilation3x3Test<DataType::QuantisedAsymm8, DataType::Signed32>,
Jan Eilers59c66702019-07-11 10:22:36 +010062 false,
Sadik Armagan581742d2019-08-12 14:11:37 +010063 DataLayout::NCHW)
Jan Eilers59c66702019-07-11 10:22:36 +010064ARMNN_AUTO_TEST_CASE(Convolution2d3x3Dilation3x3NhwcUint8,
Sadik Armagan581742d2019-08-12 14:11:37 +010065 Convolution2d3x3Dilation3x3Test<DataType::QuantisedAsymm8, DataType::Signed32>,
Jan Eilers59c66702019-07-11 10:22:36 +010066 false,
Sadik Armagan581742d2019-08-12 14:11:37 +010067 DataLayout::NHWC)
Jan Eilers59c66702019-07-11 10:22:36 +010068ARMNN_AUTO_TEST_CASE(Convolution2d2x3x3Dilation3x3,
Sadik Armagan581742d2019-08-12 14:11:37 +010069 Convolution2d2x3x3Dilation3x3Test<DataType::Float32, DataType::Float32>,
Jan Eilers59c66702019-07-11 10:22:36 +010070 false,
Sadik Armagan581742d2019-08-12 14:11:37 +010071 DataLayout::NCHW)
Jan Eilers59c66702019-07-11 10:22:36 +010072ARMNN_AUTO_TEST_CASE(Convolution2d2x3x3Dilation3x3Nhwc,
Sadik Armagan581742d2019-08-12 14:11:37 +010073 Convolution2d2x3x3Dilation3x3Test<DataType::Float32, DataType::Float32>,
Jan Eilers59c66702019-07-11 10:22:36 +010074 false,
Sadik Armagan581742d2019-08-12 14:11:37 +010075 DataLayout::NHWC)
Jan Eilers59c66702019-07-11 10:22:36 +010076ARMNN_AUTO_TEST_CASE(Convolution2d2x3x3Dilation3x3Uint8,
Sadik Armagan581742d2019-08-12 14:11:37 +010077 Convolution2d2x3x3Dilation3x3Test<DataType::QuantisedAsymm8, DataType::Signed32>,
Jan Eilers59c66702019-07-11 10:22:36 +010078 false,
Sadik Armagan581742d2019-08-12 14:11:37 +010079 DataLayout::NCHW)
Jan Eilers59c66702019-07-11 10:22:36 +010080ARMNN_AUTO_TEST_CASE(Convolution2d2x3x3Dilation3x3NhwcUint8,
Sadik Armagan581742d2019-08-12 14:11:37 +010081 Convolution2d2x3x3Dilation3x3Test<DataType::QuantisedAsymm8, DataType::Signed32>,
Jan Eilers59c66702019-07-11 10:22:36 +010082 false,
Sadik Armagan581742d2019-08-12 14:11:37 +010083 DataLayout::NHWC)
Jan Eilers59c66702019-07-11 10:22:36 +010084ARMNN_AUTO_TEST_CASE(Convolution2d2x2Dilation2x2Padding2x2Stride3x3,
85 Convolution2d2x2Dilation2x2Padding2x2Stride3x3Test
Sadik Armagan581742d2019-08-12 14:11:37 +010086 <DataType::Float32, DataType::Float32>,
Jan Eilers59c66702019-07-11 10:22:36 +010087 false,
Sadik Armagan581742d2019-08-12 14:11:37 +010088 DataLayout::NCHW)
Jan Eilers59c66702019-07-11 10:22:36 +010089ARMNN_AUTO_TEST_CASE(Convolution2d2x2Dilation2x2Padding2x2Stride3x3Nhwc,
90 Convolution2d2x2Dilation2x2Padding2x2Stride3x3Test
Sadik Armagan581742d2019-08-12 14:11:37 +010091 <DataType::Float32, DataType::Float32>,
Jan Eilers59c66702019-07-11 10:22:36 +010092 false,
Sadik Armagan581742d2019-08-12 14:11:37 +010093 DataLayout::NHWC)
Jan Eilers59c66702019-07-11 10:22:36 +010094ARMNN_AUTO_TEST_CASE(Convolution2d2x2Dilation2x2Padding2x2Stride3x3Uint8,
95 Convolution2d2x2Dilation2x2Padding2x2Stride3x3Test
Sadik Armagan581742d2019-08-12 14:11:37 +010096 <DataType::QuantisedAsymm8, DataType::Signed32>,
Jan Eilers59c66702019-07-11 10:22:36 +010097 false,
Sadik Armagan581742d2019-08-12 14:11:37 +010098 DataLayout::NCHW)
Jan Eilers59c66702019-07-11 10:22:36 +010099ARMNN_AUTO_TEST_CASE(Convolution2d2x2Dilation2x2Padding2x2Stride3x3NhwcUint8,
100 Convolution2d2x2Dilation2x2Padding2x2Stride3x3Test
Sadik Armagan581742d2019-08-12 14:11:37 +0100101 <DataType::QuantisedAsymm8, DataType::Signed32>,
Jan Eilers59c66702019-07-11 10:22:36 +0100102 false,
Sadik Armagan581742d2019-08-12 14:11:37 +0100103 DataLayout::NHWC)
Kevin May665a964a2019-08-21 16:53:50 +0100104ARMNN_AUTO_TEST_CASE(DepthwiseConvolution2dMult4,
105 DepthwiseConvolution2dMult4Test<armnn::DataType::Float32, armnn::DataType::Float32>,
106 false,
107 armnn::DataLayout::NCHW)
108ARMNN_AUTO_TEST_CASE(DepthwiseConvolution2dMult2,
109 DepthwiseConvolution2dMult2Test<armnn::DataType::Float32, armnn::DataType::Float32>,
110 false,
111 armnn::DataLayout::NCHW)
Jan Eilers59c66702019-07-11 10:22:36 +0100112
telsoa014fcda012018-03-09 14:13:49 +0000113// Depthwise Convolution
jimfly01b9c89632018-10-26 16:50:13 +0100114ARMNN_AUTO_TEST_CASE(DepthwiseConvolution2dDepthMul1,
Sadik Armagan581742d2019-08-12 14:11:37 +0100115 DepthwiseConvolution2dDepthMul1Test, true, DataLayout::NCHW)
jimfly01b9c89632018-10-26 16:50:13 +0100116ARMNN_AUTO_TEST_CASE(UnbiasedDepthwiseConvolution2dDepthMul1,
Sadik Armagan581742d2019-08-12 14:11:37 +0100117 DepthwiseConvolution2dDepthMul1Test, false, DataLayout::NCHW)
jimfly01b9c89632018-10-26 16:50:13 +0100118ARMNN_AUTO_TEST_CASE(DepthwiseConvolution2dDepthMul1Uint8,
Sadik Armagan581742d2019-08-12 14:11:37 +0100119 DepthwiseConvolution2dDepthMul1Uint8Test, true, DataLayout::NCHW)
jimfly01b9c89632018-10-26 16:50:13 +0100120ARMNN_AUTO_TEST_CASE(UnbiasedDepthwiseConvolution2dDepthMul1Uint8,
Sadik Armagan581742d2019-08-12 14:11:37 +0100121 DepthwiseConvolution2dDepthMul1Uint8Test, false, DataLayout::NCHW)
jimfly01b9c89632018-10-26 16:50:13 +0100122
123// NHWC Depthwise Convolution
124ARMNN_AUTO_TEST_CASE(DepthwiseConvolution2dDepthMul1NHhwc,
Sadik Armagan581742d2019-08-12 14:11:37 +0100125 DepthwiseConvolution2dDepthMul1Test, true, DataLayout::NHWC)
jimfly01b9c89632018-10-26 16:50:13 +0100126ARMNN_AUTO_TEST_CASE(UnbiasedDepthwiseConvolution2dDepthMul1Nhwc,
Sadik Armagan581742d2019-08-12 14:11:37 +0100127 DepthwiseConvolution2dDepthMul1Test, false, DataLayout::NHWC)
jimfly01b9c89632018-10-26 16:50:13 +0100128ARMNN_AUTO_TEST_CASE(DepthwiseConvolution2dDepthMul1Uint8Nhwc,
Sadik Armagan581742d2019-08-12 14:11:37 +0100129 DepthwiseConvolution2dDepthMul1Uint8Test, true, DataLayout::NHWC)
jimfly01b9c89632018-10-26 16:50:13 +0100130ARMNN_AUTO_TEST_CASE(UnbiasedDepthwiseConvolution2dDepthMul1Uint8Nhwc,
Sadik Armagan581742d2019-08-12 14:11:37 +0100131 DepthwiseConvolution2dDepthMul1Uint8Test, false, DataLayout::NHWC)
jimfly01b9c89632018-10-26 16:50:13 +0100132
Nikhil Rajcec6b652018-10-12 13:51:57 +0100133ARMNN_AUTO_TEST_CASE(DepthwiseConvolution2dDepthNhwc, DepthwiseConvolution2dDepthNhwcTest, false)
Bruno Goncalves22972f02019-04-26 21:03:24 -0300134ARMNN_AUTO_TEST_CASE(SimpleDepthwiseConvolution2d3x3Dilation3x3Nhwc,
135 SimpleDepthwiseConvolution2d3x3Dilation3x3NhwcTest)
jimfly01b9c89632018-10-26 16:50:13 +0100136
telsoa014fcda012018-03-09 14:13:49 +0000137
jimfly01382a91d2018-10-26 15:55:50 +0100138ARMNN_AUTO_TEST_CASE(DepthwiseConvolution2dAsymmetric,
Sadik Armagan581742d2019-08-12 14:11:37 +0100139 DepthwiseConvolution2dAsymmetricTest, true, DataLayout::NCHW)
jimfly01382a91d2018-10-26 15:55:50 +0100140ARMNN_AUTO_TEST_CASE(UnbiasedDepthwiseConvolution2dAsymmetric,
Sadik Armagan581742d2019-08-12 14:11:37 +0100141 DepthwiseConvolution2dAsymmetricTest, false, DataLayout::NCHW)
jimfly01382a91d2018-10-26 15:55:50 +0100142ARMNN_AUTO_TEST_CASE(DepthwiseConvolution2dAsymmetricNhwc,
Sadik Armagan581742d2019-08-12 14:11:37 +0100143 DepthwiseConvolution2dAsymmetricTest, true, DataLayout::NHWC)
jimfly01382a91d2018-10-26 15:55:50 +0100144ARMNN_AUTO_TEST_CASE(UnbiasedDepthwiseConvolution2dAsymmetricNhwc,
Sadik Armagan581742d2019-08-12 14:11:37 +0100145 DepthwiseConvolution2dAsymmetricTest, false, DataLayout::NHWC)
surmeh013537c2c2018-05-18 16:31:43 +0100146
Matthew Jackson99107922019-07-25 12:58:56 +0100147ARMNN_AUTO_TEST_CASE(DepthwiseConvolution2dDepthMul64, DepthwiseConvolution2dDepthMul64Test);
148
telsoa014fcda012018-03-09 14:13:49 +0000149namespace
150{
151
Sadik Armagan581742d2019-08-12 14:11:37 +0100152DepthwiseConvolution2dDescriptor MakeDepthwiseConv2dDesc(uint32_t strideX, uint32_t strideY,
telsoa014fcda012018-03-09 14:13:49 +0000153 uint32_t depthMultiplier = 1, uint32_t padLeft = 0, uint32_t padRight = 0,
154 uint32_t padTop = 0, uint32_t padBottom = 0)
155{
telsoa01c577f2c2018-08-31 09:22:23 +0100156 boost::ignore_unused(depthMultiplier);
157
Sadik Armagan581742d2019-08-12 14:11:37 +0100158 DepthwiseConvolution2dDescriptor desc;
telsoa01c577f2c2018-08-31 09:22:23 +0100159
telsoa014fcda012018-03-09 14:13:49 +0000160 desc.m_PadLeft = padLeft;
161 desc.m_PadRight = padRight;
telsoa01c577f2c2018-08-31 09:22:23 +0100162
telsoa014fcda012018-03-09 14:13:49 +0000163 desc.m_PadTop = padTop;
164 desc.m_PadBottom = padBottom;
165 desc.m_StrideX = strideX;
166 desc.m_StrideY = strideY;
telsoa01c577f2c2018-08-31 09:22:23 +0100167 desc.m_BiasEnabled = false;
168
telsoa014fcda012018-03-09 14:13:49 +0000169 return desc;
170}
171
Sadik Armagan581742d2019-08-12 14:11:37 +0100172TensorInfo CreateOutputTensorInfo(const TensorInfo& inputInfo,
173 const TensorInfo& weightsInfo,
174 const DepthwiseConvolution2dDescriptor& descriptor,
175 DataType dataType)
telsoa01c577f2c2018-08-31 09:22:23 +0100176{
Sadik Armagan581742d2019-08-12 14:11:37 +0100177 const TensorShape& inputShape = inputInfo.GetShape();
178 const TensorShape& filterShape = weightsInfo.GetShape();
telsoa01c577f2c2018-08-31 09:22:23 +0100179
180 unsigned int inWidth = inputShape[3];
181 unsigned int inHeight = inputShape[2];
182 unsigned int inBatchSize = inputShape[0];
183
184 unsigned int filterWidth = filterShape[3];
185 unsigned int readWidth = (inWidth + descriptor.m_PadLeft + descriptor.m_PadRight) - (filterWidth);
186 unsigned int outWidth = 1u + (readWidth / descriptor.m_StrideX);
187
188 unsigned int filterHeight = filterShape[2];
189 unsigned int readHeight = (inHeight + descriptor.m_PadTop + descriptor.m_PadBottom) - (filterHeight);
190 unsigned int outHeight = 1u + (readHeight / descriptor.m_StrideY);
191 unsigned int depthMultiplier = filterShape[0];
192
193 unsigned int outChannels = filterShape[1] * depthMultiplier;
194 unsigned int outBatchSize = inBatchSize;
195
Sadik Armagan581742d2019-08-12 14:11:37 +0100196 TensorShape outputShape({outBatchSize, outChannels, outHeight, outWidth});
197 return TensorInfo(outputShape, dataType);
telsoa01c577f2c2018-08-31 09:22:23 +0100198}
telsoa014fcda012018-03-09 14:13:49 +0000199}
200
201BOOST_AUTO_TEST_CASE(DepthwiseConv2dUtils)
202{
Sadik Armagan581742d2019-08-12 14:11:37 +0100203 const DataType dataType = DataType::Float32;
telsoa01c577f2c2018-08-31 09:22:23 +0100204
Sadik Armagan581742d2019-08-12 14:11:37 +0100205 TensorInfo inputInfo({1, 1, 10, 10 }, dataType);
206 TensorInfo outputInfo;
207 TensorInfo weightsInfo3x3({ 1, 1, 3, 3 }, dataType);
208 TensorInfo biasesInfo;
telsoa01c577f2c2018-08-31 09:22:23 +0100209
Sadik Armagan581742d2019-08-12 14:11:37 +0100210 DepthwiseConvolution2dDescriptor descriptor;
211 NeonLayerSupport layerSupport;
telsoa014fcda012018-03-09 14:13:49 +0000212
213 // Strides supported: 1,2,3
telsoa01c577f2c2018-08-31 09:22:23 +0100214 descriptor = MakeDepthwiseConv2dDesc(1, 1);
215 outputInfo = CreateOutputTensorInfo(inputInfo, weightsInfo3x3, descriptor, dataType);
Aron Virginas-Tarfc824312018-10-15 15:00:13 +0100216 BOOST_TEST(layerSupport.IsDepthwiseConvolutionSupported(inputInfo, outputInfo, descriptor,
217 weightsInfo3x3, biasesInfo));
telsoa014fcda012018-03-09 14:13:49 +0000218
telsoa01c577f2c2018-08-31 09:22:23 +0100219 descriptor = MakeDepthwiseConv2dDesc(1, 2);
220 outputInfo = CreateOutputTensorInfo(inputInfo, weightsInfo3x3, descriptor, dataType);
Aron Virginas-Tarfc824312018-10-15 15:00:13 +0100221 BOOST_TEST(layerSupport.IsDepthwiseConvolutionSupported(inputInfo, outputInfo, descriptor,
222 weightsInfo3x3, biasesInfo));
telsoa01c577f2c2018-08-31 09:22:23 +0100223
224 descriptor = MakeDepthwiseConv2dDesc(1, 3);
225 outputInfo = CreateOutputTensorInfo(inputInfo, weightsInfo3x3, descriptor, dataType);
Aron Virginas-Tarfc824312018-10-15 15:00:13 +0100226 BOOST_TEST(layerSupport.IsDepthwiseConvolutionSupported(inputInfo, outputInfo, descriptor,
227 weightsInfo3x3, biasesInfo));
telsoa01c577f2c2018-08-31 09:22:23 +0100228
229 descriptor = MakeDepthwiseConv2dDesc(2, 1);
230 outputInfo = CreateOutputTensorInfo(inputInfo, weightsInfo3x3, descriptor, dataType);
Aron Virginas-Tarfc824312018-10-15 15:00:13 +0100231 BOOST_TEST(layerSupport.IsDepthwiseConvolutionSupported(inputInfo, outputInfo, descriptor,
232 weightsInfo3x3, biasesInfo));
telsoa01c577f2c2018-08-31 09:22:23 +0100233
234 descriptor = MakeDepthwiseConv2dDesc(2, 2);
235 outputInfo = CreateOutputTensorInfo(inputInfo, weightsInfo3x3, descriptor, dataType);
Aron Virginas-Tarfc824312018-10-15 15:00:13 +0100236 BOOST_TEST(layerSupport.IsDepthwiseConvolutionSupported(inputInfo, outputInfo, descriptor,
237 weightsInfo3x3, biasesInfo));
telsoa01c577f2c2018-08-31 09:22:23 +0100238
239 descriptor = MakeDepthwiseConv2dDesc(2, 3);
240 outputInfo = CreateOutputTensorInfo(inputInfo, weightsInfo3x3, descriptor, dataType);
Aron Virginas-Tarfc824312018-10-15 15:00:13 +0100241 BOOST_TEST(layerSupport.IsDepthwiseConvolutionSupported(inputInfo, outputInfo, descriptor,
242 weightsInfo3x3, biasesInfo));
telsoa01c577f2c2018-08-31 09:22:23 +0100243
244 descriptor = MakeDepthwiseConv2dDesc(3, 1);
245 outputInfo = CreateOutputTensorInfo(inputInfo, weightsInfo3x3, descriptor, dataType);
Aron Virginas-Tarfc824312018-10-15 15:00:13 +0100246 BOOST_TEST(layerSupport.IsDepthwiseConvolutionSupported(inputInfo, outputInfo, descriptor,
247 weightsInfo3x3, biasesInfo));
telsoa01c577f2c2018-08-31 09:22:23 +0100248
249 descriptor = MakeDepthwiseConv2dDesc(3, 2);
250 outputInfo = CreateOutputTensorInfo(inputInfo, weightsInfo3x3, descriptor, dataType);
Aron Virginas-Tarfc824312018-10-15 15:00:13 +0100251 BOOST_TEST(layerSupport.IsDepthwiseConvolutionSupported(inputInfo, outputInfo, descriptor,
252 weightsInfo3x3, biasesInfo));
telsoa01c577f2c2018-08-31 09:22:23 +0100253
254 descriptor = MakeDepthwiseConv2dDesc(3, 3);
255 outputInfo = CreateOutputTensorInfo(inputInfo, weightsInfo3x3, descriptor, dataType);
Aron Virginas-Tarfc824312018-10-15 15:00:13 +0100256 BOOST_TEST(layerSupport.IsDepthwiseConvolutionSupported(inputInfo, outputInfo, descriptor,
257 weightsInfo3x3, biasesInfo));
telsoa01c577f2c2018-08-31 09:22:23 +0100258
259 // Supported stride 4
260 descriptor = MakeDepthwiseConv2dDesc(4, 1);
261 outputInfo = CreateOutputTensorInfo(inputInfo, weightsInfo3x3, descriptor, dataType);
Aron Virginas-Tarfc824312018-10-15 15:00:13 +0100262 BOOST_TEST(layerSupport.IsDepthwiseConvolutionSupported(inputInfo, outputInfo, descriptor,
263 weightsInfo3x3, biasesInfo));
telsoa014fcda012018-03-09 14:13:49 +0000264
265 // Supported weights shape 1x1
Sadik Armagan581742d2019-08-12 14:11:37 +0100266 TensorInfo weightsInfo1x1({ 1, 1, 1, 1 }, DataType::Float32);
telsoa01c577f2c2018-08-31 09:22:23 +0100267 descriptor = MakeDepthwiseConv2dDesc(1, 1);
268 outputInfo = CreateOutputTensorInfo(inputInfo, weightsInfo1x1, descriptor, dataType);
Aron Virginas-Tarfc824312018-10-15 15:00:13 +0100269 BOOST_TEST(layerSupport.IsDepthwiseConvolutionSupported(inputInfo, outputInfo, descriptor,
270 weightsInfo1x1, biasesInfo));
telsoa014fcda012018-03-09 14:13:49 +0000271
272 // Supported shape 2x2
Sadik Armagan581742d2019-08-12 14:11:37 +0100273 TensorInfo weightsInfo2x2({ 1, 1, 2, 2 }, DataType::Float32);
telsoa01c577f2c2018-08-31 09:22:23 +0100274 descriptor = MakeDepthwiseConv2dDesc(1, 1);
275 outputInfo = CreateOutputTensorInfo(inputInfo, weightsInfo2x2, descriptor, dataType);
Aron Virginas-Tarfc824312018-10-15 15:00:13 +0100276 BOOST_TEST(layerSupport.IsDepthwiseConvolutionSupported(inputInfo, outputInfo, descriptor,
277 weightsInfo2x2, biasesInfo));
surmeh013537c2c2018-05-18 16:31:43 +0100278
279 // Asymmetric padding
telsoa01c577f2c2018-08-31 09:22:23 +0100280 descriptor = MakeDepthwiseConv2dDesc(1, 1, 1, 1, 2, 1, 2);
281 outputInfo = CreateOutputTensorInfo(inputInfo, weightsInfo3x3, descriptor, dataType);
Aron Virginas-Tarfc824312018-10-15 15:00:13 +0100282 BOOST_TEST(layerSupport.IsDepthwiseConvolutionSupported(inputInfo, outputInfo, descriptor,
283 weightsInfo3x3, biasesInfo));
telsoa014fcda012018-03-09 14:13:49 +0000284}
285
Narumol Prangnawarat01961a72019-05-30 16:47:12 +0100286// Dequantize
287ARMNN_AUTO_TEST_CASE(DequantizeSimpleUint8, DequantizeSimpleUint8Test)
288ARMNN_AUTO_TEST_CASE(DequantizeOffsetUint8, DequantizeOffsetUint8Test)
289
telsoa014fcda012018-03-09 14:13:49 +0000290// Pooling
291ARMNN_AUTO_TEST_CASE(SimpleMaxPooling2dSize3x3Stride2x4, SimpleMaxPooling2dSize3x3Stride2x4Test, true)
292ARMNN_AUTO_TEST_CASE(SimpleMaxPooling2dSize3x3Stride2x4Uint8, SimpleMaxPooling2dSize3x3Stride2x4Uint8Test, true)
James Conroy45a9b772018-10-31 11:47:53 +0000293
Sadik Armagan581742d2019-08-12 14:11:37 +0100294ARMNN_AUTO_TEST_CASE(SimpleMaxPooling2d, SimpleMaxPooling2dTest, DataLayout::NCHW)
295ARMNN_AUTO_TEST_CASE(SimpleMaxPooling2dNhwc, SimpleMaxPooling2dTest, DataLayout::NHWC)
296ARMNN_AUTO_TEST_CASE(SimpleMaxPooling2dUint8, SimpleMaxPooling2dUint8Test, DataLayout::NCHW)
297ARMNN_AUTO_TEST_CASE(SimpleMaxPooling2dUint8Nhwc, SimpleMaxPooling2dUint8Test, DataLayout::NHWC)
James Conroy45a9b772018-10-31 11:47:53 +0000298
Sadik Armagan581742d2019-08-12 14:11:37 +0100299ARMNN_AUTO_TEST_CASE(SimpleAveragePooling2d, SimpleAveragePooling2dTest, DataLayout::NCHW)
300ARMNN_AUTO_TEST_CASE(SimpleAveragePooling2dNhwc, SimpleAveragePooling2dTest, DataLayout::NCHW)
301ARMNN_AUTO_TEST_CASE(SimpleAveragePooling2dUint8, SimpleAveragePooling2dUint8Test, DataLayout::NCHW)
302ARMNN_AUTO_TEST_CASE(SimpleAveragePooling2dUint8Nhwc, SimpleAveragePooling2dUint8Test, DataLayout::NHWC)
surmeh01bceff2f2018-03-29 16:29:27 +0100303
telsoa014fcda012018-03-09 14:13:49 +0000304ARMNN_AUTO_TEST_CASE(LargeTensorsAveragePooling2d, LargeTensorsAveragePooling2dTest)
305ARMNN_AUTO_TEST_CASE(LargeTensorsAveragePooling2dUint8, LargeTensorsAveragePooling2dUint8Test)
306
Sadik Armagan581742d2019-08-12 14:11:37 +0100307ARMNN_AUTO_TEST_CASE(SimpleL2Pooling2d, SimpleL2Pooling2dTest, DataLayout::NCHW)
308ARMNN_AUTO_TEST_CASE(SimpleL2Pooling2dNeon, SimpleL2Pooling2dTest, DataLayout::NHWC)
309ARMNN_AUTO_TEST_CASE(UNSUPPORTED_SimpleL2Pooling2dUint8, SimpleL2Pooling2dUint8Test, DataLayout::NCHW)
James Conroy45a9b772018-10-31 11:47:53 +0000310
telsoa014fcda012018-03-09 14:13:49 +0000311ARMNN_AUTO_TEST_CASE(L2Pooling2dSize3Stride1, L2Pooling2dSize3Stride1Test)
312ARMNN_AUTO_TEST_CASE(UNSUPPORTED_L2Pooling2dSize3Stride1Uint8, L2Pooling2dSize3Stride1Uint8Test)
313ARMNN_AUTO_TEST_CASE(L2Pooling2dSize3Stride3, L2Pooling2dSize3Stride3Test)
314ARMNN_AUTO_TEST_CASE(UNSUPPORTED_L2Pooling2dSize3Stride3Uint8, L2Pooling2dSize3Stride3Uint8Test)
315ARMNN_AUTO_TEST_CASE(L2Pooling2dSize3Stride4, L2Pooling2dSize3Stride4Test)
316ARMNN_AUTO_TEST_CASE(UNSUPPORTED_L2Pooling2dSize3Stride4Uint8, L2Pooling2dSize3Stride4Uint8Test)
317ARMNN_AUTO_TEST_CASE(L2Pooling2dSize7, L2Pooling2dSize7Test)
318ARMNN_AUTO_TEST_CASE(UNSUPPORTED_L2Pooling2dSize7Uint8, L2Pooling2dSize7Uint8Test)
319ARMNN_AUTO_TEST_CASE(L2Pooling2dSize9, L2Pooling2dSize9Test)
320ARMNN_AUTO_TEST_CASE(UNSUPPORTED_L2Pooling2dSize9Uint8, L2Pooling2dSize9Uint8Test)
321
322// Ignore padding values for pooling but count padding fields into the divisor
323ARMNN_AUTO_TEST_CASE(IgnorePaddingSimpleMaxPooling2d, IgnorePaddingSimpleMaxPooling2dTest)
324ARMNN_AUTO_TEST_CASE(IgnorePaddingSimpleMaxPooling2dUint8, IgnorePaddingSimpleMaxPooling2dUint8Test)
325ARMNN_AUTO_TEST_CASE(IgnorePaddingMaxPooling2dSize3, IgnorePaddingMaxPooling2dSize3Test)
326ARMNN_AUTO_TEST_CASE(IgnorePaddingMaxPooling2dSize3Uint8, IgnorePaddingMaxPooling2dSize3Uint8Test)
327
328ARMNN_AUTO_TEST_CASE(IgnorePaddingSimpleAveragePooling2d, IgnorePaddingSimpleAveragePooling2dTest)
329ARMNN_AUTO_TEST_CASE(IgnorePaddingSimpleAveragePooling2dUint8, IgnorePaddingSimpleAveragePooling2dUint8Test)
330ARMNN_AUTO_TEST_CASE(IgnorePaddingSimpleAveragePooling2dNoPadding, IgnorePaddingSimpleAveragePooling2dNoPaddingTest)
331ARMNN_AUTO_TEST_CASE(IgnorePaddingSimpleAveragePooling2dNoPaddingUint8,
332 IgnorePaddingSimpleAveragePooling2dNoPaddingUint8Test)
333ARMNN_AUTO_TEST_CASE(IgnorePaddingAveragePooling2dSize3, IgnorePaddingAveragePooling2dSize3Test)
334ARMNN_AUTO_TEST_CASE(IgnorePaddingAveragePooling2dSize3Uint8, IgnorePaddingAveragePooling2dSize3Uint8Test)
surmeh01bceff2f2018-03-29 16:29:27 +0100335ARMNN_AUTO_TEST_CASE(IgnorePaddingAveragePooling2dSize3x2Stride2x2,
336 IgnorePaddingAveragePooling2dSize3x2Stride2x2Test, false)
337ARMNN_AUTO_TEST_CASE(IgnorePaddingAveragePooling2dSize3x2Stride2x2NoPadding,
338 IgnorePaddingAveragePooling2dSize3x2Stride2x2Test,
339 true)
telsoa014fcda012018-03-09 14:13:49 +0000340
341ARMNN_AUTO_TEST_CASE(IgnorePaddingSimpleL2Pooling2d, IgnorePaddingSimpleL2Pooling2dTest)
342ARMNN_AUTO_TEST_CASE(UNSUPPORTED_IgnorePaddingSimpleL2Pooling2dUint8, IgnorePaddingSimpleL2Pooling2dUint8Test)
343ARMNN_AUTO_TEST_CASE(IgnorePaddingL2Pooling2dSize3, IgnorePaddingL2Pooling2dSize3Test)
344ARMNN_AUTO_TEST_CASE(UNSUPPORTED_IgnorePaddingL2Pooling2dSize3Uint8, IgnorePaddingL2Pooling2dSize3Uint8Test)
345
346// Activation
347ARMNN_AUTO_TEST_CASE(ConstantLinearActivation, ConstantLinearActivationTest)
348
Narumol Prangnawarat65d30962019-03-14 11:55:03 +0000349// ReLu
350ARMNN_AUTO_TEST_CASE(ReLu1Uint8, BoundedReLuUint8UpperAndLowerBoundTest)
351ARMNN_AUTO_TEST_CASE(ReLu6Uint8, BoundedReLuUint8UpperBoundOnlyTest)
352
Narumol Prangnawaratb98bbcf2019-04-15 14:14:27 +0100353// Sigmoid
354ARMNN_AUTO_TEST_CASE(SimpleSigmoid, SimpleSigmoidTest)
355ARMNN_AUTO_TEST_CASE(SimpleSigmoidUint8, SimpleSigmoidUint8Test)
356
Narumol Prangnawarat65d30962019-03-14 11:55:03 +0000357// Softmax
telsoa014fcda012018-03-09 14:13:49 +0000358ARMNN_AUTO_TEST_CASE(SimpleSoftmaxBeta1, SimpleSoftmaxTest, 1.0f)
359ARMNN_AUTO_TEST_CASE(SimpleSoftmaxBeta2, SimpleSoftmaxTest, 2.0f)
telsoa014fcda012018-03-09 14:13:49 +0000360ARMNN_AUTO_TEST_CASE(SimpleSoftmaxBeta1Uint8, SimpleSoftmaxUint8Test, 1.0f)
361ARMNN_AUTO_TEST_CASE(SimpleSoftmaxBeta2Uint8, SimpleSoftmaxUint8Test, 2.0f)
362
Narumol Prangnawarat65d30962019-03-14 11:55:03 +0000363ARMNN_AUTO_TEST_CASE(Simple3dSoftmaxBeta1, Simple3dSoftmaxTest, 1.0f)
364ARMNN_AUTO_TEST_CASE(Simple3dSoftmaxBeta1Uint8, Simple3dSoftmaxUint8Test, 1.0f)
365
366ARMNN_AUTO_TEST_CASE(Simple4dSoftmaxBeta1, Simple4dSoftmaxTest, 1.0f)
367ARMNN_AUTO_TEST_CASE(Simple4dSoftmaxBeta1Uint8, Simple4dSoftmaxUint8Test, 1.0f)
telsoa014fcda012018-03-09 14:13:49 +0000368
Ellen Norris-Thompson29794572019-06-26 16:40:36 +0100369// SpaceToDepth
Aron Virginas-Tar00d306e2019-08-28 18:08:46 +0100370ARMNN_AUTO_TEST_CASE(SpaceToDepthNchwAsymmQ8, SpaceToDepthNchwAsymmQ8Test)
371ARMNN_AUTO_TEST_CASE(SpaceToDepthNhwcsymmQ8, SpaceToDepthNhwcAsymmQ8Test)
Ellen Norris-Thompson29794572019-06-26 16:40:36 +0100372
Aron Virginas-Tar00d306e2019-08-28 18:08:46 +0100373ARMNN_AUTO_TEST_CASE(SpaceToDepthNhwc1Float32, SpaceToDepthNhwcFloat32Test1)
374ARMNN_AUTO_TEST_CASE(SpaceToDepthNchw1Float32, SpaceToDepthNchwFloat32Test1)
Ellen Norris-Thompson29794572019-06-26 16:40:36 +0100375
Aron Virginas-Tar00d306e2019-08-28 18:08:46 +0100376ARMNN_AUTO_TEST_CASE(SpaceToDepthNhwc2Float32, SpaceToDepthNhwcFloat32Test2)
377ARMNN_AUTO_TEST_CASE(SpaceToDepthNchw2Float32, SpaceToDepthNchwFloat32Test2)
Ellen Norris-Thompson29794572019-06-26 16:40:36 +0100378
Aron Virginas-Tar00d306e2019-08-28 18:08:46 +0100379ARMNN_AUTO_TEST_CASE(SpaceToDepthNhwcQSymm16, SpaceToDepthNhwcQSymm16Test)
380ARMNN_AUTO_TEST_CASE(SpaceToDepthNchwQSymm16, SpaceToDepthNchwQSymm16Test)
Ellen Norris-Thompson29794572019-06-26 16:40:36 +0100381
telsoa01c577f2c2018-08-31 09:22:23 +0100382// Splitter
Matthew Jackson9bff1442019-09-12 09:08:23 +0100383ARMNN_AUTO_TEST_CASE(SimpleSplitterFloat32, SplitterFloat32Test)
telsoa01c577f2c2018-08-31 09:22:23 +0100384ARMNN_AUTO_TEST_CASE(SimpleSplitterUint8, SplitterUint8Test)
telsoa014fcda012018-03-09 14:13:49 +0000385
Matthew Jackson9bff1442019-09-12 09:08:23 +0100386ARMNN_AUTO_TEST_CASE(CopyViaSplitterFloat32, CopyViaSplitterFloat32Test)
telsoa014fcda012018-03-09 14:13:49 +0000387ARMNN_AUTO_TEST_CASE(CopyViaSplitterUint8, CopyViaSplitterUint8Test)
388
Jim Flynn4ed6c832019-05-20 11:02:46 +0100389// Concat
390ARMNN_AUTO_TEST_CASE(SimpleConcat, ConcatTest)
391ARMNN_AUTO_TEST_CASE(ConcatUint8, ConcatUint8Test)
Narumol Prangnawarat71c80b12019-06-17 17:45:43 +0100392ARMNN_AUTO_TEST_CASE(ConcatUint8DifferentInputOutputQParam,
Sadik Armagan581742d2019-08-12 14:11:37 +0100393 ConcatDifferentInputOutputQParamTest<DataType::QuantisedAsymm8>, false)
telsoa014fcda012018-03-09 14:13:49 +0000394
395// Fully Connected
396ARMNN_AUTO_TEST_CASE(SimpleFullyConnected, FullyConnectedFloat32Test, false, false)
397ARMNN_AUTO_TEST_CASE(SimpleFullyConnectedWithBias, FullyConnectedFloat32Test, true, false)
398ARMNN_AUTO_TEST_CASE(SimpleFullyConnectedWithTranspose, FullyConnectedFloat32Test, false, true)
399ARMNN_AUTO_TEST_CASE(FullyConnectedLarge, FullyConnectedLargeTest, false)
400ARMNN_AUTO_TEST_CASE(FullyConnectedLargeTransposed, FullyConnectedLargeTest, true)
Sadik Armagan581742d2019-08-12 14:11:37 +0100401ARMNN_AUTO_TEST_CASE(FullyConnectedUint8, FullyConnectedTest<DataType::QuantisedAsymm8>, false)
402ARMNN_AUTO_TEST_CASE(FullyConnectedBiasedUint8, FullyConnectedTest<DataType::QuantisedAsymm8>, true)
telsoa014fcda012018-03-09 14:13:49 +0000403
404// Add
405ARMNN_AUTO_TEST_CASE(SimpleAdd, AdditionTest)
Matthew Jacksondba634f2019-08-15 15:14:18 +0100406ARMNN_AUTO_TEST_CASE(Add5d, Addition5dTest)
David Beckbc392452018-09-10 14:47:28 +0100407ARMNN_AUTO_TEST_CASE(AddBroadcast, AdditionBroadcastTest)
telsoa014fcda012018-03-09 14:13:49 +0000408ARMNN_AUTO_TEST_CASE(AddBroadcast1Element, AdditionBroadcast1ElementTest)
409
David Beckbc392452018-09-10 14:47:28 +0100410// Sub
411ARMNN_AUTO_TEST_CASE(SimpleSub, SubtractionTest)
Mohamed Nour Abouelseoud3d93bc42018-11-21 10:35:17 +0000412ARMNN_AUTO_TEST_CASE(SubBroadcast1Element, SubtractionBroadcast1ElementTest)
413ARMNN_AUTO_TEST_CASE(SubBroadcast, SubtractionBroadcastTest)
Conor Kennedyb99480b2019-03-08 08:24:41 +0000414ARMNN_AUTO_TEST_CASE(SubtractionUint8, SubtractionUint8Test)
415ARMNN_AUTO_TEST_CASE(SubBroadcastUint8, SubtractionBroadcastUint8Test)
416ARMNN_AUTO_TEST_CASE(SubBroadcast1ElementUint8, SubtractionBroadcast1ElementUint8Test)
David Beckbc392452018-09-10 14:47:28 +0100417
telsoa014fcda012018-03-09 14:13:49 +0000418// Mul
419ARMNN_AUTO_TEST_CASE(SimpleMultiplication, MultiplicationTest)
surmeh013537c2c2018-05-18 16:31:43 +0100420ARMNN_AUTO_TEST_CASE(MultiplicationBroadcast1Element, MultiplicationBroadcast1ElementTest)
421ARMNN_AUTO_TEST_CASE(MultiplicationBroadcast1DVector, MultiplicationBroadcast1DVectorTest)
Conor Kennedyb99480b2019-03-08 08:24:41 +0000422ARMNN_AUTO_TEST_CASE(MultiplicationUint8, MultiplicationUint8Test)
423ARMNN_AUTO_TEST_CASE(MultiplicationBroadcast1ElementUint8, MultiplicationBroadcast1ElementUint8Test)
424ARMNN_AUTO_TEST_CASE(MultiplicationBroadcast1DVectorUint8, MultiplicationBroadcast1DVectorUint8Test)
Matthew Jacksondba634f2019-08-15 15:14:18 +0100425ARMNN_AUTO_TEST_CASE(Multiplication5d, Multiplication5dTest)
telsoa014fcda012018-03-09 14:13:49 +0000426
427// Batch Norm
Matthew Jackson9bff1442019-09-12 09:08:23 +0100428ARMNN_AUTO_TEST_CASE(BatchNormFloat32, BatchNormFloat32Test)
429ARMNN_AUTO_TEST_CASE(BatchNormFloat32Nhwc, BatchNormFloat32NhwcTest)
telsoa014fcda012018-03-09 14:13:49 +0000430
431// Constant
432ARMNN_AUTO_TEST_CASE(Constant, ConstantTest)
Nina Drozd58ef2c62019-05-16 12:09:18 +0100433ARMNN_AUTO_TEST_CASE(ConstantUint8, ConstantUint8SimpleQuantizationScaleNoOffsetTest)
telsoa014fcda012018-03-09 14:13:49 +0000434
Aron Virginas-Tar00d306e2019-08-28 18:08:46 +0100435// Concat
436ARMNN_AUTO_TEST_CASE(Concat1d, Concat1dTest)
437ARMNN_AUTO_TEST_CASE(Concat1dUint8, Concat1dUint8Test)
telsoa014fcda012018-03-09 14:13:49 +0000438
Aron Virginas-Tar00d306e2019-08-28 18:08:46 +0100439ARMNN_AUTO_TEST_CASE(Concat2dDim0, Concat2dDim0Test)
440ARMNN_AUTO_TEST_CASE(Concat2dDim0Uint8, Concat2dDim0Uint8Test)
441ARMNN_AUTO_TEST_CASE(Concat2dDim1, Concat2dDim1Test)
442ARMNN_AUTO_TEST_CASE(Concat2dDim1Uint8, Concat2dDim1Uint8Test)
telsoa014fcda012018-03-09 14:13:49 +0000443
Aron Virginas-Tar00d306e2019-08-28 18:08:46 +0100444ARMNN_AUTO_TEST_CASE(Concat2dDim0DiffInputDims, Concat2dDim0DiffInputDimsTest)
445ARMNN_AUTO_TEST_CASE(Concat2dDim0DiffInputDimsUint8, Concat2dDim0DiffInputDimsUint8Test)
446ARMNN_AUTO_TEST_CASE(Concat2dDim1DiffInputDims, Concat2dDim1DiffInputDimsTest)
447ARMNN_AUTO_TEST_CASE(Concat2dDim1DiffInputDimsUint8, Concat2dDim1DiffInputDimsUint8Test)
telsoa014fcda012018-03-09 14:13:49 +0000448
Aron Virginas-Tar00d306e2019-08-28 18:08:46 +0100449ARMNN_AUTO_TEST_CASE(Concat3dDim0, Concat3dDim0Test)
450ARMNN_AUTO_TEST_CASE(Concat3dDim0Uint8, Concat3dDim0Uint8Test)
451ARMNN_AUTO_TEST_CASE(Concat3dDim1, Concat3dDim1Test)
452ARMNN_AUTO_TEST_CASE(Concat3dDim1Uint8, Concat3dDim1Uint8Test)
453ARMNN_AUTO_TEST_CASE(Concat3dDim2, Concat3dDim2Test, false)
454ARMNN_AUTO_TEST_CASE(Concat3dDim2Uint8, Concat3dDim2Uint8Test, false)
telsoa014fcda012018-03-09 14:13:49 +0000455
Aron Virginas-Tar00d306e2019-08-28 18:08:46 +0100456ARMNN_AUTO_TEST_CASE(Concat3dDim0DiffInputDims, Concat3dDim0DiffInputDimsTest)
457ARMNN_AUTO_TEST_CASE(Concat3dDim0DiffInputDimsUint8, Concat3dDim0DiffInputDimsUint8Test)
458ARMNN_AUTO_TEST_CASE(Concat3dDim1DiffInputDims, Concat3dDim1DiffInputDimsTest)
459ARMNN_AUTO_TEST_CASE(Concat3dDim1DiffInputDimsUint8, Concat3dDim1DiffInputDimsUint8Test)
460ARMNN_AUTO_TEST_CASE(Concat3dDim2DiffInputDims, Concat3dDim2DiffInputDimsTest, false)
461ARMNN_AUTO_TEST_CASE(Concat3dDim2DiffInputDimsUint8, Concat3dDim2DiffInputDimsUint8Test, false)
telsoa014fcda012018-03-09 14:13:49 +0000462
Aron Virginas-Tar00d306e2019-08-28 18:08:46 +0100463ARMNN_AUTO_TEST_CASE(Concat4dDim0, Concat4dDim0Test)
464ARMNN_AUTO_TEST_CASE(Concat4dDim1, Concat4dDim1Test)
465ARMNN_AUTO_TEST_CASE(Concat4dDim3, Concat4dDim3Test, false)
466ARMNN_AUTO_TEST_CASE(Concat4dDim0Uint8, Concat4dDim0Uint8Test)
467ARMNN_AUTO_TEST_CASE(Concat4dDim1Uint8, Concat4dDim1Uint8Test)
468ARMNN_AUTO_TEST_CASE(Concat4dDim3Uint8, Concat4dDim3Uint8Test, false)
narpra015cdda352018-11-19 15:30:27 +0000469
Aron Virginas-Tar00d306e2019-08-28 18:08:46 +0100470ARMNN_AUTO_TEST_CASE(Concat4dDiffShapeDim0, Concat4dDiffShapeDim0Test)
471ARMNN_AUTO_TEST_CASE(Concat4dDiffShapeDim1, Concat4dDiffShapeDim1Test)
472ARMNN_AUTO_TEST_CASE(Concat4dDiffShapeDim3, Concat4dDiffShapeDim3Test, false)
473ARMNN_AUTO_TEST_CASE(Concat4dDiffShapeDim0Uint8, Concat4dDiffShapeDim0Uint8Test)
474ARMNN_AUTO_TEST_CASE(Concat4dDiffShapeDim1Uint8, Concat4dDiffShapeDim1Uint8Test)
475ARMNN_AUTO_TEST_CASE(Concat4dDiffShapeDim3Uint8, Concat4dDiffShapeDim3Uint8Test, false)
telsoa014fcda012018-03-09 14:13:49 +0000476// L2 Normalization
Sadik Armagan581742d2019-08-12 14:11:37 +0100477ARMNN_AUTO_TEST_CASE(L2Normalization1d, L2Normalization1dTest, DataLayout::NCHW)
478ARMNN_AUTO_TEST_CASE(L2Normalization2d, L2Normalization2dTest, DataLayout::NCHW)
479ARMNN_AUTO_TEST_CASE(L2Normalization3d, L2Normalization3dTest, DataLayout::NCHW)
480ARMNN_AUTO_TEST_CASE(L2Normalization4d, L2Normalization4dTest, DataLayout::NCHW)
Matteo Martincigh539b44d2018-10-01 09:26:39 +0100481
Sadik Armagan581742d2019-08-12 14:11:37 +0100482ARMNN_AUTO_TEST_CASE(L2Normalization1dNhwc, L2Normalization1dTest, DataLayout::NHWC)
483ARMNN_AUTO_TEST_CASE(L2Normalization2dNhwc, L2Normalization2dTest, DataLayout::NHWC)
484ARMNN_AUTO_TEST_CASE(L2Normalization3dNhwc, L2Normalization3dTest, DataLayout::NHWC)
485ARMNN_AUTO_TEST_CASE(L2Normalization4dNhwc, L2Normalization4dTest, DataLayout::NHWC)
telsoa014fcda012018-03-09 14:13:49 +0000486
Matthew Jackson82b15ed2019-07-25 16:14:30 +0100487ARMNN_AUTO_TEST_CASE(L2Normalization2dShape, L2Normalization2dShapeTest);
488
Sadik Armagan581742d2019-08-12 14:11:37 +0100489ARMNN_AUTO_TEST_CASE(L2NormalizationDefaultEpsilon, L2NormalizationDefaultEpsilonTest, DataLayout::NCHW)
490ARMNN_AUTO_TEST_CASE(L2NormalizationNonDefaultEpsilon, L2NormalizationNonDefaultEpsilonTest, DataLayout::NCHW)
Ferran Balaguer0c64f462019-06-18 16:32:30 +0100491
telsoa014fcda012018-03-09 14:13:49 +0000492// Floor
Sadik Armagan581742d2019-08-12 14:11:37 +0100493ARMNN_AUTO_TEST_CASE(SimpleFloor, SimpleFloorTest<DataType::Float32>)
telsoa014fcda012018-03-09 14:13:49 +0000494
kevmay01eed85922019-01-28 08:37:25 +0000495// Greater
496ARMNN_AUTO_TEST_CASE(SimpleGreater, GreaterSimpleTest)
497ARMNN_AUTO_TEST_CASE(GreaterBroadcast1Element, GreaterBroadcast1ElementTest)
498ARMNN_AUTO_TEST_CASE(GreaterBroadcast1DVector, GreaterBroadcast1DVectorTest)
499ARMNN_AUTO_TEST_CASE(GreaterUint8, GreaterUint8Test)
500ARMNN_AUTO_TEST_CASE(GreaterBroadcast1ElementUint8, GreaterBroadcast1ElementUint8Test)
501ARMNN_AUTO_TEST_CASE(GreaterBroadcast1DVectorUint8, GreaterBroadcast1DVectorUint8Test)
502
telsoa014fcda012018-03-09 14:13:49 +0000503// Reshape
Nina Drozd8ed4b8c2019-05-29 10:41:04 +0100504ARMNN_AUTO_TEST_CASE(SimpleReshapeFloat32, SimpleReshapeTest<armnn::DataType::Float32>)
505ARMNN_AUTO_TEST_CASE(SimpleReshapeUint8, SimpleReshapeTest<armnn::DataType::QuantisedAsymm8>)
Matthew Jacksondba634f2019-08-15 15:14:18 +0100506ARMNN_AUTO_TEST_CASE(Reshape5d, Reshape5dTest<armnn::DataType::Float32>)
telsoa014fcda012018-03-09 14:13:49 +0000507
Éanna Ó Catháin12055742019-01-25 10:01:40 +0000508// Pad
509ARMNN_AUTO_TEST_CASE(PadFloat322d, PadFloat322dTest)
FinnWilliamsArma5b5bbf2019-07-08 14:11:33 +0100510ARMNN_AUTO_TEST_CASE(PadFloat322dCustomPadding, PadFloat322dCustomPaddingTest)
Éanna Ó Catháin12055742019-01-25 10:01:40 +0000511ARMNN_AUTO_TEST_CASE(PadFloat323d, PadFloat323dTest)
512ARMNN_AUTO_TEST_CASE(PadFloat324d, PadFloat324dTest)
513
Teresa Charlinec8e1982019-07-02 16:24:09 +0100514ARMNN_AUTO_TEST_CASE(PadUint82d, PadUint82dTest)
FinnWilliamsArma5b5bbf2019-07-08 14:11:33 +0100515ARMNN_AUTO_TEST_CASE(PadUint82dCustomPadding, PadUint82dCustomPaddingTest)
Teresa Charlinec8e1982019-07-02 16:24:09 +0100516ARMNN_AUTO_TEST_CASE(PadUint83d, PadUint83dTest)
517ARMNN_AUTO_TEST_CASE(PadUint84d, PadUint84dTest)
518
Sadik Armagan581742d2019-08-12 14:11:37 +0100519ARMNN_AUTO_TEST_CASE(Pad2dQSymm16, Pad2dTestCommon<DataType::QuantisedSymm16>, 2.0f, 0, 0.0f)
520ARMNN_AUTO_TEST_CASE(Pad2dQSymm16CustomPadding, Pad2dTestCommon<DataType::QuantisedSymm16>, 2.0f, 0, 1.0f)
521ARMNN_AUTO_TEST_CASE(Pad3dQSymm16, Pad3dTestCommon<DataType::QuantisedSymm16>, 2.0f, 0)
522ARMNN_AUTO_TEST_CASE(Pad4dQSymm16, Pad4dTestCommon<DataType::QuantisedSymm16>, 2.0f, 0)
FinnWilliamsArm8b797a82019-07-09 16:01:41 +0100523
telsoa014fcda012018-03-09 14:13:49 +0000524// Permute
Sadik Armagan581742d2019-08-12 14:11:37 +0100525ARMNN_AUTO_TEST_CASE(SimplePermuteFloat32, SimplePermuteTest<DataType::Float32>)
526ARMNN_AUTO_TEST_CASE(PermuteFloat32ValueSet1Test, PermuteValueSet1Test<DataType::Float32>)
527ARMNN_AUTO_TEST_CASE(PermuteFloat32ValueSet2Test, PermuteValueSet2Test<DataType::Float32>)
528ARMNN_AUTO_TEST_CASE(PermuteFloat32ValueSet3Test, PermuteValueSet3Test<DataType::Float32>)
529ARMNN_AUTO_TEST_CASE(SimplePermuteQASymm8, SimplePermuteTest<DataType::QuantisedAsymm8>)
530ARMNN_AUTO_TEST_CASE(PermuteQASymm8ValueSet1Test, PermuteValueSet1Test<DataType::QuantisedAsymm8>)
531ARMNN_AUTO_TEST_CASE(PermuteQASymm8ValueSet2Test, PermuteValueSet2Test<DataType::QuantisedAsymm8>)
532ARMNN_AUTO_TEST_CASE(PermuteQASymm8ValueSet3Test, PermuteValueSet3Test<DataType::QuantisedAsymm8>)
surmeh01bceff2f2018-03-29 16:29:27 +0100533
Les Bellde9011b2018-10-03 10:37:52 +0100534// Lstm
535ARMNN_AUTO_TEST_CASE(LstmLayerFloat32WithCifgWithPeepholeNoProjection,
536 LstmLayerFloat32WithCifgWithPeepholeNoProjectionTest)
537ARMNN_AUTO_TEST_CASE(LstmLayerFloat32NoCifgNoPeepholeNoProjection,
538 LstmLayerFloat32NoCifgNoPeepholeNoProjectionTest)
539ARMNN_AUTO_TEST_CASE(LstmLayerFloat32NoCifgWithPeepholeWithProjection,
540 LstmLayerFloat32NoCifgWithPeepholeWithProjectionTest)
Jan Eilersad5293a2019-07-08 09:57:55 +0100541ARMNN_AUTO_TEST_CASE(LstmLayerFloat32NoCifgWithPeepholeWithProjectionWithLayerNorm,
542 LstmLayerFloat32NoCifgWithPeepholeWithProjectionWithLayerNormTest)
Les Bellde9011b2018-10-03 10:37:52 +0100543
Francis Murtagh4fc3c482019-08-02 13:20:54 +0100544ARMNN_AUTO_TEST_CASE(QuantizedLstm, QuantizedLstmTest)
545
Matthew Benthamfd899962018-12-31 15:49:42 +0000546// Mean
Sadik Armagan581742d2019-08-12 14:11:37 +0100547ARMNN_AUTO_TEST_CASE(MeanSimpleFloat32, MeanSimpleTest<DataType::Float32>)
548ARMNN_AUTO_TEST_CASE(MeanSimpleAxisFloat32, MeanSimpleAxisTest<DataType::Float32>)
549ARMNN_AUTO_TEST_CASE(MeanKeepDimsFloat32, MeanKeepDimsTest<DataType::Float32>)
550ARMNN_AUTO_TEST_CASE(MeanMultipleDimsFloat32, MeanMultipleDimsTest<DataType::Float32>)
551ARMNN_AUTO_TEST_CASE(MeanVts1Float32, MeanVts1Test<DataType::Float32>)
552ARMNN_AUTO_TEST_CASE(MeanVts2Float32, MeanVts2Test<DataType::Float32>)
553ARMNN_AUTO_TEST_CASE(MeanVts3Float32, MeanVts3Test<DataType::Float32>)
Matthew Benthamfd899962018-12-31 15:49:42 +0000554
Sadik Armagan581742d2019-08-12 14:11:37 +0100555ARMNN_AUTO_TEST_CASE(MeanSimpleQuantisedAsymm8, MeanSimpleTest<DataType::QuantisedAsymm8>)
556ARMNN_AUTO_TEST_CASE(MeanSimpleAxisQuantisedAsymm8, MeanSimpleAxisTest<DataType::QuantisedAsymm8>)
557ARMNN_AUTO_TEST_CASE(MeanKeepDimsQuantisedAsymm8, MeanKeepDimsTest<DataType::QuantisedAsymm8>)
558ARMNN_AUTO_TEST_CASE(MeanMultipleDimsQuantisedAsymm8, MeanMultipleDimsTest<DataType::QuantisedAsymm8>)
559ARMNN_AUTO_TEST_CASE(MeanVts1QuantisedAsymm8, MeanVts1Test<DataType::QuantisedAsymm8>)
560ARMNN_AUTO_TEST_CASE(MeanVts2QuantisedAsymm8, MeanVts2Test<DataType::QuantisedAsymm8>)
561ARMNN_AUTO_TEST_CASE(MeanVts3QuantisedAsymm8, MeanVts3Test<DataType::QuantisedAsymm8>)
Matthew Benthamfd899962018-12-31 15:49:42 +0000562
Nattapat Chaimanowong4e6597a2018-12-20 14:14:06 +0000563// Max
564ARMNN_AUTO_TEST_CASE(SimpleMaximum, MaximumSimpleTest)
565ARMNN_AUTO_TEST_CASE(MaximumBroadcast1Element, MaximumBroadcast1ElementTest)
566ARMNN_AUTO_TEST_CASE(MaximumBroadcast1DVector, MaximumBroadcast1DVectorTest)
567ARMNN_AUTO_TEST_CASE(MaximumUint8, MaximumUint8Test)
568ARMNN_AUTO_TEST_CASE(MaximumBroadcast1ElementUint8, MaximumBroadcast1ElementUint8Test)
569ARMNN_AUTO_TEST_CASE(MaximumBroadcast1DVectorUint8, MaximumBroadcast1DVectorUint8Test)
570
Conor Kennedy54b21692019-01-09 07:57:38 +0000571// Min
572ARMNN_AUTO_TEST_CASE(SimpleMinimum1, MinimumBroadcast1ElementTest1)
573ARMNN_AUTO_TEST_CASE(SimpleMinimum2, MinimumBroadcast1ElementTest2)
574ARMNN_AUTO_TEST_CASE(Minimum1DVectorUint8, MinimumBroadcast1DVectorUint8Test)
575
narpra0155a97bc2018-10-02 14:35:53 +0100576// Normalization
577ARMNN_AUTO_TEST_CASE(SimpleNormalizationAcross, SimpleNormalizationAcrossTest)
578ARMNN_AUTO_TEST_CASE(SimpleNormalizationWithin, SimpleNormalizationWithinTest)
579ARMNN_AUTO_TEST_CASE(SimpleNormalizationAcrossNhwc, SimpleNormalizationAcrossNhwcTest)
580
Sadik Armaganc625f002018-12-17 11:32:16 +0000581// Resize Bilinear - NCHW data layout
Sadik Armagan581742d2019-08-12 14:11:37 +0100582ARMNN_AUTO_TEST_CASE(SimpleResizeBilinear, SimpleResizeBilinearTest<DataType::Float32>, DataLayout::NCHW)
583ARMNN_AUTO_TEST_CASE(ResizeBilinearNop, ResizeBilinearNopTest<DataType::Float32>, DataLayout::NCHW)
584ARMNN_AUTO_TEST_CASE(ResizeBilinearSqMin, ResizeBilinearSqMinTest<DataType::Float32>, DataLayout::NCHW)
585ARMNN_AUTO_TEST_CASE(ResizeBilinearMin, ResizeBilinearMinTest<DataType::Float32>, DataLayout::NCHW)
586ARMNN_AUTO_TEST_CASE(ResizeBilinearMag, ResizeBilinearMagTest<DataType::Float32>, DataLayout::NCHW)
Sadik Armaganc625f002018-12-17 11:32:16 +0000587
Ellen Norris-Thompsonc4223d12019-06-10 14:15:12 +0100588ARMNN_AUTO_TEST_CASE(SimpleResizeBilinearUint8,
Sadik Armagan581742d2019-08-12 14:11:37 +0100589 SimpleResizeBilinearTest<DataType::QuantisedAsymm8>,
590 DataLayout::NCHW)
Ellen Norris-Thompsonc4223d12019-06-10 14:15:12 +0100591ARMNN_AUTO_TEST_CASE(ResizeBilinearNopUint8,
Sadik Armagan581742d2019-08-12 14:11:37 +0100592 ResizeBilinearNopTest<DataType::QuantisedAsymm8>,
593 DataLayout::NCHW)
Ellen Norris-Thompsonc4223d12019-06-10 14:15:12 +0100594ARMNN_AUTO_TEST_CASE(ResizeBilinearSqMinUint8,
Sadik Armagan581742d2019-08-12 14:11:37 +0100595 ResizeBilinearSqMinTest<DataType::QuantisedAsymm8>,
596 DataLayout::NCHW)
Ellen Norris-Thompsonc4223d12019-06-10 14:15:12 +0100597ARMNN_AUTO_TEST_CASE(ResizeBilinearMinUint8,
Sadik Armagan581742d2019-08-12 14:11:37 +0100598 ResizeBilinearMinTest<DataType::QuantisedAsymm8>,
599 DataLayout::NCHW)
Ellen Norris-Thompsonc4223d12019-06-10 14:15:12 +0100600ARMNN_AUTO_TEST_CASE(ResizeBilinearMagUint8,
Sadik Armagan581742d2019-08-12 14:11:37 +0100601 ResizeBilinearMagTest<DataType::QuantisedAsymm8>,
602 DataLayout::NCHW)
Conor Kennedydc1c0822019-02-01 07:23:17 +0000603
Sadik Armaganc625f002018-12-17 11:32:16 +0000604// Resize Bilinear - NHWC data layout
Ellen Norris-Thompsonc4223d12019-06-10 14:15:12 +0100605ARMNN_AUTO_TEST_CASE(ResizeBilinearNopNhwc,
Sadik Armagan581742d2019-08-12 14:11:37 +0100606 ResizeBilinearNopTest<DataType::Float32>,
607 DataLayout::NHWC)
Ellen Norris-Thompsonc4223d12019-06-10 14:15:12 +0100608ARMNN_AUTO_TEST_CASE(SimpleResizeBilinearNhwc,
Sadik Armagan581742d2019-08-12 14:11:37 +0100609 SimpleResizeBilinearTest<DataType::Float32>,
610 DataLayout::NHWC)
Ellen Norris-Thompsonc4223d12019-06-10 14:15:12 +0100611ARMNN_AUTO_TEST_CASE(ResizeBilinearSqMinNhwc,
Sadik Armagan581742d2019-08-12 14:11:37 +0100612 ResizeBilinearSqMinTest<DataType::Float32>,
613 DataLayout::NHWC)
Ellen Norris-Thompsonc4223d12019-06-10 14:15:12 +0100614ARMNN_AUTO_TEST_CASE(ResizeBilinearMinNhwc,
Sadik Armagan581742d2019-08-12 14:11:37 +0100615 ResizeBilinearMinTest<DataType::Float32>,
616 DataLayout::NHWC)
Ellen Norris-Thompsonc4223d12019-06-10 14:15:12 +0100617ARMNN_AUTO_TEST_CASE(ResizeBilinearMagNhwc,
Sadik Armagan581742d2019-08-12 14:11:37 +0100618 ResizeBilinearMagTest<DataType::Float32>,
619 DataLayout::NHWC)
Ellen Norris-Thompsonc4223d12019-06-10 14:15:12 +0100620
621ARMNN_AUTO_TEST_CASE(ResizeBilinearNopUint8Nhwc,
Sadik Armagan581742d2019-08-12 14:11:37 +0100622 ResizeBilinearNopTest<DataType::QuantisedAsymm8>,
623 DataLayout::NHWC)
Ellen Norris-Thompsonc4223d12019-06-10 14:15:12 +0100624ARMNN_AUTO_TEST_CASE(SimpleResizeBilinearUint8Nhwc,
Sadik Armagan581742d2019-08-12 14:11:37 +0100625 SimpleResizeBilinearTest<DataType::QuantisedAsymm8>,
626 DataLayout::NHWC)
Ellen Norris-Thompsonc4223d12019-06-10 14:15:12 +0100627ARMNN_AUTO_TEST_CASE(ResizeBilinearSqMinUint8Nhwc,
Sadik Armagan581742d2019-08-12 14:11:37 +0100628 ResizeBilinearSqMinTest<DataType::QuantisedAsymm8>,
629 DataLayout::NHWC)
Ellen Norris-Thompsonc4223d12019-06-10 14:15:12 +0100630ARMNN_AUTO_TEST_CASE(ResizeBilinearMinUint8Nhwc,
Sadik Armagan581742d2019-08-12 14:11:37 +0100631 ResizeBilinearMinTest<DataType::QuantisedAsymm8>,
632 DataLayout::NHWC)
Ellen Norris-Thompsonc4223d12019-06-10 14:15:12 +0100633ARMNN_AUTO_TEST_CASE(ResizeBilinearMagUint8Nhwc,
Sadik Armagan581742d2019-08-12 14:11:37 +0100634 ResizeBilinearMagTest<DataType::QuantisedAsymm8>,
635 DataLayout::NHWC)
Sadik Armaganc625f002018-12-17 11:32:16 +0000636
Ellen Norris-Thompson37e68682019-07-15 14:23:30 +0100637// Resize NearestNeighbor - NCHW
638ARMNN_AUTO_TEST_CASE(SimpleResizeNearestNeighbor,
Sadik Armagan581742d2019-08-12 14:11:37 +0100639 SimpleResizeNearestNeighborTest<DataType::Float32>,
640 DataLayout::NCHW)
Ellen Norris-Thompson37e68682019-07-15 14:23:30 +0100641ARMNN_AUTO_TEST_CASE(ResizeNearestNeighborNop,
Sadik Armagan581742d2019-08-12 14:11:37 +0100642 ResizeNearestNeighborNopTest<DataType::Float32>,
643 DataLayout::NCHW)
Ellen Norris-Thompson37e68682019-07-15 14:23:30 +0100644ARMNN_AUTO_TEST_CASE(ResizeNearestNeighborSqMin,
Sadik Armagan581742d2019-08-12 14:11:37 +0100645 ResizeNearestNeighborSqMinTest<DataType::Float32>,
646 DataLayout::NCHW)
Ellen Norris-Thompson37e68682019-07-15 14:23:30 +0100647ARMNN_AUTO_TEST_CASE(ResizeNearestNeighborMin,
Sadik Armagan581742d2019-08-12 14:11:37 +0100648 ResizeNearestNeighborMinTest<DataType::Float32>,
649 DataLayout::NCHW)
Ellen Norris-Thompson37e68682019-07-15 14:23:30 +0100650ARMNN_AUTO_TEST_CASE(ResizeNearestNeighborMag,
Sadik Armagan581742d2019-08-12 14:11:37 +0100651 ResizeNearestNeighborMagTest<DataType::Float32>,
652 DataLayout::NCHW, 0.1f, 50, 0.1f, 50)
Ellen Norris-Thompson37e68682019-07-15 14:23:30 +0100653
654ARMNN_AUTO_TEST_CASE(SimpleResizeNearestNeighborUint8,
Sadik Armagan581742d2019-08-12 14:11:37 +0100655 SimpleResizeNearestNeighborTest<DataType::QuantisedAsymm8>,
656 DataLayout::NCHW)
Ellen Norris-Thompson37e68682019-07-15 14:23:30 +0100657ARMNN_AUTO_TEST_CASE(ResizeNearestNeighborNopUint8,
Sadik Armagan581742d2019-08-12 14:11:37 +0100658 ResizeNearestNeighborNopTest<DataType::QuantisedAsymm8>,
659 DataLayout::NCHW)
Ellen Norris-Thompson37e68682019-07-15 14:23:30 +0100660ARMNN_AUTO_TEST_CASE(ResizeNearestNeighborSqMinUint8,
Sadik Armagan581742d2019-08-12 14:11:37 +0100661 ResizeNearestNeighborSqMinTest<DataType::QuantisedAsymm8>,
662 DataLayout::NCHW)
Ellen Norris-Thompson37e68682019-07-15 14:23:30 +0100663ARMNN_AUTO_TEST_CASE(ResizeNearestNeighborMinUint8,
Sadik Armagan581742d2019-08-12 14:11:37 +0100664 ResizeNearestNeighborMinTest<DataType::QuantisedAsymm8>,
665 DataLayout::NCHW)
Ellen Norris-Thompson37e68682019-07-15 14:23:30 +0100666ARMNN_AUTO_TEST_CASE(ResizeNearestNeighborMagUint8,
Sadik Armagan581742d2019-08-12 14:11:37 +0100667 ResizeNearestNeighborMagTest<DataType::QuantisedAsymm8>,
668 DataLayout::NCHW, 0.1f, 50, 0.1f, 50)
Ellen Norris-Thompson37e68682019-07-15 14:23:30 +0100669
670// Resize NearestNeighbor - NHWC
671ARMNN_AUTO_TEST_CASE(ResizeNearestNeighborNopNhwc,
Sadik Armagan581742d2019-08-12 14:11:37 +0100672 ResizeNearestNeighborNopTest<DataType::Float32>,
673 DataLayout::NHWC)
Ellen Norris-Thompson37e68682019-07-15 14:23:30 +0100674ARMNN_AUTO_TEST_CASE(SimpleResizeNearestNeighborNhwc,
Sadik Armagan581742d2019-08-12 14:11:37 +0100675 SimpleResizeNearestNeighborTest<DataType::Float32>,
676 DataLayout::NHWC)
Ellen Norris-Thompson37e68682019-07-15 14:23:30 +0100677ARMNN_AUTO_TEST_CASE(ResizeNearestNeighborSqMinNhwc,
Sadik Armagan581742d2019-08-12 14:11:37 +0100678 ResizeNearestNeighborSqMinTest<DataType::Float32>,
679 DataLayout::NHWC)
Ellen Norris-Thompson37e68682019-07-15 14:23:30 +0100680ARMNN_AUTO_TEST_CASE(ResizeNearestNeighborMinNhwc,
Sadik Armagan581742d2019-08-12 14:11:37 +0100681 ResizeNearestNeighborMinTest<DataType::Float32>,
682 DataLayout::NHWC)
Ellen Norris-Thompson37e68682019-07-15 14:23:30 +0100683ARMNN_AUTO_TEST_CASE(ResizeNearestNeighborMagNhwc,
Sadik Armagan581742d2019-08-12 14:11:37 +0100684 ResizeNearestNeighborMagTest<DataType::Float32>,
685 DataLayout::NHWC, 0.1f, 50, 0.1f, 50)
Ellen Norris-Thompson37e68682019-07-15 14:23:30 +0100686
687ARMNN_AUTO_TEST_CASE(ResizeNearestNeighborNopUint8Nhwc,
Sadik Armagan581742d2019-08-12 14:11:37 +0100688 ResizeNearestNeighborNopTest<DataType::QuantisedAsymm8>,
689 DataLayout::NHWC)
Ellen Norris-Thompson37e68682019-07-15 14:23:30 +0100690ARMNN_AUTO_TEST_CASE(SimpleResizeNearestNeighborUint8Nhwc,
Sadik Armagan581742d2019-08-12 14:11:37 +0100691 SimpleResizeNearestNeighborTest<DataType::QuantisedAsymm8>,
692 DataLayout::NHWC)
Ellen Norris-Thompson37e68682019-07-15 14:23:30 +0100693ARMNN_AUTO_TEST_CASE(ResizeNearestNeighborSqMinUint8Nhwc,
Sadik Armagan581742d2019-08-12 14:11:37 +0100694 ResizeNearestNeighborSqMinTest<DataType::QuantisedAsymm8>,
695 DataLayout::NHWC)
Ellen Norris-Thompson37e68682019-07-15 14:23:30 +0100696ARMNN_AUTO_TEST_CASE(ResizeNearestNeighborMinUint8Nhwc,
Sadik Armagan581742d2019-08-12 14:11:37 +0100697 ResizeNearestNeighborMinTest<DataType::QuantisedAsymm8>,
698 DataLayout::NHWC)
Ellen Norris-Thompson37e68682019-07-15 14:23:30 +0100699ARMNN_AUTO_TEST_CASE(ResizeNearestNeighborMagUint8Nhwc,
Sadik Armagan581742d2019-08-12 14:11:37 +0100700 ResizeNearestNeighborMagTest<DataType::QuantisedAsymm8>,
701 DataLayout::NHWC, 0.1f, 50, 0.1f, 50)
Ellen Norris-Thompson37e68682019-07-15 14:23:30 +0100702
FinnWilliamsArm1fa19192019-08-02 17:26:31 +0100703// Strided Slice
Aron Virginas-Tar00d306e2019-08-28 18:08:46 +0100704ARMNN_AUTO_TEST_CASE(StridedSlice4dFloat32, StridedSlice4dFloat32Test)
705ARMNN_AUTO_TEST_CASE(StridedSlice4dReverseFloat32, StridedSlice4dReverseFloat32Test)
FinnWilliamsArm1fa19192019-08-02 17:26:31 +0100706ARMNN_AUTO_TEST_CASE(StridedSliceSimpleStrideFloat32, StridedSliceSimpleStrideFloat32Test)
707ARMNN_AUTO_TEST_CASE(StridedSliceSimpleRangeMaskFloat32, StridedSliceSimpleRangeMaskFloat32Test)
708ARMNN_AUTO_TEST_CASE(StridedSliceShrinkAxisMaskFloat32, StridedSliceShrinkAxisMaskFloat32Test)
Aron Virginas-Tar00d306e2019-08-28 18:08:46 +0100709ARMNN_AUTO_TEST_CASE(StridedSlice3dFloat32, StridedSlice3dFloat32Test)
710ARMNN_AUTO_TEST_CASE(StridedSlice3dReverseFloat32, StridedSlice3dReverseFloat32Test)
711ARMNN_AUTO_TEST_CASE(StridedSlice2dFloat32, StridedSlice2dFloat32Test)
712ARMNN_AUTO_TEST_CASE(StridedSlice2dReverseFloat32, StridedSlice2dReverseFloat32Test)
FinnWilliamsArm1fa19192019-08-02 17:26:31 +0100713
Aron Virginas-Tar00d306e2019-08-28 18:08:46 +0100714ARMNN_AUTO_TEST_CASE(StridedSlice4dUint8, StridedSlice4dUint8Test)
715ARMNN_AUTO_TEST_CASE(StridedSlice4dReverseUint8, StridedSlice4dReverseUint8Test)
FinnWilliamsArm1fa19192019-08-02 17:26:31 +0100716ARMNN_AUTO_TEST_CASE(StridedSliceSimpleStrideUint8, StridedSliceSimpleStrideUint8Test)
717ARMNN_AUTO_TEST_CASE(StridedSliceSimpleRangeMaskUint8, StridedSliceSimpleRangeMaskUint8Test)
718ARMNN_AUTO_TEST_CASE(StridedSliceShrinkAxisMaskUint8, StridedSliceShrinkAxisMaskUint8Test)
Aron Virginas-Tar00d306e2019-08-28 18:08:46 +0100719ARMNN_AUTO_TEST_CASE(StridedSlice3dUint8, StridedSlice3dUint8Test)
720ARMNN_AUTO_TEST_CASE(StridedSlice3dReverseUint8, StridedSlice3dReverseUint8Test)
721ARMNN_AUTO_TEST_CASE(StridedSlice2dUint8, StridedSlice2dUint8Test)
722ARMNN_AUTO_TEST_CASE(StridedSlice2dReverseUint8, StridedSlice2dReverseUint8Test)
FinnWilliamsArm1fa19192019-08-02 17:26:31 +0100723
Sadik Armaganfabc2892019-05-31 09:05:11 +0100724// Quantize
725ARMNN_AUTO_TEST_CASE(QuantizeSimpleUint8, QuantizeSimpleUint8Test)
726ARMNN_AUTO_TEST_CASE(QuantizeClampUint8, QuantizeClampUint8Test)
727
Nikhil Raj9b461482019-07-03 15:58:31 +0100728// PReLU
Sadik Armagan581742d2019-08-12 14:11:37 +0100729ARMNN_AUTO_TEST_CASE(PreluFloat32, PreluTest<DataType::Float32>)
730ARMNN_AUTO_TEST_CASE(PreluUint8, PreluTest<DataType::QuantisedAsymm8>)
Nikhil Raj9b461482019-07-03 15:58:31 +0100731
Matthew Jackson87f65ea2019-08-01 10:01:34 +0100732// Stack
Matthew Jacksone69c3992019-09-09 14:31:21 +0100733ARMNN_AUTO_TEST_CASE(Stack0Axis, StackAxis0Float32Test)
734ARMNN_AUTO_TEST_CASE(StackOutput4DAxis1, StackOutput4DAxis1Float32Test)
735ARMNN_AUTO_TEST_CASE(StackOutput4DAxis2, StackOutput4DAxis2Float32Test)
736ARMNN_AUTO_TEST_CASE(StackOutput4DAxis3, StackOutput4DAxis3Float32Test)
737ARMNN_AUTO_TEST_CASE(StackOutput3DInputs3, StackOutput3DInputs3Float32Test)
738ARMNN_AUTO_TEST_CASE(StackOutput5D, StackOutput5DFloat32Test)
Matthew Jackson87f65ea2019-08-01 10:01:34 +0100739
Sadik Armagan581742d2019-08-12 14:11:37 +0100740// TransposeConvolution2d
741ARMNN_AUTO_TEST_CASE(SimpleTransposeConvolution2dFloatNchw,
742 SimpleTransposeConvolution2dTest<DataType::Float32, DataType::Float32>,
743 true,
744 DataLayout::NCHW)
745ARMNN_AUTO_TEST_CASE(SimpleTransposeConvolution2dFloatNhwc,
746 SimpleTransposeConvolution2dTest<DataType::Float32, DataType::Float32>,
747 true,
748 DataLayout::NHWC)
749ARMNN_AUTO_TEST_CASE(SimpleTransposeConvolution2dUint8Nchw,
750 SimpleTransposeConvolution2dTest<DataType::QuantisedAsymm8, DataType::Signed32>,
751 true,
752 DataLayout::NCHW)
753ARMNN_AUTO_TEST_CASE(SimpleTransposeConvolution2dUint8Nhwc,
754 SimpleTransposeConvolution2dTest<DataType::QuantisedAsymm8, DataType::Signed32>,
755 true,
756 DataLayout::NHWC)
757
758ARMNN_AUTO_TEST_CASE(UnbiasedSimpleTransposeConvolution2dFloatNchw,
759 SimpleTransposeConvolution2dTest<DataType::Float32, DataType::Float32>,
760 false,
761 DataLayout::NCHW)
762ARMNN_AUTO_TEST_CASE(UnbiasedSimpleTransposeConvolution2dFloatNhwc,
763 SimpleTransposeConvolution2dTest<DataType::Float32, DataType::Float32>,
764 true,
765 DataLayout::NHWC)
766ARMNN_AUTO_TEST_CASE(UnbiasedSimpleTransposeConvolution2dUint8Nchw,
767 SimpleTransposeConvolution2dTest<DataType::QuantisedAsymm8, DataType::Signed32>,
768 true,
769 DataLayout::NCHW)
770ARMNN_AUTO_TEST_CASE(UnbiasedSimpleTransposeConvolution2dUint8Nhwc,
771 SimpleTransposeConvolution2dTest<DataType::QuantisedAsymm8, DataType::Signed32>,
772 true,
773 DataLayout::NHWC)
774
775ARMNN_AUTO_TEST_CASE(PaddedTransposeConvolution2dFloatNchw,
776 PaddedTransposeConvolution2dTest<DataType::Float32, DataType::Float32>,
777 true,
778 DataLayout::NCHW)
779ARMNN_AUTO_TEST_CASE(PaddedTransposeConvolution2dFloatNhwc,
780 PaddedTransposeConvolution2dTest<DataType::Float32, DataType::Float32>,
781 true,
782 DataLayout::NHWC)
783ARMNN_AUTO_TEST_CASE(PaddedTransposeConvolution2dUint8Nchw,
784 PaddedTransposeConvolution2dTest<DataType::QuantisedAsymm8, DataType::Signed32>,
785 true,
786 DataLayout::NCHW)
787ARMNN_AUTO_TEST_CASE(PaddedTransposeConvolution2dUint8Nhwc,
788 PaddedTransposeConvolution2dTest<DataType::QuantisedAsymm8, DataType::Signed32>,
789 true,
790 DataLayout::NHWC)
791
792ARMNN_AUTO_TEST_CASE(UnbiasedPaddedTransposeConvolution2dFloatNchw,
793 PaddedTransposeConvolution2dTest<DataType::Float32, DataType::Float32>,
794 false,
795 DataLayout::NCHW)
796ARMNN_AUTO_TEST_CASE(UnbiasedPaddedTransposeConvolution2dFloatNhwc,
797 PaddedTransposeConvolution2dTest<DataType::Float32, DataType::Float32>,
798 true,
799 DataLayout::NHWC)
800ARMNN_AUTO_TEST_CASE(UnbiasedPaddedTransposeConvolution2dUint8Nchw,
801 PaddedTransposeConvolution2dTest<DataType::QuantisedAsymm8, DataType::Signed32>,
802 true,
803 DataLayout::NCHW)
804ARMNN_AUTO_TEST_CASE(UnbiasedPaddedTransposeConvolution2dUint8Nhwc,
805 PaddedTransposeConvolution2dTest<DataType::QuantisedAsymm8, DataType::Signed32>,
806 true,
807 DataLayout::NHWC)
808
809ARMNN_AUTO_TEST_CASE(StridedTransposeConvolution2dFloatNchw,
810 StridedTransposeConvolution2dTest<DataType::Float32, DataType::Float32>,
811 true,
812 DataLayout::NCHW)
813ARMNN_AUTO_TEST_CASE(StridedTransposeConvolution2dFloatNhwc,
814 StridedTransposeConvolution2dTest<DataType::Float32, DataType::Float32>,
815 true,
816 DataLayout::NHWC)
817ARMNN_AUTO_TEST_CASE(StridedTransposeConvolution2dUint8Nchw,
818 StridedTransposeConvolution2dTest<DataType::QuantisedAsymm8, DataType::Signed32>,
819 true,
820 DataLayout::NCHW)
821ARMNN_AUTO_TEST_CASE(StridedTransposeConvolution2dUint8Nhwc,
822 StridedTransposeConvolution2dTest<DataType::QuantisedAsymm8, DataType::Signed32>,
823 true,
824 DataLayout::NHWC)
825
826ARMNN_AUTO_TEST_CASE(UnbiasedStridedTransposeConvolution2dFloatNchw,
827 StridedTransposeConvolution2dTest<DataType::Float32, DataType::Float32>,
828 false,
829 DataLayout::NCHW)
830ARMNN_AUTO_TEST_CASE(UnbiasedStridedTransposeConvolution2dFloatNhwc,
831 StridedTransposeConvolution2dTest<DataType::Float32, DataType::Float32>,
832 true,
833 DataLayout::NHWC)
834ARMNN_AUTO_TEST_CASE(UnbiasedStridedTransposeConvolution2dUint8Nchw,
835 StridedTransposeConvolution2dTest<DataType::QuantisedAsymm8, DataType::Signed32>,
836 true,
837 DataLayout::NCHW)
838ARMNN_AUTO_TEST_CASE(UnbiasedStridedTransposeConvolution2dUint8Nhwc,
839 StridedTransposeConvolution2dTest<DataType::QuantisedAsymm8, DataType::Signed32>,
840 true,
841 DataLayout::NHWC)
842
Aron Virginas-Tar7599aa42019-08-20 15:30:04 +0100843ARMNN_AUTO_TEST_CASE(MultiChannelTransposeConvolution2dFloatNchw,
844 MultiChannelTransposeConvolution2dTest<DataType::Float32, DataType::Float32>,
845 DataLayout::NCHW)
846ARMNN_AUTO_TEST_CASE(MultiChannelTransposeConvolution2dFloatNhwc,
847 MultiChannelTransposeConvolution2dTest<DataType::Float32, DataType::Float32>,
848 DataLayout::NHWC)
849ARMNN_AUTO_TEST_CASE(MultiChannelTransposeConvolution2dUint8Nchw,
850 MultiChannelTransposeConvolution2dTest<DataType::QuantisedAsymm8, DataType::Signed32>,
851 DataLayout::NCHW)
852ARMNN_AUTO_TEST_CASE(MultiChannelTransposeConvolution2dUint8Nhwc,
853 MultiChannelTransposeConvolution2dTest<DataType::QuantisedAsymm8, DataType::Signed32>,
854 DataLayout::NHWC)
855
Aron Virginas-Tar914e4db2019-09-09 13:36:45 +0100856// Abs
857ARMNN_AUTO_TEST_CASE(Abs2d, Abs2dTest<DataType::Float32>)
858ARMNN_AUTO_TEST_CASE(Abs3d, Abs3dTest<DataType::Float32>)
859
860ARMNN_AUTO_TEST_CASE(AbsZero, AbsZeroTest<DataType::Float32>)
861
Aron Virginas-Tar0dd3b432019-09-10 13:55:09 +0100862// Rsqrt
863ARMNN_AUTO_TEST_CASE(Rsqrt2d, Rsqrt2dTest<DataType::Float32>)
864ARMNN_AUTO_TEST_CASE(Rsqrt3d, Rsqrt3dTest<DataType::Float32>)
865ARMNN_AUTO_TEST_CASE(RsqrtZero, RsqrtZeroTest<DataType::Float32>)
866ARMNN_AUTO_TEST_CASE(RsqrtNegative, RsqrtNegativeTest<DataType::Float32>)
867
Matteo Martincighdb16dd32019-08-27 16:41:11 +0100868#if defined(ARMNNREF_ENABLED)
Matteo Martincighe67edb22019-08-14 14:05:46 +0100869
870// The ARMNN_COMPARE_REF_AUTO_TEST_CASE and the ARMNN_COMPARE_REF_FIXTURE_TEST_CASE test units are not available
871// if the reference backend is not built
872
telsoa014fcda012018-03-09 14:13:49 +0000873// ============================================================================
874// COMPARE tests
875
876ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareConv2dWithReference, CompareConvolution2dTest)
877
jimfly017af00da2018-10-31 14:43:53 +0000878ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareDepthwiseConv2dWithReferenceFloat32,
Nattapat Chaimanowong649dd952019-01-22 16:10:44 +0000879 CompareDepthwiseConvolution2dFloatTest,
Sadik Armagan581742d2019-08-12 14:11:37 +0100880 DataLayout::NCHW)
jimfly017af00da2018-10-31 14:43:53 +0000881ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareDepthwiseConv2dWithReferenceUint8,
Nattapat Chaimanowong649dd952019-01-22 16:10:44 +0000882 CompareDepthwiseConvolution2dUint8Test,
Sadik Armagan581742d2019-08-12 14:11:37 +0100883 DataLayout::NCHW)
jimfly017af00da2018-10-31 14:43:53 +0000884
885ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareDepthwiseConv2dWithReferenceFloat32Nhwc,
Nattapat Chaimanowong649dd952019-01-22 16:10:44 +0000886 CompareDepthwiseConvolution2dFloatTest,
Sadik Armagan581742d2019-08-12 14:11:37 +0100887 DataLayout::NHWC)
jimfly017af00da2018-10-31 14:43:53 +0000888ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareDepthwiseConv2dWithReferenceUint8Nhwc,
Nattapat Chaimanowong649dd952019-01-22 16:10:44 +0000889 CompareDepthwiseConvolution2dUint8Test,
Sadik Armagan581742d2019-08-12 14:11:37 +0100890 DataLayout::NHWC)
telsoa014fcda012018-03-09 14:13:49 +0000891
892ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareNormalizationWithinWithReference, CompareNormalizationTest,
Sadik Armagan581742d2019-08-12 14:11:37 +0100893 NormalizationAlgorithmChannel::Within,
894 NormalizationAlgorithmMethod::LocalBrightness)
telsoa014fcda012018-03-09 14:13:49 +0000895ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareNormalizationAcrossWithReference, CompareNormalizationTest,
Sadik Armagan581742d2019-08-12 14:11:37 +0100896 NormalizationAlgorithmChannel::Across,
897 NormalizationAlgorithmMethod::LocalBrightness)
telsoa014fcda012018-03-09 14:13:49 +0000898
Sadik Armagan581742d2019-08-12 14:11:37 +0100899ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareMaxPooling2dWithReference, ComparePooling2dTest, PoolingAlgorithm::Max)
telsoa014fcda012018-03-09 14:13:49 +0000900ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareMaxPooling2dWithReferenceUint8, ComparePooling2dUint8Test,
Sadik Armagan581742d2019-08-12 14:11:37 +0100901 PoolingAlgorithm::Max)
telsoa014fcda012018-03-09 14:13:49 +0000902ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareAveragePooling2dWithReference, ComparePooling2dTest,
Sadik Armagan581742d2019-08-12 14:11:37 +0100903 PoolingAlgorithm::Average)
telsoa014fcda012018-03-09 14:13:49 +0000904ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareAveragePooling2dWithReferenceUint8, ComparePooling2dUint8Test,
Sadik Armagan581742d2019-08-12 14:11:37 +0100905 PoolingAlgorithm::Average)
906ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareL2Pooling2dWithReference, ComparePooling2dTest, PoolingAlgorithm::L2)
telsoa014fcda012018-03-09 14:13:49 +0000907ARMNN_COMPARE_REF_AUTO_TEST_CASE(UNSUPPORTED_CompareL2Pooling2dWithReferenceUint8, ComparePooling2dUint8Test,
Sadik Armagan581742d2019-08-12 14:11:37 +0100908 PoolingAlgorithm::L2)
telsoa014fcda012018-03-09 14:13:49 +0000909
910ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareSoftmaxBeta1WithReference, CompareSoftmaxTest, 1.0f)
911ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareSoftmaxBeta2WithReference, CompareSoftmaxTest, 2.0f)
912
913ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareSoftmaxUint8Beta1WithReference, CompareSoftmaxUint8Test, 1.0f)
914ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareSoftmaxUint8Beta2WithReference, CompareSoftmaxUint8Test, 2.0f)
915
916ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareAddition, CompareAdditionTest)
917
918ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareMultiplicationWithReference, CompareMultiplicationTest)
919
920ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareBatchNorm, CompareBatchNormTest)
921
922ARMNN_COMPARE_REF_AUTO_TEST_CASE(ReLu1, CompareBoundedReLuTest, 1.0f, -1.0f)
923ARMNN_COMPARE_REF_AUTO_TEST_CASE(ReLu6, CompareBoundedReLuTest, 6.0f, 0.0f)
924
925// ============================================================================
926// FIXTURE tests
927
928ARMNN_COMPARE_REF_FIXTURE_TEST_CASE(CompareSigmoidActivationWithReference, ActivationFixture,
Sadik Armagan581742d2019-08-12 14:11:37 +0100929 CompareActivationTest, ActivationFunction::Sigmoid, 5u)
telsoa014fcda012018-03-09 14:13:49 +0000930
931ARMNN_COMPARE_REF_FIXTURE_TEST_CASE(CompareTanhActivationWithReference, ActivationFixture,
Sadik Armagan581742d2019-08-12 14:11:37 +0100932 CompareActivationTest, ActivationFunction::TanH, 5u)
telsoa014fcda012018-03-09 14:13:49 +0000933
934ARMNN_COMPARE_REF_FIXTURE_TEST_CASE(CompareLinearActivationWithReference, ActivationFixture,
Sadik Armagan581742d2019-08-12 14:11:37 +0100935 CompareActivationTest, ActivationFunction::Linear, 5u)
telsoa014fcda012018-03-09 14:13:49 +0000936
937ARMNN_COMPARE_REF_FIXTURE_TEST_CASE(CompareReLuActivationWithReference, ActivationFixture,
Sadik Armagan581742d2019-08-12 14:11:37 +0100938 CompareActivationTest, ActivationFunction::ReLu, 5u)
telsoa014fcda012018-03-09 14:13:49 +0000939
940ARMNN_COMPARE_REF_FIXTURE_TEST_CASE(CompareBoundedReLuActivationWithReference, ActivationFixture,
Sadik Armagan581742d2019-08-12 14:11:37 +0100941 CompareActivationTest, ActivationFunction::BoundedReLu, 5u)
telsoa014fcda012018-03-09 14:13:49 +0000942ARMNN_COMPARE_REF_FIXTURE_TEST_CASE(CompareBoundedReLuActivationWithReferenceUint8, ActivationFixture,
Sadik Armagan581742d2019-08-12 14:11:37 +0100943 CompareActivationUint8Test, ActivationFunction::BoundedReLu)
telsoa014fcda012018-03-09 14:13:49 +0000944
945ARMNN_COMPARE_REF_FIXTURE_TEST_CASE(CompareSoftReLuActivationWithReference, ActivationFixture,
Sadik Armagan581742d2019-08-12 14:11:37 +0100946 CompareActivationTest, ActivationFunction::SoftReLu, 1u)
telsoa014fcda012018-03-09 14:13:49 +0000947
948ARMNN_COMPARE_REF_FIXTURE_TEST_CASE(CompareLeakyReLuActivationWithReference, ActivationFixture,
Sadik Armagan581742d2019-08-12 14:11:37 +0100949 CompareActivationTest, ActivationFunction::LeakyReLu, 5u)
telsoa014fcda012018-03-09 14:13:49 +0000950
951ARMNN_COMPARE_REF_FIXTURE_TEST_CASE(CompareAbsActivationWithReference, ActivationFixture,
Sadik Armagan581742d2019-08-12 14:11:37 +0100952 CompareActivationTest, ActivationFunction::Abs, 5u)
telsoa014fcda012018-03-09 14:13:49 +0000953
954ARMNN_COMPARE_REF_FIXTURE_TEST_CASE(CompareSqrtActivationWithReference, PositiveActivationFixture,
Sadik Armagan581742d2019-08-12 14:11:37 +0100955 CompareActivationTest, ActivationFunction::Sqrt, 5u)
telsoa014fcda012018-03-09 14:13:49 +0000956
957ARMNN_COMPARE_REF_FIXTURE_TEST_CASE(CompareSquareActivationWithReference, ActivationFixture,
Sadik Armagan581742d2019-08-12 14:11:37 +0100958 CompareActivationTest, ActivationFunction::Square, 5u)
Matteo Martincighe67edb22019-08-14 14:05:46 +0100959
960#endif
961
telsoa014fcda012018-03-09 14:13:49 +0000962BOOST_AUTO_TEST_SUITE_END()