blob: 89f9d98ed5f3997f6a35efdf53c2382c461757ad [file] [log] [blame]
Pablo Tellof5f34bb2017-08-22 13:34:13 +01001/*
Michalis Spyrou5ce99a22019-01-25 14:17:49 +00002 * Copyright (c) 2017-2019 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{
Manuel Bottini9f0d5ec2019-08-19 13:31:38 +010046constexpr AbsoluteTolerance<float> tolerance_fp32(0.001f); /**< Tolerance for floating point tests */
47constexpr AbsoluteTolerance<float> tolerance_qasymm8(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 +000088DATA_TEST_CASE(Configuration, framework::DatasetMode::ALL, (combine(datasets::SmallDeconvolutionShapes(), framework::dataset::make("DataType", DataType::F32))),
89 input_shape, data_type)
90{
91 // Create shapes
Matthew Jacksonb9070a42019-08-22 16:13:27 +010092 const unsigned int kernel_size_x = 3;
93 const unsigned int kernel_size_y = 3;
94 const unsigned int num_kernels = 1;
95 const TensorShape weights_shape(kernel_size_x, kernel_size_y, input_shape.z(), num_kernels);
96 const TensorShape bias_shape(num_kernels);
97 const PadStrideInfo info(1, 1, 1, 1);
98 auto out_dim = deconvolution_output_dimensions(input_shape.x(), input_shape.y(), kernel_size_x, kernel_size_y, info);
99 TensorShape output_shape = compute_deconvolution_output_shape(out_dim, TensorInfo(input_shape, 1, data_type), TensorInfo(weights_shape, 1, data_type));
Alex Gilday27c08ab2018-02-22 11:36:16 +0000100
101 // Create tensors
102 Tensor src = create_tensor<Tensor>(input_shape, data_type, 1);
103 Tensor weights = create_tensor<Tensor>(weights_shape, data_type, 1);
104 Tensor bias = create_tensor<Tensor>(bias_shape, data_type, 1);
105 Tensor dst = create_tensor<Tensor>(output_shape, data_type, 1);
106
107 ARM_COMPUTE_EXPECT(src.info()->is_resizable(), framework::LogLevel::ERRORS);
108 ARM_COMPUTE_EXPECT(weights.info()->is_resizable(), framework::LogLevel::ERRORS);
109 ARM_COMPUTE_EXPECT(bias.info()->is_resizable(), framework::LogLevel::ERRORS);
110 ARM_COMPUTE_EXPECT(dst.info()->is_resizable(), framework::LogLevel::ERRORS);
111
112 // Create and configure function
113 NEDeconvolutionLayer deconv;
Manuel Bottinic1b76fa2019-06-17 12:04:40 +0100114 deconv.configure(&src, &weights, &bias, &dst, PadStrideInfo(1, 1, 1, 1, DimensionRoundingType::CEIL));
Alex Gilday27c08ab2018-02-22 11:36:16 +0000115
116 // Validate valid region
117 const ValidRegion src_valid_region = shape_to_valid_region(input_shape);
118 const ValidRegion weights_valid_region = shape_to_valid_region(weights_shape);
119 const ValidRegion bias_valid_region = shape_to_valid_region(bias_shape);
120 const ValidRegion dst_valid_region = shape_to_valid_region(output_shape);
121
122 validate(src.info()->valid_region(), src_valid_region);
123 validate(weights.info()->valid_region(), weights_valid_region);
124 validate(bias.info()->valid_region(), bias_valid_region);
125 validate(dst.info()->valid_region(), dst_valid_region);
126}
127
128// *INDENT-OFF*
129// clang-format off
Manuel Bottinic1b76fa2019-06-17 12:04:40 +0100130DATA_TEST_CASE(Validate, framework::DatasetMode::ALL, zip(zip(zip(zip(zip(
Vidhya Sudhan Loganathan7485d5a2018-07-04 09:34:00 +0100131 framework::dataset::make("InputInfo", { TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), // Mismatching data type
132 TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), // Invalid weights shape
133 TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F16), // Non supported data type
134 TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), // Invalid bias shape
135 TensorInfo(TensorShape(13U, 11U, 4U, 3U), 1, DataType::F32), // Window shrink
136 TensorInfo(TensorShape(32U, 16U, 2U), 1, DataType::F32),
Alex Gilday27c08ab2018-02-22 11:36:16 +0000137 }),
Vidhya Sudhan Loganathan7485d5a2018-07-04 09:34:00 +0100138 framework::dataset::make("WeightsInfo", { TensorInfo(TensorShape(3U, 3U, 2U, 2U), 1, DataType::F16),
139 TensorInfo(TensorShape(3U, 3U, 2U, 4U), 1, DataType::F32),
140 TensorInfo(TensorShape(3U, 3U, 2U, 2U), 1, DataType::F16),
141 TensorInfo(TensorShape(3U, 2U, 2U, 2U), 1, DataType::F32),
142 TensorInfo(TensorShape(3U, 3U, 4U), 1, DataType::F32),
143 TensorInfo(TensorShape(1U, 1U, 2U, 4U), 1, DataType::F32),
Alex Gilday27c08ab2018-02-22 11:36:16 +0000144 })),
Vidhya Sudhan Loganathan7485d5a2018-07-04 09:34:00 +0100145 framework::dataset::make("BiasInfo", { TensorInfo(TensorShape(1U), 1, DataType::F16),
146 TensorInfo(TensorShape(1U), 1, DataType::F32),
147 TensorInfo(TensorShape(1U), 1, DataType::F32),
148 TensorInfo(TensorShape(25U, 11U), 1, DataType::F32),
149 TensorInfo(TensorShape(1U), 1, DataType::F32),
150 TensorInfo(TensorShape(4U), 1, DataType::F32),
Alex Gilday27c08ab2018-02-22 11:36:16 +0000151 })),
Vidhya Sudhan Loganathan7485d5a2018-07-04 09:34:00 +0100152 framework::dataset::make("OutputInfo",{ TensorInfo(TensorShape(25U, 11U, 2U), 1, DataType::F16),
153 TensorInfo(TensorShape(25U, 10U, 2U), 1, DataType::F32),
154 TensorInfo(TensorShape(25U, 11U, 2U), 1, DataType::F32),
155 TensorInfo(TensorShape(13U, 13U, 2U), 1, DataType::F32),
156 TensorInfo(TensorShape(11U, 9U, 1U, 3U), 1, DataType::F32),
157 TensorInfo(TensorShape(32U, 16U, 4U), 1, DataType::F32),
Alex Gilday27c08ab2018-02-22 11:36:16 +0000158 })),
159 framework::dataset::make("PadStrideInfo", { PadStrideInfo(1, 1, 0, 0),
160 PadStrideInfo(1, 1, 0, 0),
161 PadStrideInfo(1, 1, 0, 0),
162 PadStrideInfo(1, 1, 0, 0),
163 PadStrideInfo(1, 1, 1, 1),
164 PadStrideInfo(1, 1, 0, 0),
165 })),
Alex Gilday27c08ab2018-02-22 11:36:16 +0000166 framework::dataset::make("Expected", { false, false, false, false, false, true })),
Manuel Bottinic1b76fa2019-06-17 12:04:40 +0100167 input_info, weights_info, bias_info, output_info, pad_info, expected)
Alex Gilday27c08ab2018-02-22 11:36:16 +0000168{
Manuel Bottinic1b76fa2019-06-17 12:04:40 +0100169 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 +0000170 ARM_COMPUTE_EXPECT(is_valid == expected, framework::LogLevel::ERRORS);
171}
172// clang-format on
173// *INDENT-ON*
174
Pablo Tellof5f34bb2017-08-22 13:34:13 +0100175template <typename T>
Michele Di Giorgiof29d1b72019-10-29 10:58:13 +0000176using NEDeconvolutionLayerFixture4x4 = DeconvolutionValidationFixture<Tensor, Accessor, NEDeconvolutionLayer, T, 4, 4>;
Georgios Pinitasced7a8d2018-02-01 16:31:33 +0000177
178template <typename T>
Michele Di Giorgiof29d1b72019-10-29 10:58:13 +0000179using NEDeconvolutionLayerFixture3x3 = DeconvolutionValidationFixture<Tensor, Accessor, NEDeconvolutionLayer, T, 3, 3>;
Pablo Tellof5f34bb2017-08-22 13:34:13 +0100180
181template <typename T>
Matthew Jacksonb9070a42019-08-22 16:13:27 +0100182using NEDeconvolutionLayerAsymmFixture3x3 = DeconvolutionValidationAsymmFixture<Tensor, Accessor, NEDeconvolutionLayer, T, 3, 3>;
183
184template <typename T>
Michele Di Giorgiof29d1b72019-10-29 10:58:13 +0000185using NEDeconvolutionLayerFixture1x1 = DeconvolutionValidationFixture<Tensor, Accessor, NEDeconvolutionLayer, T, 1, 1>;
Pablo Tellof5f34bb2017-08-22 13:34:13 +0100186
187TEST_SUITE(Float)
Pablo Tellof5f34bb2017-08-22 13:34:13 +0100188TEST_SUITE(FP32)
Georgios Pinitasced7a8d2018-02-01 16:31:33 +0000189TEST_SUITE(W4x4)
Manuel Bottini9f0d5ec2019-08-19 13:31:38 +0100190FIXTURE_DATA_TEST_CASE(Run, NEDeconvolutionLayerFixture4x4<float>, framework::DatasetMode::NIGHTLY, combine(combine(combine(data4x4, framework::dataset::make("DataType", DataType::F32)),
191 data_layouts_dataset),
192 add_bias_dataset))
Georgios Pinitasced7a8d2018-02-01 16:31:33 +0000193{
194 // Validate output
195 validate(Accessor(_target), _reference, tolerance_fp32);
196}
Michalis Spyrou064add62018-11-01 18:14:27 +0000197TEST_SUITE_END() // W4x4
Pablo Tellof5f34bb2017-08-22 13:34:13 +0100198TEST_SUITE(W3x3)
Manuel Bottini9f0d5ec2019-08-19 13:31:38 +0100199FIXTURE_DATA_TEST_CASE(RunSmall, NEDeconvolutionLayerFixture3x3<float>, framework::DatasetMode::PRECOMMIT, combine(combine(combine(data3x3_precommit, framework::dataset::make("DataType",
200 DataType::F32)),
201 data_layouts_dataset),
202 add_bias_dataset))
Pablo Tellof5f34bb2017-08-22 13:34:13 +0100203{
204 // Validate output
205 validate(Accessor(_target), _reference, tolerance_fp32);
206}
Matthew Jacksonb9070a42019-08-22 16:13:27 +0100207FIXTURE_DATA_TEST_CASE(RunAsymm, NEDeconvolutionLayerAsymmFixture3x3<float>, framework::DatasetMode::NIGHTLY, combine(combine(combine(data3x3_asymm, framework::dataset::make("DataType",
208 DataType::F32)),
209 data_layouts_dataset),
210 add_bias_dataset))
211{
212 // Validate output
213 validate(Accessor(_target), _reference, tolerance_fp32);
214}
Manuel Bottini9f0d5ec2019-08-19 13:31:38 +0100215FIXTURE_DATA_TEST_CASE(RunLarge, NEDeconvolutionLayerFixture3x3<float>, framework::DatasetMode::NIGHTLY, combine(combine(combine(data3x3, framework::dataset::make("DataType", DataType::F32)),
216 data_layouts_dataset),
217 add_bias_dataset))
Michalis Spyrou064add62018-11-01 18:14:27 +0000218{
219 // Validate output
220 validate(Accessor(_target), _reference, tolerance_fp32);
221}
222TEST_SUITE_END() // W3x3
Pablo Tellof5f34bb2017-08-22 13:34:13 +0100223TEST_SUITE(W1x1)
Manuel Bottini9f0d5ec2019-08-19 13:31:38 +0100224FIXTURE_DATA_TEST_CASE(Run, NEDeconvolutionLayerFixture1x1<float>, framework::DatasetMode::NIGHTLY, combine(combine(combine(data1x1, framework::dataset::make("DataType", DataType::F32)),
225 data_layouts_dataset),
226 add_bias_dataset))
Pablo Tellof5f34bb2017-08-22 13:34:13 +0100227{
228 // Validate output
229 validate(Accessor(_target), _reference, tolerance_fp32);
230}
Michalis Spyrou064add62018-11-01 18:14:27 +0000231TEST_SUITE_END() // W1x1
Michalis Spyrou064add62018-11-01 18:14:27 +0000232TEST_SUITE_END() // FP32
Manuel Bottinif391fff2019-05-15 13:01:26 +0100233
234#ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC
235TEST_SUITE(FP16)
236TEST_SUITE(W4x4)
Manuel Bottini9f0d5ec2019-08-19 13:31:38 +0100237FIXTURE_DATA_TEST_CASE(Run, NEDeconvolutionLayerFixture4x4<half>, framework::DatasetMode::NIGHTLY, combine(combine(combine(data4x4, framework::dataset::make("DataType", DataType::F16)),
238 data_layouts_dataset),
239 add_bias_dataset))
Manuel Bottinif391fff2019-05-15 13:01:26 +0100240{
241 // Validate output
242 validate(Accessor(_target), _reference, tolerance_fp16);
243}
244TEST_SUITE_END() // W4x4
245TEST_SUITE(W3x3)
Manuel Bottini9f0d5ec2019-08-19 13:31:38 +0100246FIXTURE_DATA_TEST_CASE(RunSmall, NEDeconvolutionLayerFixture3x3<half>, framework::DatasetMode::PRECOMMIT, combine(combine(combine(data3x3_precommit, framework::dataset::make("DataType",
247 DataType::F16)),
248 data_layouts_dataset),
249 add_bias_dataset))
Manuel Bottinif391fff2019-05-15 13:01:26 +0100250{
251 // Validate output
252 validate(Accessor(_target), _reference, tolerance_fp16);
253}
Manuel Bottini9f0d5ec2019-08-19 13:31:38 +0100254FIXTURE_DATA_TEST_CASE(RunLarge, NEDeconvolutionLayerFixture3x3<half>, framework::DatasetMode::NIGHTLY, combine(combine(combine(data3x3, framework::dataset::make("DataType", DataType::F16)),
255 data_layouts_dataset),
256 add_bias_dataset))
Manuel Bottinif391fff2019-05-15 13:01:26 +0100257{
258 // Validate output
259 validate(Accessor(_target), _reference, tolerance_fp16);
260}
261TEST_SUITE_END() // W3x3
262TEST_SUITE(W1x1)
Manuel Bottini9f0d5ec2019-08-19 13:31:38 +0100263FIXTURE_DATA_TEST_CASE(Run, NEDeconvolutionLayerFixture1x1<half>, framework::DatasetMode::NIGHTLY, combine(combine(combine(data1x1, framework::dataset::make("DataType", DataType::F16)),
264 data_layouts_dataset),
265 add_bias_dataset))
Manuel Bottinif391fff2019-05-15 13:01:26 +0100266{
267 // Validate output
268 validate(Accessor(_target), _reference, tolerance_fp16);
269}
270TEST_SUITE_END() // W1x1
271TEST_SUITE_END() // FP16
272#endif /* __ARM_FEATURE_FP16_VECTOR_ARITHMETIC */
273
Michalis Spyrou064add62018-11-01 18:14:27 +0000274TEST_SUITE_END() // Float
Pablo Tellof5f34bb2017-08-22 13:34:13 +0100275
Usama Arif2899e002019-04-16 14:32:25 +0100276template <typename T>
277using NEDeconvolutionLayerQuantizedFixture4x4 = DeconvolutionValidationQuantizedFixture<Tensor, Accessor, NEDeconvolutionLayer, T, 4, 4>;
278
279template <typename T>
280using NEDeconvolutionLayerQuantizedFixture3x3 = DeconvolutionValidationQuantizedFixture<Tensor, Accessor, NEDeconvolutionLayer, T, 3, 3>;
281
282template <typename T>
283using NEDeconvolutionLayerQuantizedFixture1x1 = DeconvolutionValidationQuantizedFixture<Tensor, Accessor, NEDeconvolutionLayer, T, 1, 1>;
284
285TEST_SUITE(Quantized)
286TEST_SUITE(QASYMM8)
287
288TEST_SUITE(W4x4)
Manuel Bottini279814b2019-10-25 10:28:28 +0100289FIXTURE_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 +0100290 DataType::QASYMM8)),
291 data_layouts_dataset),
Michele Di Giorgiof29d1b72019-10-29 10:58:13 +0000292 input_qinfo_dataset),
293 output_qinfo_dataset),
Manuel Bottini9f0d5ec2019-08-19 13:31:38 +0100294 add_bias_dataset))
Usama Arif2899e002019-04-16 14:32:25 +0100295{
296 // Validate output
297 validate(Accessor(_target), _reference, tolerance_qasymm8, tolerance_num);
298}
299TEST_SUITE_END() // W4x4
300
301TEST_SUITE(W3x3)
Manuel Bottini279814b2019-10-25 10:28:28 +0100302FIXTURE_DATA_TEST_CASE(RunSmall, NEDeconvolutionLayerQuantizedFixture3x3<uint8_t>, framework::DatasetMode::PRECOMMIT, combine(combine(combine(combine(combine(data3x3_precommit,
Manuel Bottini9f0d5ec2019-08-19 13:31:38 +0100303 framework::dataset::make("DataType",
304 DataType::QASYMM8)),
Usama Arif2899e002019-04-16 14:32:25 +0100305 data_layouts_dataset),
Michele Di Giorgiof29d1b72019-10-29 10:58:13 +0000306 input_qinfo_dataset),
307 output_qinfo_dataset),
Manuel Bottini9f0d5ec2019-08-19 13:31:38 +0100308 add_bias_dataset))
Usama Arif2899e002019-04-16 14:32:25 +0100309{
310 // Validate output
311 validate(Accessor(_target), _reference, tolerance_qasymm8, tolerance_num);
312}
Manuel Bottini279814b2019-10-25 10:28:28 +0100313FIXTURE_DATA_TEST_CASE(RunLarge, NEDeconvolutionLayerQuantizedFixture3x3<uint8_t>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(combine(data3x3,
314 framework::dataset::make("DataType",
315 DataType::QASYMM8)),
Usama Arif2899e002019-04-16 14:32:25 +0100316 data_layouts_dataset),
Michele Di Giorgiof29d1b72019-10-29 10:58:13 +0000317 input_qinfo_dataset),
318 output_qinfo_dataset),
Manuel Bottini9f0d5ec2019-08-19 13:31:38 +0100319 add_bias_dataset))
Usama Arif2899e002019-04-16 14:32:25 +0100320{
321 // Validate output
322 validate(Accessor(_target), _reference, tolerance_qasymm8, tolerance_num);
323}
324TEST_SUITE_END() // W3x3
325
326TEST_SUITE(W1x1)
Manuel Bottini279814b2019-10-25 10:28:28 +0100327FIXTURE_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 +0100328 DataType::QASYMM8)),
329 data_layouts_dataset),
Michele Di Giorgiof29d1b72019-10-29 10:58:13 +0000330 input_qinfo_dataset),
331 output_qinfo_dataset),
Manuel Bottini9f0d5ec2019-08-19 13:31:38 +0100332 add_bias_dataset))
Usama Arif2899e002019-04-16 14:32:25 +0100333{
334 // Validate output
335 validate(Accessor(_target), _reference, tolerance_qasymm8, tolerance_num);
336}
337TEST_SUITE_END() // W1x1
338
339TEST_SUITE_END() // QASYMM8
340TEST_SUITE_END() // Quantized
341
Michalis Spyrou064add62018-11-01 18:14:27 +0000342TEST_SUITE_END() // DeconvolutionLayer
343TEST_SUITE_END() // NEON
Pablo Tellof5f34bb2017-08-22 13:34:13 +0100344} // namespace validation
345} // namespace test
346} // namespace arm_compute