blob: 20eb4137622fa636f674bdb153d9609b6ba1f2db [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
Francis Murtagh57f13d52019-06-24 14:24:36 +010044ARMNN_AUTO_TEST_CASE(BatchToSpaceNdNhwcFloat321, BatchToSpaceNdNhwcTest1<armnn::DataType::Float32>)
45ARMNN_AUTO_TEST_CASE(BatchToSpaceNdNhwcFloat322, BatchToSpaceNdNhwcTest2<armnn::DataType::Float32>)
46ARMNN_AUTO_TEST_CASE(BatchToSpaceNdNhwcFloat323, BatchToSpaceNdNhwcTest3<armnn::DataType::Float32>)
Mike Kelly831faed2018-11-28 11:52:08 +000047
Francis Murtagh57f13d52019-06-24 14:24:36 +010048ARMNN_AUTO_TEST_CASE(BatchToSpaceNdNchwFloat321, BatchToSpaceNdNchwTest1<armnn::DataType::Float32>)
49ARMNN_AUTO_TEST_CASE(BatchToSpaceNdNchwFloat322, BatchToSpaceNdNchwTest2<armnn::DataType::Float32>)
50ARMNN_AUTO_TEST_CASE(BatchToSpaceNdNchwFloat323, BatchToSpaceNdNchwTest3<armnn::DataType::Float32>)
Mike Kelly831faed2018-11-28 11:52:08 +000051
Francis Murtagh57f13d52019-06-24 14:24:36 +010052ARMNN_AUTO_TEST_CASE(BatchToSpaceNdNhwcUint1, BatchToSpaceNdNhwcTest1<armnn::DataType::QuantisedAsymm8>)
53ARMNN_AUTO_TEST_CASE(BatchToSpaceNdNhwcUint2, BatchToSpaceNdNhwcTest2<armnn::DataType::QuantisedAsymm8>)
54ARMNN_AUTO_TEST_CASE(BatchToSpaceNdNhwcUint3, BatchToSpaceNdNhwcTest3<armnn::DataType::QuantisedAsymm8>)
Mike Kelly831faed2018-11-28 11:52:08 +000055
Francis Murtagh57f13d52019-06-24 14:24:36 +010056ARMNN_AUTO_TEST_CASE(BatchToSpaceNdNchwUint1, BatchToSpaceNdNchwTest1<armnn::DataType::QuantisedAsymm8>)
57ARMNN_AUTO_TEST_CASE(BatchToSpaceNdNchwUint2, BatchToSpaceNdNchwTest2<armnn::DataType::QuantisedAsymm8>)
58ARMNN_AUTO_TEST_CASE(BatchToSpaceNdNchwUint3, BatchToSpaceNdNchwTest3<armnn::DataType::QuantisedAsymm8>)
Mike Kelly831faed2018-11-28 11:52:08 +000059
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)
Narumol Prangnawarat71c80b12019-06-17 17:45:43 +0100136ARMNN_AUTO_TEST_CASE(ConcatUint8DifferentInputOutputQParam,
137 ConcatDifferentInputOutputQParamTest<armnn::DataType::QuantisedAsymm8>, false)
telsoa014fcda012018-03-09 14:13:49 +0000138
narpra0155a97bc2018-10-02 14:35:53 +0100139// Normalization
140ARMNN_AUTO_TEST_CASE(SimpleNormalizationAcross, SimpleNormalizationAcrossTest)
141ARMNN_AUTO_TEST_CASE(SimpleNormalizationWithin, SimpleNormalizationWithinTest)
142ARMNN_AUTO_TEST_CASE(SimpleNormalizationAcrossNhwc, SimpleNormalizationAcrossNhwcTest)
143
telsoa014fcda012018-03-09 14:13:49 +0000144// Pooling
145ARMNN_AUTO_TEST_CASE(SimpleMaxPooling2dSize3x3Stride2x4, SimpleMaxPooling2dSize3x3Stride2x4Test, true)
146ARMNN_AUTO_TEST_CASE(SimpleMaxPooling2dSize3x3Stride2x4Uint8, SimpleMaxPooling2dSize3x3Stride2x4Uint8Test, true)
147
148ARMNN_AUTO_TEST_CASE(IgnorePaddingSimpleMaxPooling2d, IgnorePaddingSimpleMaxPooling2dTest)
149ARMNN_AUTO_TEST_CASE(IgnorePaddingSimpleMaxPooling2dUint8, IgnorePaddingSimpleMaxPooling2dUint8Test)
150ARMNN_AUTO_TEST_CASE(IgnorePaddingMaxPooling2dSize3, IgnorePaddingMaxPooling2dSize3Test)
151ARMNN_AUTO_TEST_CASE(IgnorePaddingMaxPooling2dSize3Uint8, IgnorePaddingMaxPooling2dSize3Uint8Test)
152
153ARMNN_AUTO_TEST_CASE(IgnorePaddingSimpleAveragePooling2d, IgnorePaddingSimpleAveragePooling2dTest)
154ARMNN_AUTO_TEST_CASE(IgnorePaddingSimpleAveragePooling2dUint8, IgnorePaddingSimpleAveragePooling2dUint8Test)
155ARMNN_AUTO_TEST_CASE(IgnorePaddingSimpleAveragePooling2dNoPadding, IgnorePaddingSimpleAveragePooling2dNoPaddingTest)
156ARMNN_AUTO_TEST_CASE(IgnorePaddingSimpleAveragePooling2dNoPaddingUint8,
surmeh01bceff2f2018-03-29 16:29:27 +0100157 IgnorePaddingSimpleAveragePooling2dNoPaddingUint8Test)
telsoa014fcda012018-03-09 14:13:49 +0000158ARMNN_AUTO_TEST_CASE(IgnorePaddingAveragePooling2dSize3, IgnorePaddingAveragePooling2dSize3Test)
159ARMNN_AUTO_TEST_CASE(IgnorePaddingAveragePooling2dSize3Uint8, IgnorePaddingAveragePooling2dSize3Uint8Test)
160
161ARMNN_AUTO_TEST_CASE(IgnorePaddingSimpleL2Pooling2d, IgnorePaddingSimpleL2Pooling2dTest)
162ARMNN_AUTO_TEST_CASE(UNSUPPORTED_IgnorePaddingSimpleL2Pooling2dUint8, IgnorePaddingSimpleL2Pooling2dUint8Test)
163ARMNN_AUTO_TEST_CASE(IgnorePaddingL2Pooling2dSize3, IgnorePaddingL2Pooling2dSize3Test)
164ARMNN_AUTO_TEST_CASE(UNSUPPORTED_IgnorePaddingL2Pooling2dSize3Uint8, IgnorePaddingL2Pooling2dSize3Uint8Test)
165
James Conroy45a9b772018-10-31 11:47:53 +0000166ARMNN_AUTO_TEST_CASE(SimpleMaxPooling2d, SimpleMaxPooling2dTest, armnn::DataLayout::NCHW)
167ARMNN_AUTO_TEST_CASE(SimpleMaxPooling2dNhwc, SimpleMaxPooling2dTest, armnn::DataLayout::NHWC)
168ARMNN_AUTO_TEST_CASE(SimpleMaxPooling2dUint8, SimpleMaxPooling2dUint8Test, armnn::DataLayout::NCHW)
169ARMNN_AUTO_TEST_CASE(SimpleMaxPooling2dUint8Nhwc, SimpleMaxPooling2dUint8Test, armnn::DataLayout::NHWC)
170
171ARMNN_AUTO_TEST_CASE(SimpleAveragePooling2d, SimpleAveragePooling2dTest, armnn::DataLayout::NCHW)
172ARMNN_AUTO_TEST_CASE(SimpleAveragePooling2dNhwc, SimpleAveragePooling2dTest, armnn::DataLayout::NHWC)
173ARMNN_AUTO_TEST_CASE(SimpleAveragePooling2dUint8, SimpleAveragePooling2dUint8Test, armnn::DataLayout::NCHW)
174ARMNN_AUTO_TEST_CASE(SimpleAveragePooling2dUint8Nhwc, SimpleAveragePooling2dUint8Test, armnn::DataLayout::NHWC)
175
surmeh01bceff2f2018-03-29 16:29:27 +0100176ARMNN_AUTO_TEST_CASE(IgnorePaddingAveragePooling2dSize3x2Stride2x2,
177 IgnorePaddingAveragePooling2dSize3x2Stride2x2Test,
178 false)
179ARMNN_AUTO_TEST_CASE(IgnorePaddingAveragePooling2dSize3x2Stride2x2NoPadding,
180 IgnorePaddingAveragePooling2dSize3x2Stride2x2Test,
181 true)
telsoa014fcda012018-03-09 14:13:49 +0000182ARMNN_AUTO_TEST_CASE(LargeTensorsAveragePooling2d, LargeTensorsAveragePooling2dTest)
183ARMNN_AUTO_TEST_CASE(LargeTensorsAveragePooling2dUint8, LargeTensorsAveragePooling2dUint8Test)
184
James Conroy45a9b772018-10-31 11:47:53 +0000185ARMNN_AUTO_TEST_CASE(SimpleL2Pooling2d, SimpleL2Pooling2dTest, armnn::DataLayout::NCHW)
186ARMNN_AUTO_TEST_CASE(SimpleL2Pooling2dNhwc, SimpleL2Pooling2dTest, armnn::DataLayout::NHWC)
187ARMNN_AUTO_TEST_CASE(UNSUPPORTED_SimpleL2Pooling2dUint8, SimpleL2Pooling2dUint8Test, armnn::DataLayout::NCHW)
188
telsoa014fcda012018-03-09 14:13:49 +0000189ARMNN_AUTO_TEST_CASE(L2Pooling2dSize3Stride1, L2Pooling2dSize3Stride1Test)
190ARMNN_AUTO_TEST_CASE(UNSUPPORTED_L2Pooling2dSize3Stride1Uint8, L2Pooling2dSize3Stride1Uint8Test)
191ARMNN_AUTO_TEST_CASE(L2Pooling2dSize3Stride3, L2Pooling2dSize3Stride3Test)
192ARMNN_AUTO_TEST_CASE(UNSUPPORTED_L2Pooling2dSize3Stride3Uint8, L2Pooling2dSize3Stride3Uint8Test)
193ARMNN_AUTO_TEST_CASE(L2Pooling2dSize3Stride4, L2Pooling2dSize3Stride4Test)
194ARMNN_AUTO_TEST_CASE(UNSUPPORTED_L2Pooling2dSize3Stride4Uint8, L2Pooling2dSize3Stride4Uint8Test)
195ARMNN_AUTO_TEST_CASE(L2Pooling2dSize7, L2Pooling2dSize7Test)
196ARMNN_AUTO_TEST_CASE(UNSUPPORTED_L2Pooling2dSize7Uint8, L2Pooling2dSize7Uint8Test)
197ARMNN_AUTO_TEST_CASE(L2Pooling2dSize9, L2Pooling2dSize9Test)
198ARMNN_AUTO_TEST_CASE(UNSUPPORTED_L2Pooling2dSize9Uint8, L2Pooling2dSize9Uint8Test)
199
200// Add
201ARMNN_AUTO_TEST_CASE(SimpleAdd, AdditionTest)
202ARMNN_AUTO_TEST_CASE(AddBroadcast1Element, AdditionBroadcast1ElementTest)
David Beck4a8692c2018-09-07 16:19:24 +0100203ARMNN_AUTO_TEST_CASE(AddBroadcast, AdditionBroadcastTest)
204
205ARMNN_AUTO_TEST_CASE(AdditionUint8, AdditionUint8Test)
206ARMNN_AUTO_TEST_CASE(AddBroadcastUint8, AdditionBroadcastUint8Test)
207ARMNN_AUTO_TEST_CASE(AddBroadcast1ElementUint8, AdditionBroadcast1ElementUint8Test)
208
209// Sub
210ARMNN_AUTO_TEST_CASE(SimpleSub, SubtractionTest)
Mohamed Nour Abouelseoud3d93bc42018-11-21 10:35:17 +0000211ARMNN_AUTO_TEST_CASE(SubBroadcast1Element, SubtractionBroadcast1ElementTest)
212ARMNN_AUTO_TEST_CASE(SubBroadcast, SubtractionBroadcastTest)
213
214ARMNN_AUTO_TEST_CASE(SubtractionUint8, SubtractionUint8Test)
215ARMNN_AUTO_TEST_CASE(SubBroadcastUint8, SubtractionBroadcastUint8Test)
216ARMNN_AUTO_TEST_CASE(SubBroadcast1ElementUint8, SubtractionBroadcast1ElementUint8Test)
David Beck4a8692c2018-09-07 16:19:24 +0100217
Francis Murtaghe7a86a42018-08-29 12:42:10 +0100218// Div
219ARMNN_AUTO_TEST_CASE(SimpleDivision, DivisionTest)
David Beckbc392452018-09-10 14:47:28 +0100220ARMNN_AUTO_TEST_CASE(DivisionByZero, DivisionByZeroTest)
Francis Murtaghe7a86a42018-08-29 12:42:10 +0100221ARMNN_AUTO_TEST_CASE(DivisionBroadcast1Element, DivisionBroadcast1ElementTest)
222ARMNN_AUTO_TEST_CASE(DivisionBroadcast1DVector, DivisionBroadcast1DVectorTest)
David Beck5cd01f32018-09-12 16:00:08 +0100223// NOTE: quantized division is not supported by CL and not required by the
224// android NN api
Francis Murtaghe7a86a42018-08-29 12:42:10 +0100225
telsoa014fcda012018-03-09 14:13:49 +0000226// Mul
227ARMNN_AUTO_TEST_CASE(SimpleMultiplication, MultiplicationTest)
surmeh01bceff2f2018-03-29 16:29:27 +0100228ARMNN_AUTO_TEST_CASE(MultiplicationBroadcast1Element, MultiplicationBroadcast1ElementTest)
229ARMNN_AUTO_TEST_CASE(MultiplicationBroadcast1DVector, MultiplicationBroadcast1DVectorTest)
Matthew Benthame2ec3302018-10-01 11:32:48 +0100230ARMNN_AUTO_TEST_CASE(MultiplicationUint8, MultiplicationUint8Test)
231ARMNN_AUTO_TEST_CASE(MultiplicationBroadcast1ElementUint8, MultiplicationBroadcast1ElementUint8Test)
232ARMNN_AUTO_TEST_CASE(MultiplicationBroadcast1DVectorUint8, MultiplicationBroadcast1DVectorUint8Test)
telsoa014fcda012018-03-09 14:13:49 +0000233
234// Batch Norm
235ARMNN_AUTO_TEST_CASE(BatchNorm, BatchNormTest)
Nikhil Rajd1340932018-10-18 14:27:50 +0100236ARMNN_AUTO_TEST_CASE(BatchNormNhwc, BatchNormNhwcTest)
telsoa014fcda012018-03-09 14:13:49 +0000237
Matteo Martincigh539b44d2018-10-01 09:26:39 +0100238// L2 Normalization
jimfly013aab7c32018-11-12 13:32:08 +0000239ARMNN_AUTO_TEST_CASE(L2Normalization1d, L2Normalization1dTest, armnn::DataLayout::NCHW)
240ARMNN_AUTO_TEST_CASE(L2Normalization2d, L2Normalization2dTest, armnn::DataLayout::NCHW)
241ARMNN_AUTO_TEST_CASE(L2Normalization3d, L2Normalization3dTest, armnn::DataLayout::NCHW)
242ARMNN_AUTO_TEST_CASE(L2Normalization4d, L2Normalization4dTest, armnn::DataLayout::NCHW)
telsoa014fcda012018-03-09 14:13:49 +0000243
jimfly013aab7c32018-11-12 13:32:08 +0000244ARMNN_AUTO_TEST_CASE(L2Normalization1dNhwc, L2Normalization1dTest, armnn::DataLayout::NHWC)
245ARMNN_AUTO_TEST_CASE(L2Normalization2dNhwc, L2Normalization2dTest, armnn::DataLayout::NHWC)
246ARMNN_AUTO_TEST_CASE(L2Normalization3dNhwc, L2Normalization3dTest, armnn::DataLayout::NHWC)
247ARMNN_AUTO_TEST_CASE(L2Normalization4dNhwc, L2Normalization4dTest, armnn::DataLayout::NHWC)
Matteo Martincigh539b44d2018-10-01 09:26:39 +0100248
Ferran Balaguer05bf0542019-06-18 16:46:00 +0100249ARMNN_AUTO_TEST_CASE(L2NormalizationDefaultEpsilon, L2NormalizationDefaultEpsilonTest, armnn::DataLayout::NCHW)
250ARMNN_AUTO_TEST_CASE(L2NormalizationNonDefaultEpsilon, L2NormalizationNonDefaultEpsilonTest, armnn::DataLayout::NCHW)
251
James Conroy074f3712018-10-03 09:32:03 +0100252// Resize Bilinear - NCHW data layout
Ellen Norris-Thompsonc4223d12019-06-10 14:15:12 +0100253ARMNN_AUTO_TEST_CASE(SimpleResizeBilinear, SimpleResizeBilinearTest<armnn::DataType::Float32>, armnn::DataLayout::NCHW)
254ARMNN_AUTO_TEST_CASE(ResizeBilinearNop, ResizeBilinearNopTest<armnn::DataType::Float32>, armnn::DataLayout::NCHW)
255ARMNN_AUTO_TEST_CASE(ResizeBilinearSqMin, ResizeBilinearSqMinTest<armnn::DataType::Float32>, armnn::DataLayout::NCHW)
256ARMNN_AUTO_TEST_CASE(ResizeBilinearMin, ResizeBilinearMinTest<armnn::DataType::Float32>, armnn::DataLayout::NCHW)
257ARMNN_AUTO_TEST_CASE(ResizeBilinearMag, ResizeBilinearMagTest<armnn::DataType::Float32>, armnn::DataLayout::NCHW)
telsoa014fcda012018-03-09 14:13:49 +0000258
James Conroy074f3712018-10-03 09:32:03 +0100259// Resize Bilinear - NHWC data layout
Ellen Norris-Thompsonc4223d12019-06-10 14:15:12 +0100260ARMNN_AUTO_TEST_CASE(ResizeBilinearNopNhwc,
261 ResizeBilinearNopTest<armnn::DataType::Float32>,
262 armnn::DataLayout::NHWC)
263ARMNN_AUTO_TEST_CASE(SimpleResizeBilinearNhwc,
264 SimpleResizeBilinearTest<armnn::DataType::Float32>,
265 armnn::DataLayout::NHWC)
266ARMNN_AUTO_TEST_CASE(ResizeBilinearSqMinNhwc,
267 ResizeBilinearSqMinTest<armnn::DataType::Float32>,
268 armnn::DataLayout::NHWC)
269ARMNN_AUTO_TEST_CASE(ResizeBilinearMinNhwc,
270 ResizeBilinearMinTest<armnn::DataType::Float32>,
271 armnn::DataLayout::NHWC)
272ARMNN_AUTO_TEST_CASE(ResizeBilinearMagNhwc,
273 ResizeBilinearMagTest<armnn::DataType::Float32>,
274 armnn::DataLayout::NHWC)
James Conroy074f3712018-10-03 09:32:03 +0100275
telsoa014fcda012018-03-09 14:13:49 +0000276// Constant
277ARMNN_AUTO_TEST_CASE(Constant, ConstantTest)
Nina Drozd58ef2c62019-05-16 12:09:18 +0100278ARMNN_AUTO_TEST_CASE(ConstantUint8, ConstantUint8SimpleQuantizationScaleNoOffsetTest)
telsoa014fcda012018-03-09 14:13:49 +0000279
280// Concat
281ARMNN_AUTO_TEST_CASE(Concatenation1d, Concatenation1dTest)
narpra0163b08822018-11-20 11:29:12 +0000282ARMNN_AUTO_TEST_CASE(Concatenation1dUint8, Concatenation1dUint8Test)
telsoa014fcda012018-03-09 14:13:49 +0000283
284ARMNN_AUTO_TEST_CASE(Concatenation2dDim0, Concatenation2dDim0Test)
narpra0163b08822018-11-20 11:29:12 +0000285ARMNN_AUTO_TEST_CASE(Concatenation2dDim0Uint8, Concatenation2dDim0Uint8Test)
telsoa014fcda012018-03-09 14:13:49 +0000286ARMNN_AUTO_TEST_CASE(Concatenation2dDim1, Concatenation2dDim1Test)
narpra0163b08822018-11-20 11:29:12 +0000287ARMNN_AUTO_TEST_CASE(Concatenation2dDim1Uint8, Concatenation2dDim1Uint8Test)
288
telsoa014fcda012018-03-09 14:13:49 +0000289ARMNN_AUTO_TEST_CASE(Concatenation2dDim0DiffInputDims, Concatenation2dDim0DiffInputDimsTest)
narpra0163b08822018-11-20 11:29:12 +0000290ARMNN_AUTO_TEST_CASE(Concatenation2dDim0DiffInputDimsUint8, Concatenation2dDim0DiffInputDimsUint8Test)
telsoa014fcda012018-03-09 14:13:49 +0000291ARMNN_AUTO_TEST_CASE(Concatenation2dDim1DiffInputDims, Concatenation2dDim1DiffInputDimsTest)
narpra0163b08822018-11-20 11:29:12 +0000292ARMNN_AUTO_TEST_CASE(Concatenation2dDim1DiffInputDimsUint8, Concatenation2dDim1DiffInputDimsUint8Test)
telsoa014fcda012018-03-09 14:13:49 +0000293
294ARMNN_AUTO_TEST_CASE(Concatenation3dDim0, Concatenation3dDim0Test)
narpra0163b08822018-11-20 11:29:12 +0000295ARMNN_AUTO_TEST_CASE(Concatenation3dDim0Uint8, Concatenation3dDim0Uint8Test)
telsoa014fcda012018-03-09 14:13:49 +0000296ARMNN_AUTO_TEST_CASE(Concatenation3dDim1, Concatenation3dDim1Test)
narpra0163b08822018-11-20 11:29:12 +0000297ARMNN_AUTO_TEST_CASE(Concatenation3dDim1Uint8, Concatenation3dDim1Uint8Test)
narpra015cdda352018-11-19 15:30:27 +0000298ARMNN_AUTO_TEST_CASE(Concatenation3dDim2, Concatenation3dDim2Test, false)
narpra0163b08822018-11-20 11:29:12 +0000299ARMNN_AUTO_TEST_CASE(Concatenation3dDim2Uint8, Concatenation3dDim2Uint8Test, false)
300
telsoa014fcda012018-03-09 14:13:49 +0000301ARMNN_AUTO_TEST_CASE(Concatenation3dDim0DiffInputDims, Concatenation3dDim0DiffInputDimsTest)
narpra0163b08822018-11-20 11:29:12 +0000302ARMNN_AUTO_TEST_CASE(Concatenation3dDim0DiffInputDimsUint8, Concatenation3dDim0DiffInputDimsUint8Test)
telsoa014fcda012018-03-09 14:13:49 +0000303ARMNN_AUTO_TEST_CASE(Concatenation3dDim1DiffInputDims, Concatenation3dDim1DiffInputDimsTest)
narpra0163b08822018-11-20 11:29:12 +0000304ARMNN_AUTO_TEST_CASE(Concatenation3dDim1DiffInputDimsUint8, Concatenation3dDim1DiffInputDimsUint8Test)
narpra015cdda352018-11-19 15:30:27 +0000305ARMNN_AUTO_TEST_CASE(Concatenation3dDim2DiffInputDims, Concatenation3dDim2DiffInputDimsTest, false)
narpra0163b08822018-11-20 11:29:12 +0000306ARMNN_AUTO_TEST_CASE(Concatenation3dDim2DiffInputDimsUint8, Concatenation3dDim2DiffInputDimsUint8Test, false)
narpra015cdda352018-11-19 15:30:27 +0000307
308ARMNN_AUTO_TEST_CASE(Concatenation4dDim0, Concatenation4dDim0Test)
309ARMNN_AUTO_TEST_CASE(Concatenation4dDim1, Concatenation4dDim1Test)
310ARMNN_AUTO_TEST_CASE(Concatenation4dDim3, Concatenation4dDim3Test, false)
narpra0163b08822018-11-20 11:29:12 +0000311ARMNN_AUTO_TEST_CASE(Concatenation4dDim0Uint8, Concatenation4dDim0Uint8Test)
312ARMNN_AUTO_TEST_CASE(Concatenation4dDim1Uint8, Concatenation4dDim1Uint8Test)
313ARMNN_AUTO_TEST_CASE(Concatenation4dDim3Uint8, Concatenation4dDim3Uint8Test, false)
314
narpra015cdda352018-11-19 15:30:27 +0000315ARMNN_AUTO_TEST_CASE(Concatenation4dDiffShapeDim0, Concatenation4dDiffShapeDim0Test)
316ARMNN_AUTO_TEST_CASE(Concatenation4dDiffShapeDim1, Concatenation4dDiffShapeDim1Test)
317ARMNN_AUTO_TEST_CASE(Concatenation4dDiffShapeDim3, Concatenation4dDiffShapeDim3Test, false)
narpra0163b08822018-11-20 11:29:12 +0000318ARMNN_AUTO_TEST_CASE(Concatenation4dDiffShapeDim0Uint8, Concatenation4dDiffShapeDim0Uint8Test)
319ARMNN_AUTO_TEST_CASE(Concatenation4dDiffShapeDim1Uint8, Concatenation4dDiffShapeDim1Uint8Test)
320ARMNN_AUTO_TEST_CASE(Concatenation4dDiffShapeDim3Uint8, Concatenation4dDiffShapeDim3Uint8Test, false)
telsoa014fcda012018-03-09 14:13:49 +0000321
322// Floor
James Conroy83735b12019-05-30 16:36:59 +0100323ARMNN_AUTO_TEST_CASE(SimpleFloor, SimpleFloorTest<armnn::DataType::Float32>)
telsoa014fcda012018-03-09 14:13:49 +0000324
325// Reshape
Nina Drozd8ed4b8c2019-05-29 10:41:04 +0100326ARMNN_AUTO_TEST_CASE(SimpleReshapeFloat32, SimpleReshapeTest<armnn::DataType::Float32>)
327ARMNN_AUTO_TEST_CASE(SimpleReshapeUint8, SimpleReshapeTest<armnn::DataType::QuantisedAsymm8>)
telsoa014fcda012018-03-09 14:13:49 +0000328
Mohamed Nour Abouelseoud7420e552018-10-12 12:26:24 +0100329// Pad
Mohamed Nour Abouelseouddd6acea2018-10-18 12:26:19 +0100330ARMNN_AUTO_TEST_CASE(PadFloat322d, PadFloat322dTest)
331ARMNN_AUTO_TEST_CASE(PadFloat323d, PadFloat323dTest)
332ARMNN_AUTO_TEST_CASE(PadFloat324d, PadFloat324dTest)
Mohamed Nour Abouelseoud7420e552018-10-12 12:26:24 +0100333
Nikhil Raj91e4c6d2019-07-05 12:22:58 +0100334// PReLU
335ARMNN_AUTO_TEST_CASE(PreluFloat32, PreluTest<armnn::DataType::Float32>)
336ARMNN_AUTO_TEST_CASE(PreluUint8, PreluTest<armnn::DataType::QuantisedAsymm8>)
337
telsoa014fcda012018-03-09 14:13:49 +0000338// Permute
339ARMNN_AUTO_TEST_CASE(SimplePermuteFloat32, SimplePermuteFloat32Test)
340ARMNN_AUTO_TEST_CASE(SimplePermuteUint8, SimplePermuteUint8Test)
surmeh01bceff2f2018-03-29 16:29:27 +0100341ARMNN_AUTO_TEST_CASE(PermuteFloat32ValueSet1, PermuteFloat32ValueSet1Test)
342ARMNN_AUTO_TEST_CASE(PermuteFloat32ValueSet2, PermuteFloat32ValueSet2Test)
343ARMNN_AUTO_TEST_CASE(PermuteFloat32ValueSet3, PermuteFloat32ValueSet3Test)
telsoa014fcda012018-03-09 14:13:49 +0000344
telsoa01c577f2c2018-08-31 09:22:23 +0100345// Lstm
346ARMNN_AUTO_TEST_CASE(LstmLayerFloat32WithCifgWithPeepholeNoProjection,
Les Bellde9011b2018-10-03 10:37:52 +0100347 LstmLayerFloat32WithCifgWithPeepholeNoProjectionTest)
telsoa01c577f2c2018-08-31 09:22:23 +0100348ARMNN_AUTO_TEST_CASE(LstmLayerFloat32NoCifgNoPeepholeNoProjection,
349 LstmLayerFloat32NoCifgNoPeepholeNoProjectionTest)
350ARMNN_AUTO_TEST_CASE(LstmLayerFloat32NoCifgWithPeepholeWithProjection,
Les Bellde9011b2018-10-03 10:37:52 +0100351 LstmLayerFloat32NoCifgWithPeepholeWithProjectionTest)
telsoa01c577f2c2018-08-31 09:22:23 +0100352
353// Convert from Float16 to Float32
354ARMNN_AUTO_TEST_CASE(SimpleConvertFp16ToFp32, SimpleConvertFp16ToFp32Test)
355// Convert from Float32 to Float16
356ARMNN_AUTO_TEST_CASE(SimpleConvertFp32ToFp16, SimpleConvertFp32ToFp16Test)
357
Éanna Ó Catháin47c1ddb2018-10-12 14:24:13 +0100358ARMNN_AUTO_TEST_CASE(AdditionAfterMaxPool, AdditionAfterMaxPoolTest)
359
keidav01a959ee52018-12-19 10:04:58 +0000360//Max
361ARMNN_AUTO_TEST_CASE(MaximumSimple, MaximumSimpleTest)
362ARMNN_AUTO_TEST_CASE(MaximumBroadcast1Element, MaximumBroadcast1ElementTest)
363ARMNN_AUTO_TEST_CASE(MaximumBroadcast1DVector, MaximumBroadcast1DVectorTest)
364ARMNN_AUTO_TEST_CASE(MaximumUint8, MaximumUint8Test)
365ARMNN_AUTO_TEST_CASE(MaximumBroadcast1ElementUint8, MaximumBroadcast1ElementUint8Test)
366ARMNN_AUTO_TEST_CASE(MaximumBroadcast1DVectorUint8, MaximumBroadcast1DVectorUint8Test)
367
Matteo Martincigh28dcab62018-10-19 16:40:03 +0100368// Mean
James Conroy4d1ff582019-06-10 17:06:39 +0100369ARMNN_AUTO_TEST_CASE(MeanSimpleFloat32, MeanSimpleTest<armnn::DataType::Float32>)
370ARMNN_AUTO_TEST_CASE(MeanSimpleAxisFloat32, MeanSimpleAxisTest<armnn::DataType::Float32>)
371ARMNN_AUTO_TEST_CASE(MeanKeepDimsFloat32, MeanKeepDimsTest<armnn::DataType::Float32>)
372ARMNN_AUTO_TEST_CASE(MeanMultipleDimsFloat32, MeanMultipleDimsTest<armnn::DataType::Float32>)
373ARMNN_AUTO_TEST_CASE(MeanVts1Float32, MeanVts1Test<armnn::DataType::Float32>)
374ARMNN_AUTO_TEST_CASE(MeanVts2Float32, MeanVts2Test<armnn::DataType::Float32>)
375ARMNN_AUTO_TEST_CASE(MeanVts3Float32, MeanVts3Test<armnn::DataType::Float32>)
Matteo Martincigh28dcab62018-10-19 16:40:03 +0100376
James Conroy4d1ff582019-06-10 17:06:39 +0100377ARMNN_AUTO_TEST_CASE(MeanSimpleQuantisedAsymm8, MeanSimpleTest<armnn::DataType::QuantisedAsymm8>)
378ARMNN_AUTO_TEST_CASE(MeanSimpleAxisQuantisedAsymm8, MeanSimpleAxisTest<armnn::DataType::QuantisedAsymm8>)
379ARMNN_AUTO_TEST_CASE(MeanKeepDimsQuantisedAsymm8, MeanKeepDimsTest<armnn::DataType::QuantisedAsymm8>)
380ARMNN_AUTO_TEST_CASE(MeanMultipleDimsQuantisedAsymm8, MeanMultipleDimsTest<armnn::DataType::QuantisedAsymm8>)
381ARMNN_AUTO_TEST_CASE(MeanVts1QuantisedAsymm8, MeanVts1Test<armnn::DataType::QuantisedAsymm8>)
382ARMNN_AUTO_TEST_CASE(MeanVts2QuantisedAsymm8, MeanVts2Test<armnn::DataType::QuantisedAsymm8>)
383ARMNN_AUTO_TEST_CASE(MeanVts3QuantisedAsymm8, MeanVts3Test<armnn::DataType::QuantisedAsymm8>)
Matteo Martincigh28dcab62018-10-19 16:40:03 +0100384
saoste019292aa32019-01-08 13:55:59 +0000385// Minimum
386ARMNN_AUTO_TEST_CASE(MinimumBroadcast1Element1, MinimumBroadcast1ElementTest1)
387ARMNN_AUTO_TEST_CASE(MinimumBroadcast1Element2, MinimumBroadcast1ElementTest2)
388ARMNN_AUTO_TEST_CASE(MinimumBroadcast1DVectorUint8, MinimumBroadcast1DVectorUint8Test)
389
Nattapat Chaimanowongc6a41ff2019-01-29 09:56:02 +0000390// Greater
391ARMNN_AUTO_TEST_CASE(SimpleGreater, GreaterSimpleTest)
392ARMNN_AUTO_TEST_CASE(GreaterBroadcast1Element, GreaterBroadcast1ElementTest)
393ARMNN_AUTO_TEST_CASE(GreaterBroadcast1DVector, GreaterBroadcast1DVectorTest)
394ARMNN_AUTO_TEST_CASE(GreaterUint8, GreaterUint8Test)
395ARMNN_AUTO_TEST_CASE(GreaterBroadcast1ElementUint8, GreaterBroadcast1ElementUint8Test)
396ARMNN_AUTO_TEST_CASE(GreaterBroadcast1DVectorUint8, GreaterBroadcast1DVectorUint8Test)
397
Narumol Prangnawarat65d30962019-03-14 11:55:03 +0000398// Softmax
399ARMNN_AUTO_TEST_CASE(SimpleSoftmaxBeta1, SimpleSoftmaxTest, 1.0f)
400ARMNN_AUTO_TEST_CASE(SimpleSoftmaxBeta2, SimpleSoftmaxTest, 2.0f)
401ARMNN_AUTO_TEST_CASE(SimpleSoftmaxBeta1Uint8, SimpleSoftmaxUint8Test, 1.0f)
402ARMNN_AUTO_TEST_CASE(SimpleSoftmaxBeta2Uint8, SimpleSoftmaxUint8Test, 2.0f)
403
404ARMNN_AUTO_TEST_CASE(Simple3dSoftmax, Simple3dSoftmaxTest, 1.0f)
405ARMNN_AUTO_TEST_CASE(Simple3dSoftmaxUint8, Simple3dSoftmaxUint8Test, 1.0f)
406
407ARMNN_AUTO_TEST_CASE(Simple4dSoftmax, Simple4dSoftmaxTest, 1.0f)
408ARMNN_AUTO_TEST_CASE(Simple4dSoftmaxUint8, Simple4dSoftmaxUint8Test, 1.0f)
409
410ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareSoftmaxBeta1WithReference, CompareSoftmaxTest, 1.0f)
411ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareSoftmaxBeta2WithReference, CompareSoftmaxTest, 2.0f)
412ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareSoftmaxUint8, CompareSoftmaxUint8Test, 1.0f)
413
Sadik Armaganf4464322018-12-20 16:19:12 +0000414// Space To Batch Nd
415ARMNN_AUTO_TEST_CASE(SpaceToBatchNdSimpleFloat32, SpaceToBatchNdSimpleFloat32Test)
416ARMNN_AUTO_TEST_CASE(SpaceToBatchNdMultiChannelsFloat32, SpaceToBatchNdMultiChannelsFloat32Test)
417ARMNN_AUTO_TEST_CASE(SpaceToBatchNdMultiBlockFloat32, SpaceToBatchNdMultiBlockFloat32Test)
418ARMNN_AUTO_TEST_CASE(SpaceToBatchNdPaddingFloat32, SpaceToBatchNdPaddingFloat32Test)
419
420ARMNN_AUTO_TEST_CASE(SpaceToBatchNdSimpleUint8, SpaceToBatchNdSimpleUint8Test)
421ARMNN_AUTO_TEST_CASE(SpaceToBatchNdMultiChannelsUint8, SpaceToBatchNdMultiChannelsUint8Test)
422ARMNN_AUTO_TEST_CASE(SpaceToBatchNdMultiBlockUint8, SpaceToBatchNdMultiBlockUint8Test)
423ARMNN_AUTO_TEST_CASE(SpaceToBatchNdPaddingUint8, SpaceToBatchNdPaddingUint8Test)
424
425ARMNN_AUTO_TEST_CASE(SpaceToBatchNdSimpleNHWCFloat32, SpaceToBatchNdSimpleNHWCFloat32Test)
426ARMNN_AUTO_TEST_CASE(SpaceToBatchNdMultiChannelsNHWCFloat32, SpaceToBatchNdMultiChannelsNHWCFloat32Test)
427ARMNN_AUTO_TEST_CASE(SpaceToBatchNdMultiBlockNHWCFloat32, SpaceToBatchNdMultiBlockNHWCFloat32Test)
428ARMNN_AUTO_TEST_CASE(SpaceToBatchNdPaddingNHWCFloat32, SpaceToBatchNdPaddingNHWCFloat32Test)
429
430ARMNN_AUTO_TEST_CASE(SpaceToBatchNdSimpleNHWCUint8, SpaceToBatchNdSimpleNHWCUint8Test)
431ARMNN_AUTO_TEST_CASE(SpaceToBatchNdMultiChannelsNHWCUint8, SpaceToBatchNdMultiChannelsNHWCUint8Test)
432ARMNN_AUTO_TEST_CASE(SpaceToBatchNdMultiBlockNHWCUint8, SpaceToBatchNdMultiBlockNHWCUint8Test)
433ARMNN_AUTO_TEST_CASE(SpaceToBatchNdPaddingNHWCUint8, SpaceToBatchNdPaddingNHWCUint8Test)
434
James Conroyd2aa85e2019-07-01 17:12:40 +0100435// Space To Depth
436ARMNN_AUTO_TEST_CASE(SpaceToDepthNCHWAsymmQ8, SpaceToDepthNCHWAsymmQ8Test)
437ARMNN_AUTO_TEST_CASE(SpaceToDepthNHWCAsymmQ8, SpaceToDepthNHWCAsymmQ8Test)
438
439ARMNN_AUTO_TEST_CASE(SpaceToDepthNHWC1Float32, SpaceToDepthNHWCFloat32Test1)
440ARMNN_AUTO_TEST_CASE(SpaceToDepthNCHW1Float32, SpaceToDepthNCHWFloat32Test1)
441
442ARMNN_AUTO_TEST_CASE(SpaceToDepthNHWC2Float32, SpaceToDepthNHWCFloat32Test2)
443ARMNN_AUTO_TEST_CASE(SpaceToDepthNCHW2Float32, SpaceToDepthNCHWFloat32Test2)
444
445ARMNN_AUTO_TEST_CASE(SpaceToDepthNHWCQSymm16, SpaceToDepthNHWCQSymm16Test)
446ARMNN_AUTO_TEST_CASE(SpaceToDepthNCHWQSymm16, SpaceToDepthNCHWQSymm16Test)
447
keidav01d74dc912018-12-10 18:16:07 +0000448// Strided Slice
449ARMNN_AUTO_TEST_CASE(StridedSlice4DFloat32, StridedSlice4DFloat32Test)
450ARMNN_AUTO_TEST_CASE(StridedSlice4DReverseFloat32, StridedSlice4DReverseFloat32Test)
451ARMNN_AUTO_TEST_CASE(StridedSliceSimpleStrideFloat32, StridedSliceSimpleStrideFloat32Test)
452ARMNN_AUTO_TEST_CASE(StridedSliceSimpleRangeMaskFloat32, StridedSliceSimpleRangeMaskFloat32Test)
453ARMNN_AUTO_TEST_CASE(StridedSliceShrinkAxisMaskFloat32, StridedSliceShrinkAxisMaskFloat32Test)
454ARMNN_AUTO_TEST_CASE(StridedSlice3DFloat32, StridedSlice3DFloat32Test)
455ARMNN_AUTO_TEST_CASE(StridedSlice3DReverseFloat32, StridedSlice3DReverseFloat32Test)
456ARMNN_AUTO_TEST_CASE(StridedSlice2DFloat32, StridedSlice2DFloat32Test)
457ARMNN_AUTO_TEST_CASE(StridedSlice2DReverseFloat32, StridedSlice2DReverseFloat32Test)
458
459ARMNN_AUTO_TEST_CASE(StridedSlice4DUint8, StridedSlice4DUint8Test)
460ARMNN_AUTO_TEST_CASE(StridedSlice4DReverseUint8, StridedSlice4DReverseUint8Test)
461ARMNN_AUTO_TEST_CASE(StridedSliceSimpleStrideUint8, StridedSliceSimpleStrideUint8Test)
462ARMNN_AUTO_TEST_CASE(StridedSliceSimpleRangeMaskUint8, StridedSliceSimpleRangeMaskUint8Test)
463ARMNN_AUTO_TEST_CASE(StridedSliceShrinkAxisMaskUint8, StridedSliceShrinkAxisMaskUint8Test)
464ARMNN_AUTO_TEST_CASE(StridedSlice3DUint8, StridedSlice3DUint8Test)
465ARMNN_AUTO_TEST_CASE(StridedSlice3DReverseUint8, StridedSlice3DReverseUint8Test)
466ARMNN_AUTO_TEST_CASE(StridedSlice2DUint8, StridedSlice2DUint8Test)
467ARMNN_AUTO_TEST_CASE(StridedSlice2DReverseUint8, StridedSlice2DReverseUint8Test)
468
Sadik Armagan20ec2492019-05-31 09:09:44 +0100469// Quantize
470ARMNN_AUTO_TEST_CASE(QuantizeSimpleUint8, QuantizeSimpleUint8Test)
471ARMNN_AUTO_TEST_CASE(QuantizeClampUint8, QuantizeClampUint8Test)
472
Jim Flynn983daec2019-05-29 16:20:16 +0100473// Dequantize
474// NOTE: current clframework (46a49a0a8206f0efa7afd514940e180a88ffd732)
475// CLDequantizationLayerKernel accepts DataType::QASYMM8 input
476// and can output DataType::F16 or DataType::F32
477ARMNN_AUTO_TEST_CASE(DequantizeSimpleUint8, DequantizeSimpleUint8Test)
478ARMNN_AUTO_TEST_CASE(DequantizeOffsetUint8, DequantizeOffsetUint8Test)
479
Aron Virginas-Tar7a3e2fe2019-06-27 18:54:47 +0100480// TransposeConvolution2d
481ARMNN_AUTO_TEST_CASE(SimpleTransposeConvolution2dFloatNchw, SimpleTransposeConvolution2dFloatNchwTest)
482ARMNN_AUTO_TEST_CASE(SimpleTransposeConvolution2dFloatNhwc, SimpleTransposeConvolution2dFloatNhwcTest)
483ARMNN_AUTO_TEST_CASE(SimpleTransposeConvolution2dUint8Nchw, SimpleTransposeConvolution2dUint8NchwTest)
484ARMNN_AUTO_TEST_CASE(SimpleTransposeConvolution2dUint8Nhwc, SimpleTransposeConvolution2dUint8NhwcTest)
485
486ARMNN_AUTO_TEST_CASE(UnbiasedSimpleTransposeConvolution2dFloatNchw, UnbiasedSimpleTransposeConvolution2dFloatNchwTest)
487ARMNN_AUTO_TEST_CASE(UnbiasedSimpleTransposeConvolution2dFloatNhwc, UnbiasedSimpleTransposeConvolution2dFloatNhwcTest)
488ARMNN_AUTO_TEST_CASE(UnbiasedSimpleTransposeConvolution2dUint8Nchw, UnbiasedSimpleTransposeConvolution2dUint8NchwTest)
489ARMNN_AUTO_TEST_CASE(UnbiasedSimpleTransposeConvolution2dUint8Nhwc, UnbiasedSimpleTransposeConvolution2dUint8NhwcTest)
490
491ARMNN_AUTO_TEST_CASE(PaddedTransposeConvolution2dFloatNchw, PaddedTransposeConvolution2dFloatNchwTest)
492ARMNN_AUTO_TEST_CASE(PaddedTransposeConvolution2dFloatNhwc, PaddedTransposeConvolution2dFloatNhwcTest)
493ARMNN_AUTO_TEST_CASE(PaddedTransposeConvolution2dUint8Nchw, PaddedTransposeConvolution2dUint8NchwTest)
494ARMNN_AUTO_TEST_CASE(PaddedTransposeConvolution2dUint8Nhwc, PaddedTransposeConvolution2dUint8NhwcTest)
495
496ARMNN_AUTO_TEST_CASE(UnbiasedPaddedTransposeConvolution2dFloatNchw, UnbiasedPaddedTransposeConvolution2dFloatNchwTest)
497ARMNN_AUTO_TEST_CASE(UnbiasedPaddedTransposeConvolution2dFloatNhwc, UnbiasedPaddedTransposeConvolution2dFloatNhwcTest)
498ARMNN_AUTO_TEST_CASE(UnbiasedPaddedTransposeConvolution2dUint8Nchw, UnbiasedPaddedTransposeConvolution2dUint8NchwTest)
499ARMNN_AUTO_TEST_CASE(UnbiasedPaddedTransposeConvolution2dUint8Nhwc, UnbiasedPaddedTransposeConvolution2dUint8NhwcTest)
500
501ARMNN_AUTO_TEST_CASE(StridedTransposeConvolution2dFloatNhwc, StridedTransposeConvolution2dFloatNhwcTest)
502ARMNN_AUTO_TEST_CASE(StridedTransposeConvolution2dFloatNchw, StridedTransposeConvolution2dFloatNchwTest)
503ARMNN_AUTO_TEST_CASE(StridedTransposeConvolution2dUint8Nhwc, StridedTransposeConvolution2dUint8NhwcTest)
504ARMNN_AUTO_TEST_CASE(StridedTransposeConvolution2dUint8Nchw, StridedTransposeConvolution2dUint8NchwTest)
505
506ARMNN_AUTO_TEST_CASE(UnbiasedStridedTransposeConvolution2dFloatNhwc, UnbiasedStridedTransposeConvolution2dFloatNhwcTest)
507ARMNN_AUTO_TEST_CASE(UnbiasedStridedTransposeConvolution2dFloatNchw, UnbiasedStridedTransposeConvolution2dFloatNchwTest)
508ARMNN_AUTO_TEST_CASE(UnbiasedStridedTransposeConvolution2dUint8Nhwc, UnbiasedStridedTransposeConvolution2dUint8NhwcTest)
509ARMNN_AUTO_TEST_CASE(UnbiasedStridedTransposeConvolution2dUint8Nchw, UnbiasedStridedTransposeConvolution2dUint8NchwTest)
510
telsoa014fcda012018-03-09 14:13:49 +0000511// ============================================================================
512// COMPARE tests
513
514ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareConv2dWithReference, CompareConvolution2dTest)
515
jimfly017af00da2018-10-31 14:43:53 +0000516ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareDepthwiseConv2dWithReferenceFloat32,
Nattapat Chaimanowong649dd952019-01-22 16:10:44 +0000517 CompareDepthwiseConvolution2dFloatTest,
jimfly017af00da2018-10-31 14:43:53 +0000518 armnn::DataLayout::NCHW)
519ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareDepthwiseConv2dWithReferenceUint8,
Nattapat Chaimanowong649dd952019-01-22 16:10:44 +0000520 CompareDepthwiseConvolution2dUint8Test,
jimfly017af00da2018-10-31 14:43:53 +0000521 armnn::DataLayout::NCHW)
522
523ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareDepthwiseConv2dWithReferenceFloat32Nhwc,
Nattapat Chaimanowong649dd952019-01-22 16:10:44 +0000524 CompareDepthwiseConvolution2dFloatTest,
jimfly017af00da2018-10-31 14:43:53 +0000525 armnn::DataLayout::NHWC)
526ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareDepthwiseConv2dWithReferenceUint8Nhwc,
Nattapat Chaimanowong649dd952019-01-22 16:10:44 +0000527 CompareDepthwiseConvolution2dUint8Test,
jimfly017af00da2018-10-31 14:43:53 +0000528 armnn::DataLayout::NHWC)
telsoa014fcda012018-03-09 14:13:49 +0000529
530ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareNormalizationWithinWithReference, CompareNormalizationTest,
531 armnn::NormalizationAlgorithmChannel::Within,
532 armnn::NormalizationAlgorithmMethod::LocalBrightness)
533ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareNormalizationAcrossWithReference, CompareNormalizationTest,
534 armnn::NormalizationAlgorithmChannel::Across,
535 armnn::NormalizationAlgorithmMethod::LocalBrightness)
536
telsoa014fcda012018-03-09 14:13:49 +0000537ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareMaxPooling2dWithRef, ComparePooling2dTest, armnn::PoolingAlgorithm::Max)
538
539ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareAveragePooling2dWithRef, ComparePooling2dTest, armnn::PoolingAlgorithm::Average)
540ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareAveragePooling2dWithRefUint8, ComparePooling2dUint8Test,
541 armnn::PoolingAlgorithm::Average)
542
543ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareL2Pooling2dWithRef, ComparePooling2dTest, armnn::PoolingAlgorithm::L2)
544
545ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareAddition, CompareAdditionTest)
546
547ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareMultiplicationWithRef, CompareMultiplicationTest)
548
549ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareBatchNorm, CompareBatchNormTest)
550
551ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareReLu1, CompareBoundedReLuTest, 1.0f, -1.0f)
552ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareReLu6, CompareBoundedReLuTest, 6.0f, 0.0f)
553
554// ============================================================================
555// FIXTURE tests
556
557ARMNN_COMPARE_REF_FIXTURE_TEST_CASE(CompareSigmoidActivationWithReference, ActivationFixture,
558 CompareActivationTest, armnn::ActivationFunction::Sigmoid, 5u)
559
560ARMNN_COMPARE_REF_FIXTURE_TEST_CASE(CompareTanhActivationWithReference, ActivationFixture,
561 CompareActivationTest, armnn::ActivationFunction::TanH, 5u)
562
563ARMNN_COMPARE_REF_FIXTURE_TEST_CASE(CompareLinearActivationWithReference, ActivationFixture,
564 CompareActivationTest, armnn::ActivationFunction::Linear, 5u)
565
566ARMNN_COMPARE_REF_FIXTURE_TEST_CASE(CompareReLuActivationWithReference, ActivationFixture,
567 CompareActivationTest, armnn::ActivationFunction::ReLu, 5u)
568
569ARMNN_COMPARE_REF_FIXTURE_TEST_CASE(CompareBoundedReLuActivationWithReference, ActivationFixture,
570 CompareActivationTest, armnn::ActivationFunction::BoundedReLu, 5u)
571ARMNN_COMPARE_REF_FIXTURE_TEST_CASE(CompareBoundedReLuActivationWithReferenceUint8, ActivationFixture,
572 CompareActivationUint8Test, armnn::ActivationFunction::BoundedReLu)
573
574ARMNN_COMPARE_REF_FIXTURE_TEST_CASE(CompareSoftReLuActivationWithReference, ActivationFixture,
575 CompareActivationTest, armnn::ActivationFunction::SoftReLu, 5u)
576
577ARMNN_COMPARE_REF_FIXTURE_TEST_CASE(CompareLeakyReLuActivationWithReference, ActivationFixture,
578 CompareActivationTest, armnn::ActivationFunction::LeakyReLu, 5u)
579
580ARMNN_COMPARE_REF_FIXTURE_TEST_CASE(CompareAbsActivationWithReference, ActivationFixture,
581 CompareActivationTest, armnn::ActivationFunction::Abs, 5u)
582
583ARMNN_COMPARE_REF_FIXTURE_TEST_CASE(CompareSqrtActivationWithReference, PositiveActivationFixture,
584 CompareActivationTest, armnn::ActivationFunction::Sqrt, 5u)
585
586ARMNN_COMPARE_REF_FIXTURE_TEST_CASE(CompareSquareActivationWithReference, ActivationFixture,
587 CompareActivationTest, armnn::ActivationFunction::Square, 5u)
588
589BOOST_AUTO_TEST_SUITE_END()