blob: 4f1a84dfad8a66e8b8714dd664f93e0fc2ef6f00 [file] [log] [blame]
telsoa014fcda012018-03-09 14:13:49 +00001//
2// Copyright © 2017 Arm Ltd. All rights reserved.
David Beckecb56cd2018-09-05 12:52:57 +01003// SPDX-License-Identifier: MIT
telsoa014fcda012018-03-09 14:13:49 +00004//
5#include <boost/test/unit_test.hpp>
telsoa014fcda012018-03-09 14:13:49 +00006#include "test/TensorHelpers.hpp"
7#include "LayerTests.hpp"
8
David Beckb4540be2018-09-24 13:18:27 +01009#include <backends/CpuTensorHandle.hpp>
David Beckac42efd2018-09-26 17:41:13 +010010#include <backends/cl/ClWorkloadFactory.hpp>
11#include <backends/cl/workloads/ClWorkloadUtils.hpp>
David Beckb4540be2018-09-24 13:18:27 +010012#include <backends/reference/RefWorkloadFactory.hpp>
David Beckac42efd2018-09-26 17:41:13 +010013#include <backends/cl/ClLayerSupport.hpp>
telsoa014fcda012018-03-09 14:13:49 +000014#include "ActivationFixture.hpp"
telsoa01c577f2c2018-08-31 09:22:23 +010015#include "ClContextControlFixture.hpp"
telsoa014fcda012018-03-09 14:13:49 +000016
17#include <arm_compute/core/CL/CLKernelLibrary.h>
18#include <arm_compute/runtime/CL/CLScheduler.h>
19#include <string>
20#include <iostream>
21
22#include "test/UnitTests.hpp"
23
telsoa01c577f2c2018-08-31 09:22:23 +010024BOOST_FIXTURE_TEST_SUITE(Compute_ArmComputeCl, ClContextControlFixture)
telsoa014fcda012018-03-09 14:13:49 +000025using FactoryType = armnn::ClWorkloadFactory;
26
27// ============================================================================
28// UNIT tests
29
30// Activation
31ARMNN_AUTO_TEST_CASE(ConstantLinearActivation, ConstantLinearActivationTest)
32
33ARMNN_AUTO_TEST_CASE(SimpleSoftmaxBeta1, SimpleSoftmaxTest, 1.0f)
34ARMNN_AUTO_TEST_CASE(SimpleSoftmaxBeta2, SimpleSoftmaxTest, 2.0f)
35ARMNN_AUTO_TEST_CASE(SimpleSoftmaxBeta1Uint8, SimpleSoftmaxUint8Test, 1.0f)
36ARMNN_AUTO_TEST_CASE(SimpleSoftmaxBeta2Uint8, SimpleSoftmaxUint8Test, 2.0f)
37
38ARMNN_AUTO_TEST_CASE(ReLu1Uint8, BoundedReLuUint8UpperAndLowerBoundTest)
39ARMNN_AUTO_TEST_CASE(ReLu6Uint8, BoundedReLuUint8UpperBoundOnlyTest)
40
41// Fully Connected
42ARMNN_AUTO_TEST_CASE(SimpleFullyConnected, FullyConnectedFloat32Test, false, false)
43ARMNN_AUTO_TEST_CASE(SimpleFullyConnectedWithBias, FullyConnectedFloat32Test, true, false)
44ARMNN_AUTO_TEST_CASE(SimpleFullyConnectedWithTranspose, FullyConnectedFloat32Test, false, true)
Matthew Benthamab8cdc12018-09-17 11:17:41 +010045ARMNN_AUTO_TEST_CASE(FullyConnectedUint8, FullyConnectedUint8Test, false)
46ARMNN_AUTO_TEST_CASE(FullyConnectedBiasedUint8, FullyConnectedUint8Test, true)
telsoa014fcda012018-03-09 14:13:49 +000047
48ARMNN_AUTO_TEST_CASE(FullyConnectedLarge, FullyConnectedLargeTest, false)
49ARMNN_AUTO_TEST_CASE(FullyConnectedLargeTransposed, FullyConnectedLargeTest, true)
50
51// Convolution
52ARMNN_AUTO_TEST_CASE(SimpleConvolution1d, Convolution1dTest, true)
53
54ARMNN_AUTO_TEST_CASE(SimpleConvolution2d, SimpleConvolution2d3x5Test, true)
55ARMNN_AUTO_TEST_CASE(SimpleConvolution2dSquare, SimpleConvolution2d3x3Test, true)
56ARMNN_AUTO_TEST_CASE(SimpleConvolution2d3x3Uint8, SimpleConvolution2d3x3Uint8Test, true)
57ARMNN_AUTO_TEST_CASE(UnbiasedConvolution2d, SimpleConvolution2d3x5Test, false)
58ARMNN_AUTO_TEST_CASE(UnbiasedConvolution2dSquare, SimpleConvolution2d3x3Test, false)
59ARMNN_AUTO_TEST_CASE(SimpleConvolution2dAsymmetricPadding, Convolution2dAsymmetricPaddingTest)
60
61// Depthwise Convolution
62ARMNN_AUTO_TEST_CASE(DepthwiseConvolution2dDepthMul1, DepthwiseConvolution2dDepthMul1Test, true)
63ARMNN_AUTO_TEST_CASE(UnbiasedDepthwiseConvolution2dDepthMul1, DepthwiseConvolution2dDepthMul1Test, false)
64ARMNN_AUTO_TEST_CASE(DepthwiseConvolution2dDepthMul1Uint8, DepthwiseConvolution2dDepthMul1Uint8Test, true)
65ARMNN_AUTO_TEST_CASE(UnbiasedDepthwiseConvolution2dDepthMul1Uint8, DepthwiseConvolution2dDepthMul1Uint8Test, false)
66
surmeh013537c2c2018-05-18 16:31:43 +010067ARMNN_AUTO_TEST_CASE(DepthwiseConvolution2dAsymmetric, DepthwiseConvolution2dAsymmetricTest, true)
68ARMNN_AUTO_TEST_CASE(UnbiasedDepthwiseConvolution2dAsymmetric, DepthwiseConvolution2dAsymmetricTest, false)
69
telsoa01c577f2c2018-08-31 09:22:23 +010070// Softmax
71BOOST_AUTO_TEST_CASE(Softmax4dSupport)
telsoa014fcda012018-03-09 14:13:49 +000072{
telsoa01c577f2c2018-08-31 09:22:23 +010073 const unsigned int numDimensions = 4u;
74 std::array<unsigned int, numDimensions> dimensionSizes;
75 dimensionSizes.fill(1u);
76
77 const armnn::TensorInfo inputInfo(numDimensions, &dimensionSizes.front(), armnn::DataType::Float32);
78 const armnn::TensorInfo outputInfo(numDimensions, &dimensionSizes.front(), armnn::DataType::Float32);
79
80 // 4D Softmax should be reported as unsupported on the CL backend
81 BOOST_TEST(!armnn::IsSoftmaxSupportedCl(inputInfo, outputInfo, armnn::SoftmaxDescriptor()));
telsoa014fcda012018-03-09 14:13:49 +000082}
83
telsoa01c577f2c2018-08-31 09:22:23 +010084// Splitter
85ARMNN_AUTO_TEST_CASE(SimpleSplitter, SplitterTest)
86ARMNN_AUTO_TEST_CASE(SimpleSplitterUint8, SplitterUint8Test)
telsoa014fcda012018-03-09 14:13:49 +000087
88ARMNN_AUTO_TEST_CASE(CopyViaSplitter, CopyViaSplitterTest)
89ARMNN_AUTO_TEST_CASE(CopyViaSplitterUint8, CopyViaSplitterUint8Test)
90
91// Merger
92ARMNN_AUTO_TEST_CASE(SimpleMerger, MergerTest)
93ARMNN_AUTO_TEST_CASE(MergerUint8, MergerUint8Test)
94
95// Pooling
96ARMNN_AUTO_TEST_CASE(SimpleMaxPooling2dSize3x3Stride2x4, SimpleMaxPooling2dSize3x3Stride2x4Test, true)
97ARMNN_AUTO_TEST_CASE(SimpleMaxPooling2dSize3x3Stride2x4Uint8, SimpleMaxPooling2dSize3x3Stride2x4Uint8Test, true)
98
99ARMNN_AUTO_TEST_CASE(IgnorePaddingSimpleMaxPooling2d, IgnorePaddingSimpleMaxPooling2dTest)
100ARMNN_AUTO_TEST_CASE(IgnorePaddingSimpleMaxPooling2dUint8, IgnorePaddingSimpleMaxPooling2dUint8Test)
101ARMNN_AUTO_TEST_CASE(IgnorePaddingMaxPooling2dSize3, IgnorePaddingMaxPooling2dSize3Test)
102ARMNN_AUTO_TEST_CASE(IgnorePaddingMaxPooling2dSize3Uint8, IgnorePaddingMaxPooling2dSize3Uint8Test)
103
104ARMNN_AUTO_TEST_CASE(IgnorePaddingSimpleAveragePooling2d, IgnorePaddingSimpleAveragePooling2dTest)
105ARMNN_AUTO_TEST_CASE(IgnorePaddingSimpleAveragePooling2dUint8, IgnorePaddingSimpleAveragePooling2dUint8Test)
106ARMNN_AUTO_TEST_CASE(IgnorePaddingSimpleAveragePooling2dNoPadding, IgnorePaddingSimpleAveragePooling2dNoPaddingTest)
107ARMNN_AUTO_TEST_CASE(IgnorePaddingSimpleAveragePooling2dNoPaddingUint8,
surmeh01bceff2f2018-03-29 16:29:27 +0100108 IgnorePaddingSimpleAveragePooling2dNoPaddingUint8Test)
telsoa014fcda012018-03-09 14:13:49 +0000109ARMNN_AUTO_TEST_CASE(IgnorePaddingAveragePooling2dSize3, IgnorePaddingAveragePooling2dSize3Test)
110ARMNN_AUTO_TEST_CASE(IgnorePaddingAveragePooling2dSize3Uint8, IgnorePaddingAveragePooling2dSize3Uint8Test)
111
112ARMNN_AUTO_TEST_CASE(IgnorePaddingSimpleL2Pooling2d, IgnorePaddingSimpleL2Pooling2dTest)
113ARMNN_AUTO_TEST_CASE(UNSUPPORTED_IgnorePaddingSimpleL2Pooling2dUint8, IgnorePaddingSimpleL2Pooling2dUint8Test)
114ARMNN_AUTO_TEST_CASE(IgnorePaddingL2Pooling2dSize3, IgnorePaddingL2Pooling2dSize3Test)
115ARMNN_AUTO_TEST_CASE(UNSUPPORTED_IgnorePaddingL2Pooling2dSize3Uint8, IgnorePaddingL2Pooling2dSize3Uint8Test)
116
117ARMNN_AUTO_TEST_CASE(SimpleAveragePooling2d, SimpleAveragePooling2dTest)
118ARMNN_AUTO_TEST_CASE(SimpleAveragePooling2dUint8, SimpleAveragePooling2dUint8Test)
surmeh01bceff2f2018-03-29 16:29:27 +0100119ARMNN_AUTO_TEST_CASE(IgnorePaddingAveragePooling2dSize3x2Stride2x2,
120 IgnorePaddingAveragePooling2dSize3x2Stride2x2Test,
121 false)
122ARMNN_AUTO_TEST_CASE(IgnorePaddingAveragePooling2dSize3x2Stride2x2NoPadding,
123 IgnorePaddingAveragePooling2dSize3x2Stride2x2Test,
124 true)
telsoa014fcda012018-03-09 14:13:49 +0000125ARMNN_AUTO_TEST_CASE(LargeTensorsAveragePooling2d, LargeTensorsAveragePooling2dTest)
126ARMNN_AUTO_TEST_CASE(LargeTensorsAveragePooling2dUint8, LargeTensorsAveragePooling2dUint8Test)
127
128ARMNN_AUTO_TEST_CASE(SimpleL2Pooling2d, SimpleL2Pooling2dTest)
129ARMNN_AUTO_TEST_CASE(UNSUPPORTED_SimpleL2Pooling2dUint8, SimpleL2Pooling2dUint8Test)
130ARMNN_AUTO_TEST_CASE(L2Pooling2dSize3Stride1, L2Pooling2dSize3Stride1Test)
131ARMNN_AUTO_TEST_CASE(UNSUPPORTED_L2Pooling2dSize3Stride1Uint8, L2Pooling2dSize3Stride1Uint8Test)
132ARMNN_AUTO_TEST_CASE(L2Pooling2dSize3Stride3, L2Pooling2dSize3Stride3Test)
133ARMNN_AUTO_TEST_CASE(UNSUPPORTED_L2Pooling2dSize3Stride3Uint8, L2Pooling2dSize3Stride3Uint8Test)
134ARMNN_AUTO_TEST_CASE(L2Pooling2dSize3Stride4, L2Pooling2dSize3Stride4Test)
135ARMNN_AUTO_TEST_CASE(UNSUPPORTED_L2Pooling2dSize3Stride4Uint8, L2Pooling2dSize3Stride4Uint8Test)
136ARMNN_AUTO_TEST_CASE(L2Pooling2dSize7, L2Pooling2dSize7Test)
137ARMNN_AUTO_TEST_CASE(UNSUPPORTED_L2Pooling2dSize7Uint8, L2Pooling2dSize7Uint8Test)
138ARMNN_AUTO_TEST_CASE(L2Pooling2dSize9, L2Pooling2dSize9Test)
139ARMNN_AUTO_TEST_CASE(UNSUPPORTED_L2Pooling2dSize9Uint8, L2Pooling2dSize9Uint8Test)
140
141// Add
142ARMNN_AUTO_TEST_CASE(SimpleAdd, AdditionTest)
143ARMNN_AUTO_TEST_CASE(AddBroadcast1Element, AdditionBroadcast1ElementTest)
David Beck4a8692c2018-09-07 16:19:24 +0100144ARMNN_AUTO_TEST_CASE(AddBroadcast, AdditionBroadcastTest)
145
146ARMNN_AUTO_TEST_CASE(AdditionUint8, AdditionUint8Test)
147ARMNN_AUTO_TEST_CASE(AddBroadcastUint8, AdditionBroadcastUint8Test)
148ARMNN_AUTO_TEST_CASE(AddBroadcast1ElementUint8, AdditionBroadcast1ElementUint8Test)
149
150// Sub
151ARMNN_AUTO_TEST_CASE(SimpleSub, SubtractionTest)
152
Francis Murtaghe7a86a42018-08-29 12:42:10 +0100153// Div
154ARMNN_AUTO_TEST_CASE(SimpleDivision, DivisionTest)
David Beckbc392452018-09-10 14:47:28 +0100155ARMNN_AUTO_TEST_CASE(DivisionByZero, DivisionByZeroTest)
Francis Murtaghe7a86a42018-08-29 12:42:10 +0100156ARMNN_AUTO_TEST_CASE(DivisionBroadcast1Element, DivisionBroadcast1ElementTest)
157ARMNN_AUTO_TEST_CASE(DivisionBroadcast1DVector, DivisionBroadcast1DVectorTest)
David Beck5cd01f32018-09-12 16:00:08 +0100158// NOTE: quantized division is not supported by CL and not required by the
159// android NN api
Francis Murtaghe7a86a42018-08-29 12:42:10 +0100160
telsoa014fcda012018-03-09 14:13:49 +0000161// Mul
162ARMNN_AUTO_TEST_CASE(SimpleMultiplication, MultiplicationTest)
surmeh01bceff2f2018-03-29 16:29:27 +0100163ARMNN_AUTO_TEST_CASE(MultiplicationBroadcast1Element, MultiplicationBroadcast1ElementTest)
164ARMNN_AUTO_TEST_CASE(MultiplicationBroadcast1DVector, MultiplicationBroadcast1DVectorTest)
telsoa014fcda012018-03-09 14:13:49 +0000165
166// Batch Norm
167ARMNN_AUTO_TEST_CASE(BatchNorm, BatchNormTest)
168
169ARMNN_AUTO_TEST_CASE(L2Normalization1d, L2Normalization1dTest)
170ARMNN_AUTO_TEST_CASE(L2Normalization2d, L2Normalization2dTest)
171ARMNN_AUTO_TEST_CASE(L2Normalization3d, L2Normalization3dTest)
172ARMNN_AUTO_TEST_CASE(L2Normalization4d, L2Normalization4dTest)
173
174// Resize Bilinear
175ARMNN_AUTO_TEST_CASE(SimpleResizeBilinear, SimpleResizeBilinearTest)
176ARMNN_AUTO_TEST_CASE(ResizeBilinearNop, ResizeBilinearNopTest)
177ARMNN_AUTO_TEST_CASE(ResizeBilinearSqMin, ResizeBilinearSqMinTest)
178ARMNN_AUTO_TEST_CASE(ResizeBilinearMin, ResizeBilinearMinTest)
179ARMNN_AUTO_TEST_CASE(ResizeBilinearMag, ResizeBilinearMagTest)
180
181// Constant
182ARMNN_AUTO_TEST_CASE(Constant, ConstantTest)
183ARMNN_AUTO_TEST_CASE(ConstantUint8, ConstantTestUint8)
184
185// Concat
186ARMNN_AUTO_TEST_CASE(Concatenation1d, Concatenation1dTest)
187ARMNN_AUTO_TEST_CASE(Concatenation1dUint8, Concatenation1dUint8Test)
188
189ARMNN_AUTO_TEST_CASE(Concatenation2dDim0, Concatenation2dDim0Test)
190ARMNN_AUTO_TEST_CASE(Concatenation2dDim0Uint8, Concatenation2dDim0Uint8Test)
191ARMNN_AUTO_TEST_CASE(Concatenation2dDim1, Concatenation2dDim1Test)
192ARMNN_AUTO_TEST_CASE(Concatenation2dDim1Uint8, Concatenation2dDim1Uint8Test)
193
194ARMNN_AUTO_TEST_CASE(Concatenation2dDim0DiffInputDims, Concatenation2dDim0DiffInputDimsTest)
195ARMNN_AUTO_TEST_CASE(Concatenation2dDim0DiffInputDimsUint8, Concatenation2dDim0DiffInputDimsUint8Test)
196ARMNN_AUTO_TEST_CASE(Concatenation2dDim1DiffInputDims, Concatenation2dDim1DiffInputDimsTest)
197ARMNN_AUTO_TEST_CASE(Concatenation2dDim1DiffInputDimsUint8, Concatenation2dDim1DiffInputDimsUint8Test)
198
199ARMNN_AUTO_TEST_CASE(Concatenation3dDim0, Concatenation3dDim0Test)
200ARMNN_AUTO_TEST_CASE(Concatenation3dDim0Uint8, Concatenation3dDim0Uint8Test)
201ARMNN_AUTO_TEST_CASE(Concatenation3dDim1, Concatenation3dDim1Test)
202ARMNN_AUTO_TEST_CASE(Concatenation3dDim1Uint8, Concatenation3dDim1Uint8Test)
203ARMNN_AUTO_TEST_CASE(Concatenation3dDim2, Concatenation3dDim2Test)
204ARMNN_AUTO_TEST_CASE(Concatenation3dDim2Uint8, Concatenation3dDim2Uint8Test)
205
206ARMNN_AUTO_TEST_CASE(Concatenation3dDim0DiffInputDims, Concatenation3dDim0DiffInputDimsTest)
207ARMNN_AUTO_TEST_CASE(Concatenation3dDim0DiffInputDimsUint8, Concatenation3dDim0DiffInputDimsUint8Test)
208ARMNN_AUTO_TEST_CASE(Concatenation3dDim1DiffInputDims, Concatenation3dDim1DiffInputDimsTest)
209ARMNN_AUTO_TEST_CASE(Concatenation3dDim1DiffInputDimsUint8, Concatenation3dDim1DiffInputDimsUint8Test)
210ARMNN_AUTO_TEST_CASE(Concatenation3dDim2DiffInputDims, Concatenation3dDim2DiffInputDimsTest)
211ARMNN_AUTO_TEST_CASE(Concatenation3dDim2DiffInputDimsUint8, Concatenation3dDim2DiffInputDimsUint8Test)
212
213// Floor
214ARMNN_AUTO_TEST_CASE(SimpleFloor, SimpleFloorTest)
215
216// Reshape
217ARMNN_AUTO_TEST_CASE(SimpleReshapeFloat32, SimpleReshapeFloat32Test)
218ARMNN_AUTO_TEST_CASE(SimpleReshapeUint8, SimpleReshapeUint8Test)
219
220// Permute
221ARMNN_AUTO_TEST_CASE(SimplePermuteFloat32, SimplePermuteFloat32Test)
222ARMNN_AUTO_TEST_CASE(SimplePermuteUint8, SimplePermuteUint8Test)
surmeh01bceff2f2018-03-29 16:29:27 +0100223ARMNN_AUTO_TEST_CASE(PermuteFloat32ValueSet1, PermuteFloat32ValueSet1Test)
224ARMNN_AUTO_TEST_CASE(PermuteFloat32ValueSet2, PermuteFloat32ValueSet2Test)
225ARMNN_AUTO_TEST_CASE(PermuteFloat32ValueSet3, PermuteFloat32ValueSet3Test)
telsoa014fcda012018-03-09 14:13:49 +0000226
telsoa01c577f2c2018-08-31 09:22:23 +0100227// Lstm
228ARMNN_AUTO_TEST_CASE(LstmLayerFloat32WithCifgWithPeepholeNoProjection,
229 LstmLayerFloat32WithCifgWithPeepholeNoProjectionTest)
230ARMNN_AUTO_TEST_CASE(LstmLayerFloat32NoCifgNoPeepholeNoProjection,
231 LstmLayerFloat32NoCifgNoPeepholeNoProjectionTest)
232ARMNN_AUTO_TEST_CASE(LstmLayerFloat32NoCifgWithPeepholeWithProjection,
233 LstmLayerFloat32NoCifgWithPeepholeWithProjectionTest)
234
235// Convert from Float16 to Float32
236ARMNN_AUTO_TEST_CASE(SimpleConvertFp16ToFp32, SimpleConvertFp16ToFp32Test)
237// Convert from Float32 to Float16
238ARMNN_AUTO_TEST_CASE(SimpleConvertFp32ToFp16, SimpleConvertFp32ToFp16Test)
239
telsoa014fcda012018-03-09 14:13:49 +0000240// ============================================================================
241// COMPARE tests
242
243ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareConv2dWithReference, CompareConvolution2dTest)
244
245ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareDepthwiseConv2dWithReferenceFloat32, CompareDepthwiseConvolution2dTest<float>)
246ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareDepthwiseConv2dWithReferenceUint8, CompareDepthwiseConvolution2dTest<uint8_t>)
247
248ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareNormalizationWithinWithReference, CompareNormalizationTest,
249 armnn::NormalizationAlgorithmChannel::Within,
250 armnn::NormalizationAlgorithmMethod::LocalBrightness)
251ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareNormalizationAcrossWithReference, CompareNormalizationTest,
252 armnn::NormalizationAlgorithmChannel::Across,
253 armnn::NormalizationAlgorithmMethod::LocalBrightness)
254
255ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareSoftmaxBeta1WithReference, CompareSoftmaxTest, 1.0f)
256ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareSoftmaxBeta2WithReference, CompareSoftmaxTest, 2.0f)
257ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareSoftmaxUint8, CompareSoftmaxUint8Test, 1.0f)
258
259ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareMaxPooling2dWithRef, ComparePooling2dTest, armnn::PoolingAlgorithm::Max)
260
261ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareAveragePooling2dWithRef, ComparePooling2dTest, armnn::PoolingAlgorithm::Average)
262ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareAveragePooling2dWithRefUint8, ComparePooling2dUint8Test,
263 armnn::PoolingAlgorithm::Average)
264
265ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareL2Pooling2dWithRef, ComparePooling2dTest, armnn::PoolingAlgorithm::L2)
266
267ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareAddition, CompareAdditionTest)
268
269ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareMultiplicationWithRef, CompareMultiplicationTest)
270
271ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareBatchNorm, CompareBatchNormTest)
272
273ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareReLu1, CompareBoundedReLuTest, 1.0f, -1.0f)
274ARMNN_COMPARE_REF_AUTO_TEST_CASE(CompareReLu6, CompareBoundedReLuTest, 6.0f, 0.0f)
275
276// ============================================================================
277// FIXTURE tests
278
279ARMNN_COMPARE_REF_FIXTURE_TEST_CASE(CompareSigmoidActivationWithReference, ActivationFixture,
280 CompareActivationTest, armnn::ActivationFunction::Sigmoid, 5u)
281
282ARMNN_COMPARE_REF_FIXTURE_TEST_CASE(CompareTanhActivationWithReference, ActivationFixture,
283 CompareActivationTest, armnn::ActivationFunction::TanH, 5u)
284
285ARMNN_COMPARE_REF_FIXTURE_TEST_CASE(CompareLinearActivationWithReference, ActivationFixture,
286 CompareActivationTest, armnn::ActivationFunction::Linear, 5u)
287
288ARMNN_COMPARE_REF_FIXTURE_TEST_CASE(CompareReLuActivationWithReference, ActivationFixture,
289 CompareActivationTest, armnn::ActivationFunction::ReLu, 5u)
290
291ARMNN_COMPARE_REF_FIXTURE_TEST_CASE(CompareBoundedReLuActivationWithReference, ActivationFixture,
292 CompareActivationTest, armnn::ActivationFunction::BoundedReLu, 5u)
293ARMNN_COMPARE_REF_FIXTURE_TEST_CASE(CompareBoundedReLuActivationWithReferenceUint8, ActivationFixture,
294 CompareActivationUint8Test, armnn::ActivationFunction::BoundedReLu)
295
296ARMNN_COMPARE_REF_FIXTURE_TEST_CASE(CompareSoftReLuActivationWithReference, ActivationFixture,
297 CompareActivationTest, armnn::ActivationFunction::SoftReLu, 5u)
298
299ARMNN_COMPARE_REF_FIXTURE_TEST_CASE(CompareLeakyReLuActivationWithReference, ActivationFixture,
300 CompareActivationTest, armnn::ActivationFunction::LeakyReLu, 5u)
301
302ARMNN_COMPARE_REF_FIXTURE_TEST_CASE(CompareAbsActivationWithReference, ActivationFixture,
303 CompareActivationTest, armnn::ActivationFunction::Abs, 5u)
304
305ARMNN_COMPARE_REF_FIXTURE_TEST_CASE(CompareSqrtActivationWithReference, PositiveActivationFixture,
306 CompareActivationTest, armnn::ActivationFunction::Sqrt, 5u)
307
308ARMNN_COMPARE_REF_FIXTURE_TEST_CASE(CompareSquareActivationWithReference, ActivationFixture,
309 CompareActivationTest, armnn::ActivationFunction::Square, 5u)
310
311BOOST_AUTO_TEST_SUITE_END()