blob: ad87e953c8d8fb2c4ace88c4e40d7d5107a43c58 [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//
arovir0143095f32018-10-09 18:04:24 +01005
6#include "ClContextControlFixture.hpp"
Aron Virginas-Tar56055192018-11-12 18:10:43 +00007#include "ClWorkloadFactoryHelper.hpp"
arovir0143095f32018-10-09 18:04:24 +01008
telsoa014fcda012018-03-09 14:13:49 +00009#include "test/TensorHelpers.hpp"
arovir0143095f32018-10-09 18:04:24 +010010#include "test/UnitTests.hpp"
telsoa014fcda012018-03-09 14:13:49 +000011
Aron Virginas-Tarc9cc8042018-11-01 16:15:57 +000012#include <backendsCommon/CpuTensorHandle.hpp>
13#include <cl/ClLayerSupport.hpp>
14#include <cl/ClWorkloadFactory.hpp>
15#include <cl/workloads/ClWorkloadUtils.hpp>
16#include <reference/RefWorkloadFactory.hpp>
17#include <backendsCommon/test/ActivationFixture.hpp>
18#include <backendsCommon/test/LayerTests.hpp>
telsoa014fcda012018-03-09 14:13:49 +000019
20#include <arm_compute/core/CL/CLKernelLibrary.h>
21#include <arm_compute/runtime/CL/CLScheduler.h>
telsoa014fcda012018-03-09 14:13:49 +000022
arovir0143095f32018-10-09 18:04:24 +010023#include <boost/test/unit_test.hpp>
24
25#include <iostream>
26#include <string>
telsoa014fcda012018-03-09 14:13:49 +000027
telsoa01c577f2c2018-08-31 09:22:23 +010028BOOST_FIXTURE_TEST_SUITE(Compute_ArmComputeCl, ClContextControlFixture)
telsoa014fcda012018-03-09 14:13:49 +000029using FactoryType = armnn::ClWorkloadFactory;
30
31// ============================================================================
32// UNIT tests
33
34// Activation
35ARMNN_AUTO_TEST_CASE(ConstantLinearActivation, ConstantLinearActivationTest)
36
telsoa014fcda012018-03-09 14:13:49 +000037ARMNN_AUTO_TEST_CASE(ReLu1Uint8, BoundedReLuUint8UpperAndLowerBoundTest)
38ARMNN_AUTO_TEST_CASE(ReLu6Uint8, BoundedReLuUint8UpperBoundOnlyTest)
39
Finn Williamsb5b9bdf2019-02-18 10:07:34 +000040ARMNN_AUTO_TEST_CASE(Logistic, SimpleSigmoidTest)
41ARMNN_AUTO_TEST_CASE(LogisticUint8, SimpleSigmoidUint8Test)
42
Mike Kelly831faed2018-11-28 11:52:08 +000043// Batch To Space
44ARMNN_AUTO_TEST_CASE(BatchToSpaceNdNhwcFloat321, BatchToSpaceNdNhwcFloat32Test1)
45ARMNN_AUTO_TEST_CASE(BatchToSpaceNdNhwcFloat322, BatchToSpaceNdNhwcFloat32Test2)
46ARMNN_AUTO_TEST_CASE(BatchToSpaceNdNhwcFloat323, BatchToSpaceNdNhwcFloat32Test3)
47
48ARMNN_AUTO_TEST_CASE(BatchToSpaceNdNchwFloat321, BatchToSpaceNdNchwFloat32Test1)
49ARMNN_AUTO_TEST_CASE(BatchToSpaceNdNchwFloat322, BatchToSpaceNdNchwFloat32Test2)
50ARMNN_AUTO_TEST_CASE(BatchToSpaceNdNchwFloat323, BatchToSpaceNdNchwFloat32Test3)
51
52ARMNN_AUTO_TEST_CASE(BatchToSpaceNdNhwcUint1, BatchToSpaceNdNhwcUintTest1)
53ARMNN_AUTO_TEST_CASE(BatchToSpaceNdNhwcUint2, BatchToSpaceNdNhwcUintTest2)
54ARMNN_AUTO_TEST_CASE(BatchToSpaceNdNhwcUint3, BatchToSpaceNdNhwcUintTest3)
55
56ARMNN_AUTO_TEST_CASE(BatchToSpaceNdNchwUint1, BatchToSpaceNdNchwUintTest1)
57ARMNN_AUTO_TEST_CASE(BatchToSpaceNdNchwUint2, BatchToSpaceNdNchwUintTest2)
58ARMNN_AUTO_TEST_CASE(BatchToSpaceNdNchwUint3, BatchToSpaceNdNchwUintTest3)
59
telsoa014fcda012018-03-09 14:13:49 +000060// Fully Connected
61ARMNN_AUTO_TEST_CASE(SimpleFullyConnected, FullyConnectedFloat32Test, false, false)
62ARMNN_AUTO_TEST_CASE(SimpleFullyConnectedWithBias, FullyConnectedFloat32Test, true, false)
63ARMNN_AUTO_TEST_CASE(SimpleFullyConnectedWithTranspose, FullyConnectedFloat32Test, false, true)
Francis Murtagh46c09d02019-05-28 08:15:28 +010064ARMNN_AUTO_TEST_CASE(FullyConnectedUint8, FullyConnectedTest<armnn::DataType::QuantisedAsymm8>, false)
65ARMNN_AUTO_TEST_CASE(FullyConnectedBiasedUint8, FullyConnectedTest<armnn::DataType::QuantisedAsymm8>, true)
telsoa014fcda012018-03-09 14:13:49 +000066
67ARMNN_AUTO_TEST_CASE(FullyConnectedLarge, FullyConnectedLargeTest, false)
68ARMNN_AUTO_TEST_CASE(FullyConnectedLargeTransposed, FullyConnectedLargeTest, true)
69
70// Convolution
71ARMNN_AUTO_TEST_CASE(SimpleConvolution1d, Convolution1dTest, true)
72
jimfly010a088a62018-10-25 17:05:05 +010073ARMNN_AUTO_TEST_CASE(SimpleConvolution2d, SimpleConvolution2d3x5Test, true, armnn::DataLayout::NCHW)
74ARMNN_AUTO_TEST_CASE(SimpleConvolution2dNhwc, SimpleConvolution2d3x5Test, true, armnn::DataLayout::NHWC)
narpra015f703182018-10-26 16:24:58 +010075ARMNN_AUTO_TEST_CASE(SimpleConvolution2d3x3Uint8, SimpleConvolution2d3x3Uint8Test, true, armnn::DataLayout::NCHW)
76ARMNN_AUTO_TEST_CASE(SimpleConvolution2d3x3Uint8Nhwc, SimpleConvolution2d3x3Uint8Test, true, armnn::DataLayout::NHWC)
jimfly010a088a62018-10-25 17:05:05 +010077ARMNN_AUTO_TEST_CASE(UnbiasedConvolution2d, SimpleConvolution2d3x5Test, false, armnn::DataLayout::NCHW)
78ARMNN_AUTO_TEST_CASE(UnbiasedConvolution2dNhwc, SimpleConvolution2d3x5Test, false, armnn::DataLayout::NHWC)
Mike Kelly7332ed82018-12-20 17:03:06 +000079ARMNN_AUTO_TEST_CASE(UnbiasedConvolution2dStride2x2Nhwc,
80 SimpleConvolution2d3x3Stride2x2Test, false, armnn::DataLayout::NHWC)
jimfly010a088a62018-10-25 17:05:05 +010081
narpra015f703182018-10-26 16:24:58 +010082ARMNN_AUTO_TEST_CASE(UnbiasedConvolution2dSquare, SimpleConvolution2d3x3Test, false, armnn::DataLayout::NCHW)
83ARMNN_AUTO_TEST_CASE(SimpleConvolution2dAsymmetricPadding, Convolution2dAsymmetricPaddingTest, armnn::DataLayout::NCHW)
84
85ARMNN_AUTO_TEST_CASE(UnbiasedConvolution2dSquareNhwc, SimpleConvolution2d3x3Test, false, armnn::DataLayout::NHWC)
narpra01f97debb2018-11-09 09:27:31 +000086ARMNN_AUTO_TEST_CASE(SimpleConvolution2dAsymmetricPaddingNhwc,
87 Convolution2dAsymmetricPaddingTest,
88 armnn::DataLayout::NHWC)
telsoa014fcda012018-03-09 14:13:49 +000089
Francis Murtaghd59116e2018-10-04 16:03:07 +010090ARMNN_AUTO_TEST_CASE(SimpleConvolution2dSquareNhwc, SimpleConvolution2d3x3NhwcTest, false)
91
telsoa014fcda012018-03-09 14:13:49 +000092// Depthwise Convolution
jimfly01b9c89632018-10-26 16:50:13 +010093ARMNN_AUTO_TEST_CASE(DepthwiseConvolution2dDepthMul1,
94 DepthwiseConvolution2dDepthMul1Test, true, armnn::DataLayout::NCHW)
95ARMNN_AUTO_TEST_CASE(UnbiasedDepthwiseConvolution2dDepthMul1,
96 DepthwiseConvolution2dDepthMul1Test, false, armnn::DataLayout::NCHW)
97ARMNN_AUTO_TEST_CASE(DepthwiseConvolution2dDepthMul1Uint8,
98 DepthwiseConvolution2dDepthMul1Uint8Test, true, armnn::DataLayout::NCHW)
99ARMNN_AUTO_TEST_CASE(UnbiasedDepthwiseConvolution2dDepthMul1Uint8,
100 DepthwiseConvolution2dDepthMul1Uint8Test, false, armnn::DataLayout::NCHW)
101
102// NHWC Depthwise Convolution
103ARMNN_AUTO_TEST_CASE(DepthwiseConvolution2dDepthMul1Nhwc,
104 DepthwiseConvolution2dDepthMul1Test, true, armnn::DataLayout::NHWC)
105ARMNN_AUTO_TEST_CASE(UnbiasedDepthwiseConvolution2dDepthMul1Nhwc,
106 DepthwiseConvolution2dDepthMul1Test, false, armnn::DataLayout::NHWC)
107ARMNN_AUTO_TEST_CASE(DepthwiseConvolution2dDepthMul1Uint8Nhwc,
108 DepthwiseConvolution2dDepthMul1Uint8Test, true, armnn::DataLayout::NHWC)
109ARMNN_AUTO_TEST_CASE(UnbiasedDepthwiseConvolution2dDepthMul1Uint8Nhwc,
110 DepthwiseConvolution2dDepthMul1Uint8Test, false, armnn::DataLayout::NHWC)
Bruno Goncalves22972f02019-04-26 21:03:24 -0300111ARMNN_AUTO_TEST_CASE(SimpleDepthwiseConvolution2d3x3Dilation3x3Nhwc,
112 SimpleDepthwiseConvolution2d3x3Dilation3x3NhwcTest)
jimfly01b9c89632018-10-26 16:50:13 +0100113
114
Nikhil Rajcec6b652018-10-12 13:51:57 +0100115ARMNN_AUTO_TEST_CASE(DepthwiseConvolution2dDepthNhwc, DepthwiseConvolution2dDepthNhwcTest, false)
telsoa014fcda012018-03-09 14:13:49 +0000116
jimfly01382a91d2018-10-26 15:55:50 +0100117ARMNN_AUTO_TEST_CASE(DepthwiseConvolution2dAsymmetric,
118 DepthwiseConvolution2dAsymmetricTest, true, armnn::DataLayout::NCHW)
119ARMNN_AUTO_TEST_CASE(UnbiasedDepthwiseConvolution2dAsymmetric,
120 DepthwiseConvolution2dAsymmetricTest, false, armnn::DataLayout::NCHW)
121ARMNN_AUTO_TEST_CASE(DepthwiseConvolution2dAsymmetricNhwc,
122 DepthwiseConvolution2dAsymmetricTest, true, armnn::DataLayout::NHWC)
123ARMNN_AUTO_TEST_CASE(UnbiasedDepthwiseConvolution2dAsymmetricNhwc,
124 DepthwiseConvolution2dAsymmetricTest, false, armnn::DataLayout::NHWC)
surmeh013537c2c2018-05-18 16:31:43 +0100125
telsoa01c577f2c2018-08-31 09:22:23 +0100126// Splitter
127ARMNN_AUTO_TEST_CASE(SimpleSplitter, SplitterTest)
128ARMNN_AUTO_TEST_CASE(SimpleSplitterUint8, SplitterUint8Test)
telsoa014fcda012018-03-09 14:13:49 +0000129
130ARMNN_AUTO_TEST_CASE(CopyViaSplitter, CopyViaSplitterTest)
131ARMNN_AUTO_TEST_CASE(CopyViaSplitterUint8, CopyViaSplitterUint8Test)
132
Jim Flynn4ed6c832019-05-20 11:02:46 +0100133// Concat
134ARMNN_AUTO_TEST_CASE(SimpleConcat, ConcatTest)
135ARMNN_AUTO_TEST_CASE(ConcatUint8, ConcatUint8Test)
telsoa014fcda012018-03-09 14:13:49 +0000136
narpra0155a97bc2018-10-02 14:35:53 +0100137// Normalization
138ARMNN_AUTO_TEST_CASE(SimpleNormalizationAcross, SimpleNormalizationAcrossTest)
139ARMNN_AUTO_TEST_CASE(SimpleNormalizationWithin, SimpleNormalizationWithinTest)
140ARMNN_AUTO_TEST_CASE(SimpleNormalizationAcrossNhwc, SimpleNormalizationAcrossNhwcTest)
141
telsoa014fcda012018-03-09 14:13:49 +0000142// Pooling
143ARMNN_AUTO_TEST_CASE(SimpleMaxPooling2dSize3x3Stride2x4, SimpleMaxPooling2dSize3x3Stride2x4Test, true)
144ARMNN_AUTO_TEST_CASE(SimpleMaxPooling2dSize3x3Stride2x4Uint8, SimpleMaxPooling2dSize3x3Stride2x4Uint8Test, true)
145
146ARMNN_AUTO_TEST_CASE(IgnorePaddingSimpleMaxPooling2d, IgnorePaddingSimpleMaxPooling2dTest)
147ARMNN_AUTO_TEST_CASE(IgnorePaddingSimpleMaxPooling2dUint8, IgnorePaddingSimpleMaxPooling2dUint8Test)
148ARMNN_AUTO_TEST_CASE(IgnorePaddingMaxPooling2dSize3, IgnorePaddingMaxPooling2dSize3Test)
149ARMNN_AUTO_TEST_CASE(IgnorePaddingMaxPooling2dSize3Uint8, IgnorePaddingMaxPooling2dSize3Uint8Test)
150
151ARMNN_AUTO_TEST_CASE(IgnorePaddingSimpleAveragePooling2d, IgnorePaddingSimpleAveragePooling2dTest)
152ARMNN_AUTO_TEST_CASE(IgnorePaddingSimpleAveragePooling2dUint8, IgnorePaddingSimpleAveragePooling2dUint8Test)
153ARMNN_AUTO_TEST_CASE(IgnorePaddingSimpleAveragePooling2dNoPadding, IgnorePaddingSimpleAveragePooling2dNoPaddingTest)
154ARMNN_AUTO_TEST_CASE(IgnorePaddingSimpleAveragePooling2dNoPaddingUint8,
surmeh01bceff2f2018-03-29 16:29:27 +0100155 IgnorePaddingSimpleAveragePooling2dNoPaddingUint8Test)
telsoa014fcda012018-03-09 14:13:49 +0000156ARMNN_AUTO_TEST_CASE(IgnorePaddingAveragePooling2dSize3, IgnorePaddingAveragePooling2dSize3Test)
157ARMNN_AUTO_TEST_CASE(IgnorePaddingAveragePooling2dSize3Uint8, IgnorePaddingAveragePooling2dSize3Uint8Test)
158
159ARMNN_AUTO_TEST_CASE(IgnorePaddingSimpleL2Pooling2d, IgnorePaddingSimpleL2Pooling2dTest)
160ARMNN_AUTO_TEST_CASE(UNSUPPORTED_IgnorePaddingSimpleL2Pooling2dUint8, IgnorePaddingSimpleL2Pooling2dUint8Test)
161ARMNN_AUTO_TEST_CASE(IgnorePaddingL2Pooling2dSize3, IgnorePaddingL2Pooling2dSize3Test)
162ARMNN_AUTO_TEST_CASE(UNSUPPORTED_IgnorePaddingL2Pooling2dSize3Uint8, IgnorePaddingL2Pooling2dSize3Uint8Test)
163
James Conroy45a9b772018-10-31 11:47:53 +0000164ARMNN_AUTO_TEST_CASE(SimpleMaxPooling2d, SimpleMaxPooling2dTest, armnn::DataLayout::NCHW)
165ARMNN_AUTO_TEST_CASE(SimpleMaxPooling2dNhwc, SimpleMaxPooling2dTest, armnn::DataLayout::NHWC)
166ARMNN_AUTO_TEST_CASE(SimpleMaxPooling2dUint8, SimpleMaxPooling2dUint8Test, armnn::DataLayout::NCHW)
167ARMNN_AUTO_TEST_CASE(SimpleMaxPooling2dUint8Nhwc, SimpleMaxPooling2dUint8Test, armnn::DataLayout::NHWC)
168
169ARMNN_AUTO_TEST_CASE(SimpleAveragePooling2d, SimpleAveragePooling2dTest, armnn::DataLayout::NCHW)
170ARMNN_AUTO_TEST_CASE(SimpleAveragePooling2dNhwc, SimpleAveragePooling2dTest, armnn::DataLayout::NHWC)
171ARMNN_AUTO_TEST_CASE(SimpleAveragePooling2dUint8, SimpleAveragePooling2dUint8Test, armnn::DataLayout::NCHW)
172ARMNN_AUTO_TEST_CASE(SimpleAveragePooling2dUint8Nhwc, SimpleAveragePooling2dUint8Test, armnn::DataLayout::NHWC)
173
surmeh01bceff2f2018-03-29 16:29:27 +0100174ARMNN_AUTO_TEST_CASE(IgnorePaddingAveragePooling2dSize3x2Stride2x2,
175 IgnorePaddingAveragePooling2dSize3x2Stride2x2Test,
176 false)
177ARMNN_AUTO_TEST_CASE(IgnorePaddingAveragePooling2dSize3x2Stride2x2NoPadding,
178 IgnorePaddingAveragePooling2dSize3x2Stride2x2Test,
179 true)
telsoa014fcda012018-03-09 14:13:49 +0000180ARMNN_AUTO_TEST_CASE(LargeTensorsAveragePooling2d, LargeTensorsAveragePooling2dTest)
181ARMNN_AUTO_TEST_CASE(LargeTensorsAveragePooling2dUint8, LargeTensorsAveragePooling2dUint8Test)
182
James Conroy45a9b772018-10-31 11:47:53 +0000183ARMNN_AUTO_TEST_CASE(SimpleL2Pooling2d, SimpleL2Pooling2dTest, armnn::DataLayout::NCHW)
184ARMNN_AUTO_TEST_CASE(SimpleL2Pooling2dNhwc, SimpleL2Pooling2dTest, armnn::DataLayout::NHWC)
185ARMNN_AUTO_TEST_CASE(UNSUPPORTED_SimpleL2Pooling2dUint8, SimpleL2Pooling2dUint8Test, armnn::DataLayout::NCHW)
186
telsoa014fcda012018-03-09 14:13:49 +0000187ARMNN_AUTO_TEST_CASE(L2Pooling2dSize3Stride1, L2Pooling2dSize3Stride1Test)
188ARMNN_AUTO_TEST_CASE(UNSUPPORTED_L2Pooling2dSize3Stride1Uint8, L2Pooling2dSize3Stride1Uint8Test)
189ARMNN_AUTO_TEST_CASE(L2Pooling2dSize3Stride3, L2Pooling2dSize3Stride3Test)
190ARMNN_AUTO_TEST_CASE(UNSUPPORTED_L2Pooling2dSize3Stride3Uint8, L2Pooling2dSize3Stride3Uint8Test)
191ARMNN_AUTO_TEST_CASE(L2Pooling2dSize3Stride4, L2Pooling2dSize3Stride4Test)
192ARMNN_AUTO_TEST_CASE(UNSUPPORTED_L2Pooling2dSize3Stride4Uint8, L2Pooling2dSize3Stride4Uint8Test)
193ARMNN_AUTO_TEST_CASE(L2Pooling2dSize7, L2Pooling2dSize7Test)
194ARMNN_AUTO_TEST_CASE(UNSUPPORTED_L2Pooling2dSize7Uint8, L2Pooling2dSize7Uint8Test)
195ARMNN_AUTO_TEST_CASE(L2Pooling2dSize9, L2Pooling2dSize9Test)
196ARMNN_AUTO_TEST_CASE(UNSUPPORTED_L2Pooling2dSize9Uint8, L2Pooling2dSize9Uint8Test)
197
198// Add
199ARMNN_AUTO_TEST_CASE(SimpleAdd, AdditionTest)
200ARMNN_AUTO_TEST_CASE(AddBroadcast1Element, AdditionBroadcast1ElementTest)
David Beck4a8692c2018-09-07 16:19:24 +0100201ARMNN_AUTO_TEST_CASE(AddBroadcast, AdditionBroadcastTest)
202
203ARMNN_AUTO_TEST_CASE(AdditionUint8, AdditionUint8Test)
204ARMNN_AUTO_TEST_CASE(AddBroadcastUint8, AdditionBroadcastUint8Test)
205ARMNN_AUTO_TEST_CASE(AddBroadcast1ElementUint8, AdditionBroadcast1ElementUint8Test)
206
207// Sub
208ARMNN_AUTO_TEST_CASE(SimpleSub, SubtractionTest)
Mohamed Nour Abouelseoud3d93bc42018-11-21 10:35:17 +0000209ARMNN_AUTO_TEST_CASE(SubBroadcast1Element, SubtractionBroadcast1ElementTest)
210ARMNN_AUTO_TEST_CASE(SubBroadcast, SubtractionBroadcastTest)
211
212ARMNN_AUTO_TEST_CASE(SubtractionUint8, SubtractionUint8Test)
213ARMNN_AUTO_TEST_CASE(SubBroadcastUint8, SubtractionBroadcastUint8Test)
214ARMNN_AUTO_TEST_CASE(SubBroadcast1ElementUint8, SubtractionBroadcast1ElementUint8Test)
David Beck4a8692c2018-09-07 16:19:24 +0100215
Francis Murtaghe7a86a42018-08-29 12:42:10 +0100216// Div
217ARMNN_AUTO_TEST_CASE(SimpleDivision, DivisionTest)
David Beckbc392452018-09-10 14:47:28 +0100218ARMNN_AUTO_TEST_CASE(DivisionByZero, DivisionByZeroTest)
Francis Murtaghe7a86a42018-08-29 12:42:10 +0100219ARMNN_AUTO_TEST_CASE(DivisionBroadcast1Element, DivisionBroadcast1ElementTest)
220ARMNN_AUTO_TEST_CASE(DivisionBroadcast1DVector, DivisionBroadcast1DVectorTest)
David Beck5cd01f32018-09-12 16:00:08 +0100221// NOTE: quantized division is not supported by CL and not required by the
222// android NN api
Francis Murtaghe7a86a42018-08-29 12:42:10 +0100223
telsoa014fcda012018-03-09 14:13:49 +0000224// Mul
225ARMNN_AUTO_TEST_CASE(SimpleMultiplication, MultiplicationTest)
surmeh01bceff2f2018-03-29 16:29:27 +0100226ARMNN_AUTO_TEST_CASE(MultiplicationBroadcast1Element, MultiplicationBroadcast1ElementTest)
227ARMNN_AUTO_TEST_CASE(MultiplicationBroadcast1DVector, MultiplicationBroadcast1DVectorTest)
Matthew Benthame2ec3302018-10-01 11:32:48 +0100228ARMNN_AUTO_TEST_CASE(MultiplicationUint8, MultiplicationUint8Test)
229ARMNN_AUTO_TEST_CASE(MultiplicationBroadcast1ElementUint8, MultiplicationBroadcast1ElementUint8Test)
230ARMNN_AUTO_TEST_CASE(MultiplicationBroadcast1DVectorUint8, MultiplicationBroadcast1DVectorUint8Test)
telsoa014fcda012018-03-09 14:13:49 +0000231
232// Batch Norm
233ARMNN_AUTO_TEST_CASE(BatchNorm, BatchNormTest)
Nikhil Rajd1340932018-10-18 14:27:50 +0100234ARMNN_AUTO_TEST_CASE(BatchNormNhwc, BatchNormNhwcTest)
telsoa014fcda012018-03-09 14:13:49 +0000235
Matteo Martincigh539b44d2018-10-01 09:26:39 +0100236// L2 Normalization
jimfly013aab7c32018-11-12 13:32:08 +0000237ARMNN_AUTO_TEST_CASE(L2Normalization1d, L2Normalization1dTest, armnn::DataLayout::NCHW)
238ARMNN_AUTO_TEST_CASE(L2Normalization2d, L2Normalization2dTest, armnn::DataLayout::NCHW)
239ARMNN_AUTO_TEST_CASE(L2Normalization3d, L2Normalization3dTest, armnn::DataLayout::NCHW)
240ARMNN_AUTO_TEST_CASE(L2Normalization4d, L2Normalization4dTest, armnn::DataLayout::NCHW)
telsoa014fcda012018-03-09 14:13:49 +0000241
jimfly013aab7c32018-11-12 13:32:08 +0000242ARMNN_AUTO_TEST_CASE(L2Normalization1dNhwc, L2Normalization1dTest, armnn::DataLayout::NHWC)
243ARMNN_AUTO_TEST_CASE(L2Normalization2dNhwc, L2Normalization2dTest, armnn::DataLayout::NHWC)
244ARMNN_AUTO_TEST_CASE(L2Normalization3dNhwc, L2Normalization3dTest, armnn::DataLayout::NHWC)
245ARMNN_AUTO_TEST_CASE(L2Normalization4dNhwc, L2Normalization4dTest, armnn::DataLayout::NHWC)
Matteo Martincigh539b44d2018-10-01 09:26:39 +0100246
James Conroy074f3712018-10-03 09:32:03 +0100247// Resize Bilinear - NCHW data layout
James Conroy6b965822018-11-01 11:33:09 +0000248ARMNN_AUTO_TEST_CASE(ResizeBilinearNop, ResizeBilinearNopTest, armnn::DataLayout::NCHW)
249ARMNN_AUTO_TEST_CASE(SimpleResizeBilinear, SimpleResizeBilinearTest, armnn::DataLayout::NCHW)
250ARMNN_AUTO_TEST_CASE(ResizeBilinearSqMin, ResizeBilinearSqMinTest, armnn::DataLayout::NCHW)
251ARMNN_AUTO_TEST_CASE(ResizeBilinearMin, ResizeBilinearMinTest, armnn::DataLayout::NCHW)
252ARMNN_AUTO_TEST_CASE(ResizeBilinearMag, ResizeBilinearMagTest, armnn::DataLayout::NCHW)
telsoa014fcda012018-03-09 14:13:49 +0000253
James Conroy074f3712018-10-03 09:32:03 +0100254// Resize Bilinear - NHWC data layout
James Conroy6b965822018-11-01 11:33:09 +0000255ARMNN_AUTO_TEST_CASE(ResizeBilinearNopNhwc, ResizeBilinearNopTest, armnn::DataLayout::NHWC)
256ARMNN_AUTO_TEST_CASE(SimpleResizeBilinearNhwc, SimpleResizeBilinearTest, armnn::DataLayout::NHWC)
257ARMNN_AUTO_TEST_CASE(ResizeBilinearSqMinNhwc, ResizeBilinearSqMinTest, armnn::DataLayout::NHWC)
258ARMNN_AUTO_TEST_CASE(ResizeBilinearMinNhwc, ResizeBilinearMinTest, armnn::DataLayout::NHWC)
259ARMNN_AUTO_TEST_CASE(ResizeBilinearMagNhwc, ResizeBilinearMagTest, armnn::DataLayout::NHWC)
James Conroy074f3712018-10-03 09:32:03 +0100260
telsoa014fcda012018-03-09 14:13:49 +0000261// Constant
262ARMNN_AUTO_TEST_CASE(Constant, ConstantTest)
Nina Drozd58ef2c62019-05-16 12:09:18 +0100263ARMNN_AUTO_TEST_CASE(ConstantUint8, ConstantUint8SimpleQuantizationScaleNoOffsetTest)
telsoa014fcda012018-03-09 14:13:49 +0000264
265// Concat
266ARMNN_AUTO_TEST_CASE(Concatenation1d, Concatenation1dTest)
narpra0163b08822018-11-20 11:29:12 +0000267ARMNN_AUTO_TEST_CASE(Concatenation1dUint8, Concatenation1dUint8Test)
telsoa014fcda012018-03-09 14:13:49 +0000268
269ARMNN_AUTO_TEST_CASE(Concatenation2dDim0, Concatenation2dDim0Test)
narpra0163b08822018-11-20 11:29:12 +0000270ARMNN_AUTO_TEST_CASE(Concatenation2dDim0Uint8, Concatenation2dDim0Uint8Test)
telsoa014fcda012018-03-09 14:13:49 +0000271ARMNN_AUTO_TEST_CASE(Concatenation2dDim1, Concatenation2dDim1Test)
narpra0163b08822018-11-20 11:29:12 +0000272ARMNN_AUTO_TEST_CASE(Concatenation2dDim1Uint8, Concatenation2dDim1Uint8Test)
273
telsoa014fcda012018-03-09 14:13:49 +0000274ARMNN_AUTO_TEST_CASE(Concatenation2dDim0DiffInputDims, Concatenation2dDim0DiffInputDimsTest)
narpra0163b08822018-11-20 11:29:12 +0000275ARMNN_AUTO_TEST_CASE(Concatenation2dDim0DiffInputDimsUint8, Concatenation2dDim0DiffInputDimsUint8Test)
telsoa014fcda012018-03-09 14:13:49 +0000276ARMNN_AUTO_TEST_CASE(Concatenation2dDim1DiffInputDims, Concatenation2dDim1DiffInputDimsTest)
narpra0163b08822018-11-20 11:29:12 +0000277ARMNN_AUTO_TEST_CASE(Concatenation2dDim1DiffInputDimsUint8, Concatenation2dDim1DiffInputDimsUint8Test)
telsoa014fcda012018-03-09 14:13:49 +0000278
279ARMNN_AUTO_TEST_CASE(Concatenation3dDim0, Concatenation3dDim0Test)
narpra0163b08822018-11-20 11:29:12 +0000280ARMNN_AUTO_TEST_CASE(Concatenation3dDim0Uint8, Concatenation3dDim0Uint8Test)
telsoa014fcda012018-03-09 14:13:49 +0000281ARMNN_AUTO_TEST_CASE(Concatenation3dDim1, Concatenation3dDim1Test)
narpra0163b08822018-11-20 11:29:12 +0000282ARMNN_AUTO_TEST_CASE(Concatenation3dDim1Uint8, Concatenation3dDim1Uint8Test)
narpra015cdda352018-11-19 15:30:27 +0000283ARMNN_AUTO_TEST_CASE(Concatenation3dDim2, Concatenation3dDim2Test, false)
narpra0163b08822018-11-20 11:29:12 +0000284ARMNN_AUTO_TEST_CASE(Concatenation3dDim2Uint8, Concatenation3dDim2Uint8Test, false)
285
telsoa014fcda012018-03-09 14:13:49 +0000286ARMNN_AUTO_TEST_CASE(Concatenation3dDim0DiffInputDims, Concatenation3dDim0DiffInputDimsTest)
narpra0163b08822018-11-20 11:29:12 +0000287ARMNN_AUTO_TEST_CASE(Concatenation3dDim0DiffInputDimsUint8, Concatenation3dDim0DiffInputDimsUint8Test)
telsoa014fcda012018-03-09 14:13:49 +0000288ARMNN_AUTO_TEST_CASE(Concatenation3dDim1DiffInputDims, Concatenation3dDim1DiffInputDimsTest)
narpra0163b08822018-11-20 11:29:12 +0000289ARMNN_AUTO_TEST_CASE(Concatenation3dDim1DiffInputDimsUint8, Concatenation3dDim1DiffInputDimsUint8Test)
narpra015cdda352018-11-19 15:30:27 +0000290ARMNN_AUTO_TEST_CASE(Concatenation3dDim2DiffInputDims, Concatenation3dDim2DiffInputDimsTest, false)
narpra0163b08822018-11-20 11:29:12 +0000291ARMNN_AUTO_TEST_CASE(Concatenation3dDim2DiffInputDimsUint8, Concatenation3dDim2DiffInputDimsUint8Test, false)
narpra015cdda352018-11-19 15:30:27 +0000292
293ARMNN_AUTO_TEST_CASE(Concatenation4dDim0, Concatenation4dDim0Test)
294ARMNN_AUTO_TEST_CASE(Concatenation4dDim1, Concatenation4dDim1Test)
295ARMNN_AUTO_TEST_CASE(Concatenation4dDim3, Concatenation4dDim3Test, false)
narpra0163b08822018-11-20 11:29:12 +0000296ARMNN_AUTO_TEST_CASE(Concatenation4dDim0Uint8, Concatenation4dDim0Uint8Test)
297ARMNN_AUTO_TEST_CASE(Concatenation4dDim1Uint8, Concatenation4dDim1Uint8Test)
298ARMNN_AUTO_TEST_CASE(Concatenation4dDim3Uint8, Concatenation4dDim3Uint8Test, false)
299
narpra015cdda352018-11-19 15:30:27 +0000300ARMNN_AUTO_TEST_CASE(Concatenation4dDiffShapeDim0, Concatenation4dDiffShapeDim0Test)
301ARMNN_AUTO_TEST_CASE(Concatenation4dDiffShapeDim1, Concatenation4dDiffShapeDim1Test)
302ARMNN_AUTO_TEST_CASE(Concatenation4dDiffShapeDim3, Concatenation4dDiffShapeDim3Test, false)
narpra0163b08822018-11-20 11:29:12 +0000303ARMNN_AUTO_TEST_CASE(Concatenation4dDiffShapeDim0Uint8, Concatenation4dDiffShapeDim0Uint8Test)
304ARMNN_AUTO_TEST_CASE(Concatenation4dDiffShapeDim1Uint8, Concatenation4dDiffShapeDim1Uint8Test)
305ARMNN_AUTO_TEST_CASE(Concatenation4dDiffShapeDim3Uint8, Concatenation4dDiffShapeDim3Uint8Test, false)
telsoa014fcda012018-03-09 14:13:49 +0000306
307// Floor
308ARMNN_AUTO_TEST_CASE(SimpleFloor, SimpleFloorTest)
309
310// Reshape
Nina Drozd8ed4b8c2019-05-29 10:41:04 +0100311ARMNN_AUTO_TEST_CASE(SimpleReshapeFloat32, SimpleReshapeTest<armnn::DataType::Float32>)
312ARMNN_AUTO_TEST_CASE(SimpleReshapeUint8, SimpleReshapeTest<armnn::DataType::QuantisedAsymm8>)
telsoa014fcda012018-03-09 14:13:49 +0000313
Mohamed Nour Abouelseoud7420e552018-10-12 12:26:24 +0100314// Pad
Mohamed Nour Abouelseouddd6acea2018-10-18 12:26:19 +0100315ARMNN_AUTO_TEST_CASE(PadFloat322d, PadFloat322dTest)
316ARMNN_AUTO_TEST_CASE(PadFloat323d, PadFloat323dTest)
317ARMNN_AUTO_TEST_CASE(PadFloat324d, PadFloat324dTest)
Mohamed Nour Abouelseoud7420e552018-10-12 12:26:24 +0100318
telsoa014fcda012018-03-09 14:13:49 +0000319// Permute
320ARMNN_AUTO_TEST_CASE(SimplePermuteFloat32, SimplePermuteFloat32Test)
321ARMNN_AUTO_TEST_CASE(SimplePermuteUint8, SimplePermuteUint8Test)
surmeh01bceff2f2018-03-29 16:29:27 +0100322ARMNN_AUTO_TEST_CASE(PermuteFloat32ValueSet1, PermuteFloat32ValueSet1Test)
323ARMNN_AUTO_TEST_CASE(PermuteFloat32ValueSet2, PermuteFloat32ValueSet2Test)
324ARMNN_AUTO_TEST_CASE(PermuteFloat32ValueSet3, PermuteFloat32ValueSet3Test)
telsoa014fcda012018-03-09 14:13:49 +0000325
telsoa01c577f2c2018-08-31 09:22:23 +0100326// Lstm
327ARMNN_AUTO_TEST_CASE(LstmLayerFloat32WithCifgWithPeepholeNoProjection,
Les Bellde9011b2018-10-03 10:37:52 +0100328 LstmLayerFloat32WithCifgWithPeepholeNoProjectionTest)
telsoa01c577f2c2018-08-31 09:22:23 +0100329ARMNN_AUTO_TEST_CASE(LstmLayerFloat32NoCifgNoPeepholeNoProjection,
330 LstmLayerFloat32NoCifgNoPeepholeNoProjectionTest)
331ARMNN_AUTO_TEST_CASE(LstmLayerFloat32NoCifgWithPeepholeWithProjection,
Les Bellde9011b2018-10-03 10:37:52 +0100332 LstmLayerFloat32NoCifgWithPeepholeWithProjectionTest)
telsoa01c577f2c2018-08-31 09:22:23 +0100333
334// Convert from Float16 to Float32
335ARMNN_AUTO_TEST_CASE(SimpleConvertFp16ToFp32, SimpleConvertFp16ToFp32Test)
336// Convert from Float32 to Float16
337ARMNN_AUTO_TEST_CASE(SimpleConvertFp32ToFp16, SimpleConvertFp32ToFp16Test)
338
Éanna Ó Catháin47c1ddb2018-10-12 14:24:13 +0100339ARMNN_AUTO_TEST_CASE(AdditionAfterMaxPool, AdditionAfterMaxPoolTest)
340
keidav01a959ee52018-12-19 10:04:58 +0000341//Max
342ARMNN_AUTO_TEST_CASE(MaximumSimple, MaximumSimpleTest)
343ARMNN_AUTO_TEST_CASE(MaximumBroadcast1Element, MaximumBroadcast1ElementTest)
344ARMNN_AUTO_TEST_CASE(MaximumBroadcast1DVector, MaximumBroadcast1DVectorTest)
345ARMNN_AUTO_TEST_CASE(MaximumUint8, MaximumUint8Test)
346ARMNN_AUTO_TEST_CASE(MaximumBroadcast1ElementUint8, MaximumBroadcast1ElementUint8Test)
347ARMNN_AUTO_TEST_CASE(MaximumBroadcast1DVectorUint8, MaximumBroadcast1DVectorUint8Test)
348
Matteo Martincigh28dcab62018-10-19 16:40:03 +0100349// Mean
350ARMNN_AUTO_TEST_CASE(MeanUint8Simple, MeanUint8SimpleTest)
351ARMNN_AUTO_TEST_CASE(MeanUint8SimpleAxis, MeanUint8SimpleAxisTest)
352ARMNN_AUTO_TEST_CASE(MeanUint8KeepDims, MeanUint8KeepDimsTest)
353ARMNN_AUTO_TEST_CASE(MeanUint8MultipleDims, MeanUint8MultipleDimsTest)
354ARMNN_AUTO_TEST_CASE(MeanVtsUint8, MeanVtsUint8Test)
355
356ARMNN_AUTO_TEST_CASE(MeanFloatSimple, MeanFloatSimpleTest)
357ARMNN_AUTO_TEST_CASE(MeanFloatSimpleAxis, MeanFloatSimpleAxisTest)
358ARMNN_AUTO_TEST_CASE(MeanFloatKeepDims, MeanFloatKeepDimsTest)
359ARMNN_AUTO_TEST_CASE(MeanFloatMultipleDims, MeanFloatMultipleDimsTest)
360ARMNN_AUTO_TEST_CASE(MeanVtsFloat1, MeanVtsFloat1Test)
361ARMNN_AUTO_TEST_CASE(MeanVtsFloat2, MeanVtsFloat2Test)
362ARMNN_AUTO_TEST_CASE(MeanVtsFloat3, MeanVtsFloat3Test)
363
saoste019292aa32019-01-08 13:55:59 +0000364// Minimum
365ARMNN_AUTO_TEST_CASE(MinimumBroadcast1Element1, MinimumBroadcast1ElementTest1)
366ARMNN_AUTO_TEST_CASE(MinimumBroadcast1Element2, MinimumBroadcast1ElementTest2)
367ARMNN_AUTO_TEST_CASE(MinimumBroadcast1DVectorUint8, MinimumBroadcast1DVectorUint8Test)
368
Nattapat Chaimanowongc6a41ff2019-01-29 09:56:02 +0000369// Greater
370ARMNN_AUTO_TEST_CASE(SimpleGreater, GreaterSimpleTest)
371ARMNN_AUTO_TEST_CASE(GreaterBroadcast1Element, GreaterBroadcast1ElementTest)
372ARMNN_AUTO_TEST_CASE(GreaterBroadcast1DVector, GreaterBroadcast1DVectorTest)
373ARMNN_AUTO_TEST_CASE(GreaterUint8, GreaterUint8Test)
374ARMNN_AUTO_TEST_CASE(GreaterBroadcast1ElementUint8, GreaterBroadcast1ElementUint8Test)
375ARMNN_AUTO_TEST_CASE(GreaterBroadcast1DVectorUint8, GreaterBroadcast1DVectorUint8Test)
376
Narumol Prangnawarat65d30962019-03-14 11:55:03 +0000377// Softmax
378ARMNN_AUTO_TEST_CASE(SimpleSoftmaxBeta1, SimpleSoftmaxTest, 1.0f)
379ARMNN_AUTO_TEST_CASE(SimpleSoftmaxBeta2, SimpleSoftmaxTest, 2.0f)
380ARMNN_AUTO_TEST_CASE(SimpleSoftmaxBeta1Uint8, SimpleSoftmaxUint8Test, 1.0f)
381ARMNN_AUTO_TEST_CASE(SimpleSoftmaxBeta2Uint8, SimpleSoftmaxUint8Test, 2.0f)
382
383ARMNN_AUTO_TEST_CASE(Simple3dSoftmax, Simple3dSoftmaxTest, 1.0f)
384ARMNN_AUTO_TEST_CASE(Simple3dSoftmaxUint8, Simple3dSoftmaxUint8Test, 1.0f)
385
386ARMNN_AUTO_TEST_CASE(Simple4dSoftmax, Simple4dSoftmaxTest, 1.0f)
387ARMNN_AUTO_TEST_CASE(Simple4dSoftmaxUint8, Simple4dSoftmaxUint8Test, 1.0f)
388
389ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareSoftmaxBeta1WithReference, CompareSoftmaxTest, 1.0f)
390ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareSoftmaxBeta2WithReference, CompareSoftmaxTest, 2.0f)
391ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareSoftmaxUint8, CompareSoftmaxUint8Test, 1.0f)
392
Sadik Armaganf4464322018-12-20 16:19:12 +0000393// Space To Batch Nd
394ARMNN_AUTO_TEST_CASE(SpaceToBatchNdSimpleFloat32, SpaceToBatchNdSimpleFloat32Test)
395ARMNN_AUTO_TEST_CASE(SpaceToBatchNdMultiChannelsFloat32, SpaceToBatchNdMultiChannelsFloat32Test)
396ARMNN_AUTO_TEST_CASE(SpaceToBatchNdMultiBlockFloat32, SpaceToBatchNdMultiBlockFloat32Test)
397ARMNN_AUTO_TEST_CASE(SpaceToBatchNdPaddingFloat32, SpaceToBatchNdPaddingFloat32Test)
398
399ARMNN_AUTO_TEST_CASE(SpaceToBatchNdSimpleUint8, SpaceToBatchNdSimpleUint8Test)
400ARMNN_AUTO_TEST_CASE(SpaceToBatchNdMultiChannelsUint8, SpaceToBatchNdMultiChannelsUint8Test)
401ARMNN_AUTO_TEST_CASE(SpaceToBatchNdMultiBlockUint8, SpaceToBatchNdMultiBlockUint8Test)
402ARMNN_AUTO_TEST_CASE(SpaceToBatchNdPaddingUint8, SpaceToBatchNdPaddingUint8Test)
403
404ARMNN_AUTO_TEST_CASE(SpaceToBatchNdSimpleNHWCFloat32, SpaceToBatchNdSimpleNHWCFloat32Test)
405ARMNN_AUTO_TEST_CASE(SpaceToBatchNdMultiChannelsNHWCFloat32, SpaceToBatchNdMultiChannelsNHWCFloat32Test)
406ARMNN_AUTO_TEST_CASE(SpaceToBatchNdMultiBlockNHWCFloat32, SpaceToBatchNdMultiBlockNHWCFloat32Test)
407ARMNN_AUTO_TEST_CASE(SpaceToBatchNdPaddingNHWCFloat32, SpaceToBatchNdPaddingNHWCFloat32Test)
408
409ARMNN_AUTO_TEST_CASE(SpaceToBatchNdSimpleNHWCUint8, SpaceToBatchNdSimpleNHWCUint8Test)
410ARMNN_AUTO_TEST_CASE(SpaceToBatchNdMultiChannelsNHWCUint8, SpaceToBatchNdMultiChannelsNHWCUint8Test)
411ARMNN_AUTO_TEST_CASE(SpaceToBatchNdMultiBlockNHWCUint8, SpaceToBatchNdMultiBlockNHWCUint8Test)
412ARMNN_AUTO_TEST_CASE(SpaceToBatchNdPaddingNHWCUint8, SpaceToBatchNdPaddingNHWCUint8Test)
413
keidav01d74dc912018-12-10 18:16:07 +0000414// Strided Slice
415ARMNN_AUTO_TEST_CASE(StridedSlice4DFloat32, StridedSlice4DFloat32Test)
416ARMNN_AUTO_TEST_CASE(StridedSlice4DReverseFloat32, StridedSlice4DReverseFloat32Test)
417ARMNN_AUTO_TEST_CASE(StridedSliceSimpleStrideFloat32, StridedSliceSimpleStrideFloat32Test)
418ARMNN_AUTO_TEST_CASE(StridedSliceSimpleRangeMaskFloat32, StridedSliceSimpleRangeMaskFloat32Test)
419ARMNN_AUTO_TEST_CASE(StridedSliceShrinkAxisMaskFloat32, StridedSliceShrinkAxisMaskFloat32Test)
420ARMNN_AUTO_TEST_CASE(StridedSlice3DFloat32, StridedSlice3DFloat32Test)
421ARMNN_AUTO_TEST_CASE(StridedSlice3DReverseFloat32, StridedSlice3DReverseFloat32Test)
422ARMNN_AUTO_TEST_CASE(StridedSlice2DFloat32, StridedSlice2DFloat32Test)
423ARMNN_AUTO_TEST_CASE(StridedSlice2DReverseFloat32, StridedSlice2DReverseFloat32Test)
424
425ARMNN_AUTO_TEST_CASE(StridedSlice4DUint8, StridedSlice4DUint8Test)
426ARMNN_AUTO_TEST_CASE(StridedSlice4DReverseUint8, StridedSlice4DReverseUint8Test)
427ARMNN_AUTO_TEST_CASE(StridedSliceSimpleStrideUint8, StridedSliceSimpleStrideUint8Test)
428ARMNN_AUTO_TEST_CASE(StridedSliceSimpleRangeMaskUint8, StridedSliceSimpleRangeMaskUint8Test)
429ARMNN_AUTO_TEST_CASE(StridedSliceShrinkAxisMaskUint8, StridedSliceShrinkAxisMaskUint8Test)
430ARMNN_AUTO_TEST_CASE(StridedSlice3DUint8, StridedSlice3DUint8Test)
431ARMNN_AUTO_TEST_CASE(StridedSlice3DReverseUint8, StridedSlice3DReverseUint8Test)
432ARMNN_AUTO_TEST_CASE(StridedSlice2DUint8, StridedSlice2DUint8Test)
433ARMNN_AUTO_TEST_CASE(StridedSlice2DReverseUint8, StridedSlice2DReverseUint8Test)
434
Sadik Armagan20ec2492019-05-31 09:09:44 +0100435// Quantize
436ARMNN_AUTO_TEST_CASE(QuantizeSimpleUint8, QuantizeSimpleUint8Test)
437ARMNN_AUTO_TEST_CASE(QuantizeClampUint8, QuantizeClampUint8Test)
438
telsoa014fcda012018-03-09 14:13:49 +0000439// ============================================================================
440// COMPARE tests
441
442ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareConv2dWithReference, CompareConvolution2dTest)
443
jimfly017af00da2018-10-31 14:43:53 +0000444ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareDepthwiseConv2dWithReferenceFloat32,
Nattapat Chaimanowong649dd952019-01-22 16:10:44 +0000445 CompareDepthwiseConvolution2dFloatTest,
jimfly017af00da2018-10-31 14:43:53 +0000446 armnn::DataLayout::NCHW)
447ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareDepthwiseConv2dWithReferenceUint8,
Nattapat Chaimanowong649dd952019-01-22 16:10:44 +0000448 CompareDepthwiseConvolution2dUint8Test,
jimfly017af00da2018-10-31 14:43:53 +0000449 armnn::DataLayout::NCHW)
450
451ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareDepthwiseConv2dWithReferenceFloat32Nhwc,
Nattapat Chaimanowong649dd952019-01-22 16:10:44 +0000452 CompareDepthwiseConvolution2dFloatTest,
jimfly017af00da2018-10-31 14:43:53 +0000453 armnn::DataLayout::NHWC)
454ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareDepthwiseConv2dWithReferenceUint8Nhwc,
Nattapat Chaimanowong649dd952019-01-22 16:10:44 +0000455 CompareDepthwiseConvolution2dUint8Test,
jimfly017af00da2018-10-31 14:43:53 +0000456 armnn::DataLayout::NHWC)
telsoa014fcda012018-03-09 14:13:49 +0000457
458ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareNormalizationWithinWithReference, CompareNormalizationTest,
459 armnn::NormalizationAlgorithmChannel::Within,
460 armnn::NormalizationAlgorithmMethod::LocalBrightness)
461ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareNormalizationAcrossWithReference, CompareNormalizationTest,
462 armnn::NormalizationAlgorithmChannel::Across,
463 armnn::NormalizationAlgorithmMethod::LocalBrightness)
464
telsoa014fcda012018-03-09 14:13:49 +0000465ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareMaxPooling2dWithRef, ComparePooling2dTest, armnn::PoolingAlgorithm::Max)
466
467ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareAveragePooling2dWithRef, ComparePooling2dTest, armnn::PoolingAlgorithm::Average)
468ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareAveragePooling2dWithRefUint8, ComparePooling2dUint8Test,
469 armnn::PoolingAlgorithm::Average)
470
471ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareL2Pooling2dWithRef, ComparePooling2dTest, armnn::PoolingAlgorithm::L2)
472
473ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareAddition, CompareAdditionTest)
474
475ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareMultiplicationWithRef, CompareMultiplicationTest)
476
477ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareBatchNorm, CompareBatchNormTest)
478
479ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareReLu1, CompareBoundedReLuTest, 1.0f, -1.0f)
480ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareReLu6, CompareBoundedReLuTest, 6.0f, 0.0f)
481
482// ============================================================================
483// FIXTURE tests
484
485ARMNN_COMPARE_REF_FIXTURE_TEST_CASE(CompareSigmoidActivationWithReference, ActivationFixture,
486 CompareActivationTest, armnn::ActivationFunction::Sigmoid, 5u)
487
488ARMNN_COMPARE_REF_FIXTURE_TEST_CASE(CompareTanhActivationWithReference, ActivationFixture,
489 CompareActivationTest, armnn::ActivationFunction::TanH, 5u)
490
491ARMNN_COMPARE_REF_FIXTURE_TEST_CASE(CompareLinearActivationWithReference, ActivationFixture,
492 CompareActivationTest, armnn::ActivationFunction::Linear, 5u)
493
494ARMNN_COMPARE_REF_FIXTURE_TEST_CASE(CompareReLuActivationWithReference, ActivationFixture,
495 CompareActivationTest, armnn::ActivationFunction::ReLu, 5u)
496
497ARMNN_COMPARE_REF_FIXTURE_TEST_CASE(CompareBoundedReLuActivationWithReference, ActivationFixture,
498 CompareActivationTest, armnn::ActivationFunction::BoundedReLu, 5u)
499ARMNN_COMPARE_REF_FIXTURE_TEST_CASE(CompareBoundedReLuActivationWithReferenceUint8, ActivationFixture,
500 CompareActivationUint8Test, armnn::ActivationFunction::BoundedReLu)
501
502ARMNN_COMPARE_REF_FIXTURE_TEST_CASE(CompareSoftReLuActivationWithReference, ActivationFixture,
503 CompareActivationTest, armnn::ActivationFunction::SoftReLu, 5u)
504
505ARMNN_COMPARE_REF_FIXTURE_TEST_CASE(CompareLeakyReLuActivationWithReference, ActivationFixture,
506 CompareActivationTest, armnn::ActivationFunction::LeakyReLu, 5u)
507
508ARMNN_COMPARE_REF_FIXTURE_TEST_CASE(CompareAbsActivationWithReference, ActivationFixture,
509 CompareActivationTest, armnn::ActivationFunction::Abs, 5u)
510
511ARMNN_COMPARE_REF_FIXTURE_TEST_CASE(CompareSqrtActivationWithReference, PositiveActivationFixture,
512 CompareActivationTest, armnn::ActivationFunction::Sqrt, 5u)
513
514ARMNN_COMPARE_REF_FIXTURE_TEST_CASE(CompareSquareActivationWithReference, ActivationFixture,
515 CompareActivationTest, armnn::ActivationFunction::Square, 5u)
516
517BOOST_AUTO_TEST_SUITE_END()