blob: 38256eb2ad25af99c57c18f35b2c711c9c221d6f [file] [log] [blame]
Pablo Tellof5f34bb2017-08-22 13:34:13 +01001/*
Luca Foschianifedefc32020-02-17 17:02:49 +00002 * Copyright (c) 2017-2020 ARM Limited.
Pablo Tellof5f34bb2017-08-22 13:34:13 +01003 *
4 * SPDX-License-Identifier: MIT
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to
8 * deal in the Software without restriction, including without limitation the
9 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10 * sell copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in all
14 * copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 * SOFTWARE.
23 */
24#include "arm_compute/core/Types.h"
Michele Di Giorgioed5a4922018-09-13 16:22:01 +010025#include "arm_compute/core/utils/misc/ShapeCalculator.h"
Pablo Tellof5f34bb2017-08-22 13:34:13 +010026#include "arm_compute/runtime/NEON/functions/NEDeconvolutionLayer.h"
27#include "arm_compute/runtime/Tensor.h"
28#include "arm_compute/runtime/TensorAllocator.h"
29#include "tests/NEON/Accessor.h"
30#include "tests/PaddingCalculator.h"
31#include "tests/datasets/ShapeDatasets.h"
32#include "tests/framework/Asserts.h"
33#include "tests/framework/Macros.h"
34#include "tests/framework/datasets/Datasets.h"
35#include "tests/validation/Validation.h"
36#include "tests/validation/fixtures/DeconvolutionLayerFixture.h"
37
38namespace arm_compute
39{
40namespace test
41{
42namespace validation
43{
44namespace
45{
Luca Foschianifedefc32020-02-17 17:02:49 +000046constexpr AbsoluteTolerance<float> tolerance_fp32(0.001f); /**< Tolerance for floating point tests */
47constexpr AbsoluteTolerance<float> tolerance_quantized(1.0f); /**< Tolerance value for comparing reference's output against implementation's output for quantized data types */
Manuel Bottinif391fff2019-05-15 13:01:26 +010048#ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC
Manuel Bottinic1b76fa2019-06-17 12:04:40 +010049const RelativeTolerance<half_float::half> tolerance_fp16(half_float::half(0.2f)); /**< Relative tolerance value for comparing reference's output against implementation's output for DataType::F16 */
50#endif /* __ARM_FEATURE_FP16_VECTOR_ARITHMETIC*/
51constexpr float tolerance_num = 0.07f; /**< Tolerance number */
Pablo Tellof5f34bb2017-08-22 13:34:13 +010052
Georgios Pinitasced7a8d2018-02-01 16:31:33 +000053const auto data4x4 = datasets::SmallDeconvolutionShapes() * framework::dataset::make("StrideX", 1, 4) * framework::dataset::make("StrideY", 1, 4) * framework::dataset::make("PadX", 0, 3)
giuros01a69a88b2019-01-31 16:29:19 +000054 * framework::dataset::make("PadY", 0, 3) * framework::dataset::make("NumKernels", { 3 });
Georgios Pinitasced7a8d2018-02-01 16:31:33 +000055
Michalis Spyrou780db4e2017-11-23 09:49:51 +000056const auto data3x3 = datasets::SmallDeconvolutionShapes() * framework::dataset::make("StrideX", 1, 4) * framework::dataset::make("StrideY", 1, 4) * framework::dataset::make("PadX", 0, 2)
giuros01a69a88b2019-01-31 16:29:19 +000057 * framework::dataset::make("PadY", 0, 2) * framework::dataset::make("NumKernels", { 3 });
Pablo Tellof5f34bb2017-08-22 13:34:13 +010058
Matthew Jacksonb9070a42019-08-22 16:13:27 +010059const auto data3x3_asymm = datasets::SmallDeconvolutionShapes() * framework::dataset::make("StrideX", 1, 2) * framework::dataset::make("StrideY", 1, 2) * framework::dataset::make("PadLeft", 0, 1)
60 * framework::dataset::make("PadRight", 0, 1) * framework::dataset::make("PadTop", 0, 1) * framework::dataset::make("PadBottom", 0, 1) * framework::dataset::make("NumKernels", { 3 });
61
Michalis Spyrou064add62018-11-01 18:14:27 +000062const auto data3x3_precommit = datasets::SmallDeconvolutionShapes() * framework::dataset::make("StrideX", 1, 2) * framework::dataset::make("StrideY", 1, 2) * framework::dataset::make("PadX", 0, 2)
giuros01a69a88b2019-01-31 16:29:19 +000063 * framework::dataset::make("PadY", 0, 2) * framework::dataset::make("NumKernels", { 3 });
Michalis Spyrou064add62018-11-01 18:14:27 +000064
Michalis Spyrou780db4e2017-11-23 09:49:51 +000065const auto data1x1 = datasets::SmallDeconvolutionShapes() * framework::dataset::make("StrideX", 1, 4) * framework::dataset::make("StrideY", 1, 4) * framework::dataset::make("PadX", 0, 1)
giuros01a69a88b2019-01-31 16:29:19 +000066 * framework::dataset::make("PadY", 0, 1) * framework::dataset::make("NumKernels", { 3 });
Pablo Tellof5f34bb2017-08-22 13:34:13 +010067
Manuel Bottinid25af672019-07-10 17:06:12 +010068const auto data_layouts_dataset = framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC });
Manuel Bottini9f0d5ec2019-08-19 13:31:38 +010069
70const auto add_bias_dataset = framework::dataset::make("AddBias", { true, false });
Michele Di Giorgiof29d1b72019-10-29 10:58:13 +000071
72const auto input_qinfo_dataset = framework::dataset::make("InputQInfo",
73{
74 QuantizationInfo(1.f / 255.f, 0),
75 QuantizationInfo(2.f, 0),
76});
77
78const auto output_qinfo_dataset = framework::dataset::make("OutputQInfo",
79{
80 QuantizationInfo(3.f / 255.f, 0),
81 QuantizationInfo(4.f, 0),
82});
Pablo Tellof5f34bb2017-08-22 13:34:13 +010083} // namespace
84
85TEST_SUITE(NEON)
86TEST_SUITE(DeconvolutionLayer)
87
Alex Gilday27c08ab2018-02-22 11:36:16 +000088// *INDENT-OFF*
89// clang-format off
Manuel Bottinic1b76fa2019-06-17 12:04:40 +010090DATA_TEST_CASE(Validate, framework::DatasetMode::ALL, zip(zip(zip(zip(zip(
Vidhya Sudhan Loganathan7485d5a2018-07-04 09:34:00 +010091 framework::dataset::make("InputInfo", { TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), // Mismatching data type
92 TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), // Invalid weights shape
93 TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F16), // Non supported data type
94 TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), // Invalid bias shape
95 TensorInfo(TensorShape(13U, 11U, 4U, 3U), 1, DataType::F32), // Window shrink
96 TensorInfo(TensorShape(32U, 16U, 2U), 1, DataType::F32),
Alex Gilday27c08ab2018-02-22 11:36:16 +000097 }),
Vidhya Sudhan Loganathan7485d5a2018-07-04 09:34:00 +010098 framework::dataset::make("WeightsInfo", { TensorInfo(TensorShape(3U, 3U, 2U, 2U), 1, DataType::F16),
99 TensorInfo(TensorShape(3U, 3U, 2U, 4U), 1, DataType::F32),
100 TensorInfo(TensorShape(3U, 3U, 2U, 2U), 1, DataType::F16),
101 TensorInfo(TensorShape(3U, 2U, 2U, 2U), 1, DataType::F32),
102 TensorInfo(TensorShape(3U, 3U, 4U), 1, DataType::F32),
103 TensorInfo(TensorShape(1U, 1U, 2U, 4U), 1, DataType::F32),
Alex Gilday27c08ab2018-02-22 11:36:16 +0000104 })),
Vidhya Sudhan Loganathan7485d5a2018-07-04 09:34:00 +0100105 framework::dataset::make("BiasInfo", { TensorInfo(TensorShape(1U), 1, DataType::F16),
106 TensorInfo(TensorShape(1U), 1, DataType::F32),
107 TensorInfo(TensorShape(1U), 1, DataType::F32),
108 TensorInfo(TensorShape(25U, 11U), 1, DataType::F32),
109 TensorInfo(TensorShape(1U), 1, DataType::F32),
110 TensorInfo(TensorShape(4U), 1, DataType::F32),
Alex Gilday27c08ab2018-02-22 11:36:16 +0000111 })),
Vidhya Sudhan Loganathan7485d5a2018-07-04 09:34:00 +0100112 framework::dataset::make("OutputInfo",{ TensorInfo(TensorShape(25U, 11U, 2U), 1, DataType::F16),
113 TensorInfo(TensorShape(25U, 10U, 2U), 1, DataType::F32),
114 TensorInfo(TensorShape(25U, 11U, 2U), 1, DataType::F32),
115 TensorInfo(TensorShape(13U, 13U, 2U), 1, DataType::F32),
116 TensorInfo(TensorShape(11U, 9U, 1U, 3U), 1, DataType::F32),
117 TensorInfo(TensorShape(32U, 16U, 4U), 1, DataType::F32),
Alex Gilday27c08ab2018-02-22 11:36:16 +0000118 })),
119 framework::dataset::make("PadStrideInfo", { PadStrideInfo(1, 1, 0, 0),
120 PadStrideInfo(1, 1, 0, 0),
121 PadStrideInfo(1, 1, 0, 0),
122 PadStrideInfo(1, 1, 0, 0),
123 PadStrideInfo(1, 1, 1, 1),
124 PadStrideInfo(1, 1, 0, 0),
125 })),
Alex Gilday27c08ab2018-02-22 11:36:16 +0000126 framework::dataset::make("Expected", { false, false, false, false, false, true })),
Manuel Bottinic1b76fa2019-06-17 12:04:40 +0100127 input_info, weights_info, bias_info, output_info, pad_info, expected)
Alex Gilday27c08ab2018-02-22 11:36:16 +0000128{
Manuel Bottinic1b76fa2019-06-17 12:04:40 +0100129 bool is_valid = bool(NEDeconvolutionLayer::validate(&input_info.clone()->set_is_resizable(false), &weights_info.clone()->set_is_resizable(false), &bias_info.clone()->set_is_resizable(false), &output_info.clone()->set_is_resizable(false), pad_info));
Alex Gilday27c08ab2018-02-22 11:36:16 +0000130 ARM_COMPUTE_EXPECT(is_valid == expected, framework::LogLevel::ERRORS);
131}
132// clang-format on
133// *INDENT-ON*
134
Pablo Tellof5f34bb2017-08-22 13:34:13 +0100135template <typename T>
Michele Di Giorgiof29d1b72019-10-29 10:58:13 +0000136using NEDeconvolutionLayerFixture4x4 = DeconvolutionValidationFixture<Tensor, Accessor, NEDeconvolutionLayer, T, 4, 4>;
Georgios Pinitasced7a8d2018-02-01 16:31:33 +0000137
138template <typename T>
Michele Di Giorgiof29d1b72019-10-29 10:58:13 +0000139using NEDeconvolutionLayerFixture3x3 = DeconvolutionValidationFixture<Tensor, Accessor, NEDeconvolutionLayer, T, 3, 3>;
Pablo Tellof5f34bb2017-08-22 13:34:13 +0100140
141template <typename T>
Matthew Jacksonb9070a42019-08-22 16:13:27 +0100142using NEDeconvolutionLayerAsymmFixture3x3 = DeconvolutionValidationAsymmFixture<Tensor, Accessor, NEDeconvolutionLayer, T, 3, 3>;
143
144template <typename T>
Michele Di Giorgiof29d1b72019-10-29 10:58:13 +0000145using NEDeconvolutionLayerFixture1x1 = DeconvolutionValidationFixture<Tensor, Accessor, NEDeconvolutionLayer, T, 1, 1>;
Pablo Tellof5f34bb2017-08-22 13:34:13 +0100146
147TEST_SUITE(Float)
Pablo Tellof5f34bb2017-08-22 13:34:13 +0100148TEST_SUITE(FP32)
Georgios Pinitasced7a8d2018-02-01 16:31:33 +0000149TEST_SUITE(W4x4)
Manuel Bottini9f0d5ec2019-08-19 13:31:38 +0100150FIXTURE_DATA_TEST_CASE(Run, NEDeconvolutionLayerFixture4x4<float>, framework::DatasetMode::NIGHTLY, combine(combine(combine(data4x4, framework::dataset::make("DataType", DataType::F32)),
151 data_layouts_dataset),
152 add_bias_dataset))
Georgios Pinitasced7a8d2018-02-01 16:31:33 +0000153{
154 // Validate output
155 validate(Accessor(_target), _reference, tolerance_fp32);
156}
Michalis Spyrou064add62018-11-01 18:14:27 +0000157TEST_SUITE_END() // W4x4
Pablo Tellof5f34bb2017-08-22 13:34:13 +0100158TEST_SUITE(W3x3)
Manuel Bottini9f0d5ec2019-08-19 13:31:38 +0100159FIXTURE_DATA_TEST_CASE(RunSmall, NEDeconvolutionLayerFixture3x3<float>, framework::DatasetMode::PRECOMMIT, combine(combine(combine(data3x3_precommit, framework::dataset::make("DataType",
160 DataType::F32)),
161 data_layouts_dataset),
162 add_bias_dataset))
Pablo Tellof5f34bb2017-08-22 13:34:13 +0100163{
164 // Validate output
165 validate(Accessor(_target), _reference, tolerance_fp32);
166}
Matthew Jacksonb9070a42019-08-22 16:13:27 +0100167FIXTURE_DATA_TEST_CASE(RunAsymm, NEDeconvolutionLayerAsymmFixture3x3<float>, framework::DatasetMode::NIGHTLY, combine(combine(combine(data3x3_asymm, framework::dataset::make("DataType",
168 DataType::F32)),
169 data_layouts_dataset),
170 add_bias_dataset))
171{
172 // Validate output
173 validate(Accessor(_target), _reference, tolerance_fp32);
174}
Manuel Bottini9f0d5ec2019-08-19 13:31:38 +0100175FIXTURE_DATA_TEST_CASE(RunLarge, NEDeconvolutionLayerFixture3x3<float>, framework::DatasetMode::NIGHTLY, combine(combine(combine(data3x3, framework::dataset::make("DataType", DataType::F32)),
176 data_layouts_dataset),
177 add_bias_dataset))
Michalis Spyrou064add62018-11-01 18:14:27 +0000178{
179 // Validate output
180 validate(Accessor(_target), _reference, tolerance_fp32);
181}
182TEST_SUITE_END() // W3x3
Pablo Tellof5f34bb2017-08-22 13:34:13 +0100183TEST_SUITE(W1x1)
Manuel Bottini9f0d5ec2019-08-19 13:31:38 +0100184FIXTURE_DATA_TEST_CASE(Run, NEDeconvolutionLayerFixture1x1<float>, framework::DatasetMode::NIGHTLY, combine(combine(combine(data1x1, framework::dataset::make("DataType", DataType::F32)),
185 data_layouts_dataset),
186 add_bias_dataset))
Pablo Tellof5f34bb2017-08-22 13:34:13 +0100187{
188 // Validate output
189 validate(Accessor(_target), _reference, tolerance_fp32);
190}
Michalis Spyrou064add62018-11-01 18:14:27 +0000191TEST_SUITE_END() // W1x1
Michalis Spyrou064add62018-11-01 18:14:27 +0000192TEST_SUITE_END() // FP32
Manuel Bottinif391fff2019-05-15 13:01:26 +0100193
194#ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC
195TEST_SUITE(FP16)
196TEST_SUITE(W4x4)
Manuel Bottini9f0d5ec2019-08-19 13:31:38 +0100197FIXTURE_DATA_TEST_CASE(Run, NEDeconvolutionLayerFixture4x4<half>, framework::DatasetMode::NIGHTLY, combine(combine(combine(data4x4, framework::dataset::make("DataType", DataType::F16)),
198 data_layouts_dataset),
199 add_bias_dataset))
Manuel Bottinif391fff2019-05-15 13:01:26 +0100200{
201 // Validate output
202 validate(Accessor(_target), _reference, tolerance_fp16);
203}
204TEST_SUITE_END() // W4x4
205TEST_SUITE(W3x3)
Manuel Bottini9f0d5ec2019-08-19 13:31:38 +0100206FIXTURE_DATA_TEST_CASE(RunSmall, NEDeconvolutionLayerFixture3x3<half>, framework::DatasetMode::PRECOMMIT, combine(combine(combine(data3x3_precommit, framework::dataset::make("DataType",
207 DataType::F16)),
208 data_layouts_dataset),
209 add_bias_dataset))
Manuel Bottinif391fff2019-05-15 13:01:26 +0100210{
211 // Validate output
212 validate(Accessor(_target), _reference, tolerance_fp16);
213}
Manuel Bottini9f0d5ec2019-08-19 13:31:38 +0100214FIXTURE_DATA_TEST_CASE(RunLarge, NEDeconvolutionLayerFixture3x3<half>, framework::DatasetMode::NIGHTLY, combine(combine(combine(data3x3, framework::dataset::make("DataType", DataType::F16)),
215 data_layouts_dataset),
216 add_bias_dataset))
Manuel Bottinif391fff2019-05-15 13:01:26 +0100217{
218 // Validate output
219 validate(Accessor(_target), _reference, tolerance_fp16);
220}
221TEST_SUITE_END() // W3x3
222TEST_SUITE(W1x1)
Manuel Bottini9f0d5ec2019-08-19 13:31:38 +0100223FIXTURE_DATA_TEST_CASE(Run, NEDeconvolutionLayerFixture1x1<half>, framework::DatasetMode::NIGHTLY, combine(combine(combine(data1x1, framework::dataset::make("DataType", DataType::F16)),
224 data_layouts_dataset),
225 add_bias_dataset))
Manuel Bottinif391fff2019-05-15 13:01:26 +0100226{
227 // Validate output
228 validate(Accessor(_target), _reference, tolerance_fp16);
229}
230TEST_SUITE_END() // W1x1
231TEST_SUITE_END() // FP16
232#endif /* __ARM_FEATURE_FP16_VECTOR_ARITHMETIC */
233
Michalis Spyrou064add62018-11-01 18:14:27 +0000234TEST_SUITE_END() // Float
Pablo Tellof5f34bb2017-08-22 13:34:13 +0100235
Usama Arif2899e002019-04-16 14:32:25 +0100236template <typename T>
237using NEDeconvolutionLayerQuantizedFixture4x4 = DeconvolutionValidationQuantizedFixture<Tensor, Accessor, NEDeconvolutionLayer, T, 4, 4>;
238
239template <typename T>
240using NEDeconvolutionLayerQuantizedFixture3x3 = DeconvolutionValidationQuantizedFixture<Tensor, Accessor, NEDeconvolutionLayer, T, 3, 3>;
241
242template <typename T>
243using NEDeconvolutionLayerQuantizedFixture1x1 = DeconvolutionValidationQuantizedFixture<Tensor, Accessor, NEDeconvolutionLayer, T, 1, 1>;
244
245TEST_SUITE(Quantized)
246TEST_SUITE(QASYMM8)
247
248TEST_SUITE(W4x4)
Manuel Bottini279814b2019-10-25 10:28:28 +0100249FIXTURE_DATA_TEST_CASE(Run, NEDeconvolutionLayerQuantizedFixture4x4<uint8_t>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(combine(data4x4, framework::dataset::make("DataType",
Usama Arif2899e002019-04-16 14:32:25 +0100250 DataType::QASYMM8)),
251 data_layouts_dataset),
Michele Di Giorgiof29d1b72019-10-29 10:58:13 +0000252 input_qinfo_dataset),
253 output_qinfo_dataset),
Manuel Bottini9f0d5ec2019-08-19 13:31:38 +0100254 add_bias_dataset))
Usama Arif2899e002019-04-16 14:32:25 +0100255{
256 // Validate output
Luca Foschianifedefc32020-02-17 17:02:49 +0000257 validate(Accessor(_target), _reference, tolerance_quantized, tolerance_num);
Usama Arif2899e002019-04-16 14:32:25 +0100258}
259TEST_SUITE_END() // W4x4
260
261TEST_SUITE(W3x3)
Manuel Bottini279814b2019-10-25 10:28:28 +0100262FIXTURE_DATA_TEST_CASE(RunSmall, NEDeconvolutionLayerQuantizedFixture3x3<uint8_t>, framework::DatasetMode::PRECOMMIT, combine(combine(combine(combine(combine(data3x3_precommit,
Manuel Bottini9f0d5ec2019-08-19 13:31:38 +0100263 framework::dataset::make("DataType",
264 DataType::QASYMM8)),
Usama Arif2899e002019-04-16 14:32:25 +0100265 data_layouts_dataset),
Michele Di Giorgiof29d1b72019-10-29 10:58:13 +0000266 input_qinfo_dataset),
267 output_qinfo_dataset),
Manuel Bottini9f0d5ec2019-08-19 13:31:38 +0100268 add_bias_dataset))
Usama Arif2899e002019-04-16 14:32:25 +0100269{
270 // Validate output
Luca Foschianifedefc32020-02-17 17:02:49 +0000271 validate(Accessor(_target), _reference, tolerance_quantized, tolerance_num);
Usama Arif2899e002019-04-16 14:32:25 +0100272}
Manuel Bottini279814b2019-10-25 10:28:28 +0100273FIXTURE_DATA_TEST_CASE(RunLarge, NEDeconvolutionLayerQuantizedFixture3x3<uint8_t>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(combine(data3x3,
274 framework::dataset::make("DataType",
275 DataType::QASYMM8)),
Usama Arif2899e002019-04-16 14:32:25 +0100276 data_layouts_dataset),
Michele Di Giorgiof29d1b72019-10-29 10:58:13 +0000277 input_qinfo_dataset),
278 output_qinfo_dataset),
Manuel Bottini9f0d5ec2019-08-19 13:31:38 +0100279 add_bias_dataset))
Usama Arif2899e002019-04-16 14:32:25 +0100280{
281 // Validate output
Luca Foschianifedefc32020-02-17 17:02:49 +0000282 validate(Accessor(_target), _reference, tolerance_quantized, tolerance_num);
Usama Arif2899e002019-04-16 14:32:25 +0100283}
284TEST_SUITE_END() // W3x3
285
286TEST_SUITE(W1x1)
Manuel Bottini279814b2019-10-25 10:28:28 +0100287FIXTURE_DATA_TEST_CASE(Run, NEDeconvolutionLayerQuantizedFixture1x1<uint8_t>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(combine(data1x1, framework::dataset::make("DataType",
Usama Arif2899e002019-04-16 14:32:25 +0100288 DataType::QASYMM8)),
289 data_layouts_dataset),
Michele Di Giorgiof29d1b72019-10-29 10:58:13 +0000290 input_qinfo_dataset),
291 output_qinfo_dataset),
Manuel Bottini9f0d5ec2019-08-19 13:31:38 +0100292 add_bias_dataset))
Usama Arif2899e002019-04-16 14:32:25 +0100293{
294 // Validate output
Luca Foschianifedefc32020-02-17 17:02:49 +0000295 validate(Accessor(_target), _reference, tolerance_quantized, tolerance_num);
Usama Arif2899e002019-04-16 14:32:25 +0100296}
297TEST_SUITE_END() // W1x1
298
299TEST_SUITE_END() // QASYMM8
Luca Foschianifedefc32020-02-17 17:02:49 +0000300
301TEST_SUITE(QASYMM8_SIGNED)
302
303TEST_SUITE(W4x4)
304FIXTURE_DATA_TEST_CASE(Run, NEDeconvolutionLayerQuantizedFixture4x4<int8_t>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(combine(data4x4, framework::dataset::make("DataType",
305 DataType::QASYMM8_SIGNED)),
306 data_layouts_dataset),
307 input_qinfo_dataset),
308 output_qinfo_dataset),
309 add_bias_dataset))
310{
311 // Validate output
312 validate(Accessor(_target), _reference, tolerance_quantized, tolerance_num);
313}
314TEST_SUITE_END() // W4x4
315
316TEST_SUITE(W3x3)
317FIXTURE_DATA_TEST_CASE(RunSmall, NEDeconvolutionLayerQuantizedFixture3x3<int8_t>, framework::DatasetMode::PRECOMMIT, combine(combine(combine(combine(combine(data3x3_precommit,
318 framework::dataset::make("DataType",
319 DataType::QASYMM8_SIGNED)),
320 data_layouts_dataset),
321 input_qinfo_dataset),
322 output_qinfo_dataset),
323 add_bias_dataset))
324{
325 // Validate output
326 validate(Accessor(_target), _reference, tolerance_quantized, tolerance_num);
327}
328FIXTURE_DATA_TEST_CASE(RunLarge, NEDeconvolutionLayerQuantizedFixture3x3<int8_t>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(combine(data3x3,
329 framework::dataset::make("DataType",
330 DataType::QASYMM8_SIGNED)),
331 data_layouts_dataset),
332 input_qinfo_dataset),
333 output_qinfo_dataset),
334 add_bias_dataset))
335{
336 // Validate output
337 validate(Accessor(_target), _reference, tolerance_quantized, tolerance_num);
338}
339TEST_SUITE_END() // W3x3
340
341TEST_SUITE(W1x1)
342FIXTURE_DATA_TEST_CASE(Run, NEDeconvolutionLayerQuantizedFixture1x1<int8_t>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(combine(data1x1, framework::dataset::make("DataType",
343 DataType::QASYMM8_SIGNED)),
344 data_layouts_dataset),
345 input_qinfo_dataset),
346 output_qinfo_dataset),
347 add_bias_dataset))
348{
349 // Validate output
350 validate(Accessor(_target), _reference, tolerance_quantized, tolerance_num);
351}
352TEST_SUITE_END() // W1x1
353
354TEST_SUITE_END() // QASYMM8_SIGNED
Usama Arif2899e002019-04-16 14:32:25 +0100355TEST_SUITE_END() // Quantized
356
Michalis Spyrou064add62018-11-01 18:14:27 +0000357TEST_SUITE_END() // DeconvolutionLayer
358TEST_SUITE_END() // NEON
Pablo Tellof5f34bb2017-08-22 13:34:13 +0100359} // namespace validation
360} // namespace test
361} // namespace arm_compute