blob: c62c07bdfda66dbd4d8e3b4f7f6ed565c163ed6a [file] [log] [blame]
Anthony Barbier8140e1e2017-12-14 23:48:46 +00001/*
Jenkins514be652019-02-28 12:25:18 +00002 * Copyright (c) 2017-2019 ARM Limited.
Anthony Barbier8140e1e2017-12-14 23:48:46 +00003 *
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,
Jenkins514be652019-02-28 12:25:18 +000021 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
Anthony Barbier8140e1e2017-12-14 23:48:46 +000022 * SOFTWARE.
23 */
24#include "arm_compute/core/Types.h"
Jenkinsb3a371b2018-05-23 11:36:53 +010025#include "arm_compute/core/utils/misc/ShapeCalculator.h"
Anthony Barbier8140e1e2017-12-14 23:48:46 +000026#include "arm_compute/runtime/NEON/functions/NEDepthwiseConvolutionLayer.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/DepthwiseConvolutionLayerDataset.h"
Jenkins4ba87db2019-05-23 17:11:51 +010032#include "tests/datasets/DilatedDepthwiseConvolutionLayerDataset.h"
Anthony Barbier8140e1e2017-12-14 23:48:46 +000033#include "tests/framework/Asserts.h"
34#include "tests/framework/Macros.h"
35#include "tests/framework/datasets/Datasets.h"
36#include "tests/validation/Validation.h"
37#include "tests/validation/fixtures/DepthwiseConvolutionLayerFixture.h"
38
39namespace arm_compute
40{
41namespace test
42{
43namespace validation
44{
Jenkinsb3a371b2018-05-23 11:36:53 +010045using namespace arm_compute::misc::shape_calculator;
46
Anthony Barbier8140e1e2017-12-14 23:48:46 +000047namespace
48{
Jenkins514be652019-02-28 12:25:18 +000049constexpr RelativeTolerance<float> tolerance_f32(0.01f); /**< Tolerance value for comparing reference's output against implementation's output for DataType::F32 */
50constexpr AbsoluteTolerance<uint8_t> tolerance_qasymm8(1); /**< Tolerance value for comparing reference's output against implementation's output for DataType::QASYMM8 */
51#ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC
52RelativeTolerance<half_float::half> tolerance_f16(half_float::half(0.01)); /**< Tolerance value for comparing reference's output against implementation's output for DataType::F16 */
53constexpr float tolerance_num = 0.05f; /**< Tolerance number */
54#endif // __ARM_FEATURE_FP16_VECTOR_ARITHMETIC
Jenkinsb3a371b2018-05-23 11:36:53 +010055
Jenkins975dfe12019-09-02 11:47:54 +010056const auto depth_multipliers = framework::dataset::make("DepthMultiplier", { 1, 2, 5 });
57const auto large_depth_multipliers = framework::dataset::make("DepthMultiplier", { 1, 2, 5, 8 });
Jenkins4ba87db2019-05-23 17:11:51 +010058
59//Activation Functions
60const auto ActivationFunctionsDataset = framework::dataset::make("ActivationInfo",
61{
62 ActivationLayerInfo(),
63 ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU)
64});
Anthony Barbier8140e1e2017-12-14 23:48:46 +000065} // namespace
66
67TEST_SUITE(NEON)
Jenkins4ba87db2019-05-23 17:11:51 +010068TEST_SUITE(DepthwiseConvolutionLayer)
Anthony Barbier8140e1e2017-12-14 23:48:46 +000069
Jenkins52ba29e2018-08-29 15:32:11 +000070// *INDENT-OFF*
71// clang-format off
Jenkins4ba87db2019-05-23 17:11:51 +010072DATA_TEST_CASE(Validate3x3, framework::DatasetMode::ALL, zip(zip(zip(zip(zip(zip(zip(
Jenkins52ba29e2018-08-29 15:32:11 +000073 framework::dataset::make("InputInfo", { TensorInfo(TensorShape(32U, 18U, 2U), 1, DataType::F32), // Mismatching data type input/weights
74 TensorInfo(TensorShape(32U, 18U, 3U), 1, DataType::F32), // Mismatching input feature maps
75 TensorInfo(TensorShape(32U, 18U, 2U), 1, DataType::F32), // Unsupported weights dimensions
76 TensorInfo(TensorShape(32U, 18U, 2U), 1, DataType::F32), // Mismatching depth multiplier
77 TensorInfo(TensorShape(32U, 18U, 2U), 1, DataType::QASYMM8), // Invalid stride
78 TensorInfo(TensorShape(32U, 18U, 2U), 1, DataType::F32), // Invalid biases size
79 TensorInfo(TensorShape(32U, 18U, 2U), 1, DataType::F32), // Invalid biases dimensions
80 TensorInfo(TensorShape(32U, 18U, 2U), 1, DataType::F32), // Invalid output size
Jenkins4ba87db2019-05-23 17:11:51 +010081 TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), // patch size bigger than input width
82 TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), // dilation < 1
Jenkins52ba29e2018-08-29 15:32:11 +000083 TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32),
84 }),
85 framework::dataset::make("WeightsInfo", { TensorInfo(TensorShape(3U, 3U, 2U, 2U), 1, DataType::F16),
86 TensorInfo(TensorShape(3U, 3U, 2U, 2U), 1, DataType::F32),
87 TensorInfo(TensorShape(5U, 5U, 2U, 2U), 1, DataType::F32),
88 TensorInfo(TensorShape(3U, 3U, 2U, 2U), 1, DataType::F32),
89 TensorInfo(TensorShape(3U, 3U, 2U, 2U), 1, DataType::QASYMM8),
90 TensorInfo(TensorShape(3U, 3U, 2U, 2U), 1, DataType::F32),
91 TensorInfo(TensorShape(3U, 3U, 2U, 2U), 1, DataType::F32),
92 TensorInfo(TensorShape(3U, 3U, 2U, 2U), 1, DataType::F32),
93 TensorInfo(TensorShape(3U, 3U, 2U, 2U), 1, DataType::F32),
Jenkins4ba87db2019-05-23 17:11:51 +010094 TensorInfo(TensorShape(3U, 3U, 2U, 2U), 1, DataType::F32),
95 TensorInfo(TensorShape(3U, 3U, 2U, 2U), 1, DataType::F32),
Jenkins52ba29e2018-08-29 15:32:11 +000096 })),
97 framework::dataset::make("BiasesInfo", { TensorInfo(TensorShape(2U), 1, DataType::F32),
98 TensorInfo(TensorShape(2U), 1, DataType::F32),
99 TensorInfo(TensorShape(2U), 1, DataType::F32),
100 TensorInfo(TensorShape(2U), 1, DataType::F32),
101 TensorInfo(TensorShape(2U), 1, DataType::S32),
102 TensorInfo(TensorShape(4U), 1, DataType::F32),
103 TensorInfo(TensorShape(2U, 2U), 1, DataType::F32),
104 TensorInfo(TensorShape(2U), 1, DataType::F32),
105 TensorInfo(TensorShape(2U), 1, DataType::F32),
Jenkins4ba87db2019-05-23 17:11:51 +0100106 TensorInfo(TensorShape(2U), 1, DataType::F32),
107 TensorInfo(TensorShape(2U), 1, DataType::F32),
Jenkins52ba29e2018-08-29 15:32:11 +0000108 })),
109 framework::dataset::make("OutputInfo", { TensorInfo(TensorShape(30U, 16U, 2U), 1, DataType::F32),
110 TensorInfo(TensorShape(30U, 16U, 2U), 1, DataType::F32),
111 TensorInfo(TensorShape(30U, 16U, 2U), 1, DataType::F32),
112 TensorInfo(TensorShape(30U, 16U, 2U), 1, DataType::F32),
113 TensorInfo(TensorShape(30U, 16U, 2U), 1, DataType::QASYMM8),
114 TensorInfo(TensorShape(30U, 16U, 2U), 1, DataType::F32),
115 TensorInfo(TensorShape(30U, 16U, 2U), 1, DataType::F32),
116 TensorInfo(TensorShape(32U, 18U, 2U), 1, DataType::F32),
117 TensorInfo(TensorShape(25U, 11U, 2U), 1, DataType::F32),
Jenkins4ba87db2019-05-23 17:11:51 +0100118 TensorInfo(TensorShape(25U, 11U, 2U), 1, DataType::F32),
119 TensorInfo(TensorShape(25U, 11U, 2U), 1, DataType::F32),
Jenkins52ba29e2018-08-29 15:32:11 +0000120 })),
121 framework::dataset::make("ConvInfo", { PadStrideInfo(1, 1, 0, 0),
122 PadStrideInfo(1, 1, 0, 0),
123 PadStrideInfo(1, 1, 0, 0),
124 PadStrideInfo(1, 1, 0, 0),
125 PadStrideInfo(4, 1, 0, 0),
126 PadStrideInfo(1, 1, 0, 0),
127 PadStrideInfo(1, 1, 0, 0),
128 PadStrideInfo(1, 1, 0, 0),
129 PadStrideInfo(1, 1, 0, 0),
Jenkins4ba87db2019-05-23 17:11:51 +0100130 PadStrideInfo(1, 1, 0, 0),
131 PadStrideInfo(1, 1, 0, 0),
Jenkins52ba29e2018-08-29 15:32:11 +0000132 })),
133 framework::dataset::make("DepthMultiplier", { 1,
134 1,
135 1,
136 3,
137 1,
138 1,
139 1,
140 1,
141 1,
Jenkins4ba87db2019-05-23 17:11:51 +0100142 1,
143 1,
Jenkins52ba29e2018-08-29 15:32:11 +0000144 })),
Jenkins4ba87db2019-05-23 17:11:51 +0100145 framework::dataset::make("Dilation", { Size2D(1U, 1U),
146 Size2D(1U, 1U),
147 Size2D(1U, 1U),
148 Size2D(1U, 1U),
149 Size2D(1U, 1U),
150 Size2D(1U, 1U),
151 Size2D(1U, 1U),
152 Size2D(1U, 1U),
153 Size2D(25U, 1U),
154 Size2D(0U, 1U),
155 Size2D(1U, 1U),
156 })),
157 framework::dataset::make("Expected", { false, false, false, false, false, false, false, false, false, false, true })),
158 input_info, weights_info, biases_info, output_info, conv_info, depth_multiplier,dilation, expected)
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000159{
Jenkins975dfe12019-09-02 11:47:54 +0100160 bool is_valid = bool(NEDepthwiseConvolutionLayerOptimized::validate(&input_info.clone()->set_is_resizable(false),
Jenkins4ba87db2019-05-23 17:11:51 +0100161 &weights_info.clone()->set_is_resizable(false), &biases_info.clone()->set_is_resizable(false), &output_info.clone()->set_is_resizable(false), conv_info, depth_multiplier, ActivationLayerInfo(), dilation));
Jenkins52ba29e2018-08-29 15:32:11 +0000162 ARM_COMPUTE_EXPECT(is_valid == expected, framework::LogLevel::ERRORS);
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000163}
164
Jenkins4ba87db2019-05-23 17:11:51 +0100165DATA_TEST_CASE(ValidateGeneric, framework::DatasetMode::ALL, zip(zip(zip(zip(zip(zip(zip(
Jenkins52ba29e2018-08-29 15:32:11 +0000166 framework::dataset::make("InputInfo", { TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), // Mismatching data type input/weights
167 TensorInfo(TensorShape(27U, 13U, 3U), 1, DataType::F32), // Mismatching input feature maps
168 TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), // Mismatching depth multiplier
169 TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), // Invalid biases size
170 TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), // Invalid biases dimensions
171 TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), // Invalid output size
Jenkins4ba87db2019-05-23 17:11:51 +0100172 TensorInfo(TensorShape(27U, 13U, 8U), 1, DataType::F32), // patch size bigger than input width
173 TensorInfo(TensorShape(27U, 13U, 8U), 1, DataType::F32), // dilation < 1
Jenkins52ba29e2018-08-29 15:32:11 +0000174 TensorInfo(TensorShape(27U, 13U, 8U), 1, DataType::F32),
175 TensorInfo(TensorShape(32U, 13U, 8U), 1, DataType::QASYMM8),
176 }),
177 framework::dataset::make("WeightsInfo", { TensorInfo(TensorShape(3U, 3U, 2U), 1, DataType::F16),
178 TensorInfo(TensorShape(3U, 3U, 2U), 1, DataType::F32),
179 TensorInfo(TensorShape(3U, 3U, 2U), 1, DataType::F32),
180 TensorInfo(TensorShape(3U, 3U, 2U), 1, DataType::F32),
181 TensorInfo(TensorShape(3U, 3U, 2U), 1, DataType::F32),
182 TensorInfo(TensorShape(3U, 3U, 2U), 1, DataType::F32),
183 TensorInfo(TensorShape(3U, 3U, 16U), 1, DataType::F32),
Jenkins4ba87db2019-05-23 17:11:51 +0100184 TensorInfo(TensorShape(3U, 3U, 16U), 1, DataType::F32),
185 TensorInfo(TensorShape(3U, 3U, 16U), 1, DataType::F32),
Jenkins52ba29e2018-08-29 15:32:11 +0000186 TensorInfo(TensorShape(3U, 3U, 24U), 1, DataType::QASYMM8),
187 })),
188 framework::dataset::make("BiasesInfo", { TensorInfo(TensorShape(2U), 1, DataType::F32),
189 TensorInfo(TensorShape(2U), 1, DataType::F32),
190 TensorInfo(TensorShape(2U), 1, DataType::F32),
191 TensorInfo(TensorShape(4U), 1, DataType::F32),
192 TensorInfo(TensorShape(2U, 2U), 1, DataType::F32),
193 TensorInfo(TensorShape(2U), 1, DataType::F32),
194 TensorInfo(TensorShape(16U), 1, DataType::F32),
Jenkins4ba87db2019-05-23 17:11:51 +0100195 TensorInfo(TensorShape(16U), 1, DataType::F32),
196 TensorInfo(TensorShape(16U), 1, DataType::F32),
Jenkins52ba29e2018-08-29 15:32:11 +0000197 TensorInfo(TensorShape(24U), 1, DataType::S32),
198 })),
199 framework::dataset::make("OutputInfo", { TensorInfo(TensorShape(25U, 11U, 2U), 1, DataType::F32),
200 TensorInfo(TensorShape(25U, 11U, 2U), 1, DataType::F32),
201 TensorInfo(TensorShape(25U, 11U, 2U), 1, DataType::F32),
202 TensorInfo(TensorShape(25U, 11U, 2U), 1, DataType::F32),
203 TensorInfo(TensorShape(25U, 11U, 2U), 1, DataType::F32),
204 TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32),
205 TensorInfo(TensorShape(25U, 11U, 16U), 1, DataType::F32),
Jenkins4ba87db2019-05-23 17:11:51 +0100206 TensorInfo(TensorShape(25U, 11U, 16U), 1, DataType::F32),
207 TensorInfo(TensorShape(25U, 11U, 16U), 1, DataType::F32),
Jenkins52ba29e2018-08-29 15:32:11 +0000208 TensorInfo(TensorShape(32U, 11U, 24U), 1, DataType::QASYMM8),
209 })),
210 framework::dataset::make("ConvInfo", { PadStrideInfo(1, 1, 0, 0),
211 PadStrideInfo(1, 1, 0, 0),
212 PadStrideInfo(1, 1, 0, 0),
213 PadStrideInfo(1, 1, 0, 0),
214 PadStrideInfo(1, 1, 0, 0),
215 PadStrideInfo(1, 1, 0, 0),
216 PadStrideInfo(1, 1, 0, 0),
Jenkins4ba87db2019-05-23 17:11:51 +0100217 PadStrideInfo(1, 1, 0, 0),
218 PadStrideInfo(1, 1, 0, 0),
Jenkins52ba29e2018-08-29 15:32:11 +0000219 PadStrideInfo(1, 1, 1, 0),
220 })),
221 framework::dataset::make("DepthMultiplier", { 1,
222 1,
223 3,
224 1,
225 1,
226 1,
227 2,
Jenkins4ba87db2019-05-23 17:11:51 +0100228 2,
229 2,
Jenkins52ba29e2018-08-29 15:32:11 +0000230 3,
231 })),
Jenkins4ba87db2019-05-23 17:11:51 +0100232 framework::dataset::make("Dilation", { Size2D(1U, 1U),
233 Size2D(1U, 1U),
234 Size2D(1U, 1U),
235 Size2D(1U, 1U),
236 Size2D(1U, 1U),
237 Size2D(1U, 1U),
238 Size2D(25U, 1U),
239 Size2D(0U, 1U),
240 Size2D(1U, 1U),
241 Size2D(1U, 1U),
242 })),
243 framework::dataset::make("Expected", { false, false, false, false, false, false,false, false, true, true })),
244 input_info, weights_info, biases_info, output_info, conv_info, depth_multiplier,dilation, expected)
Jenkins52ba29e2018-08-29 15:32:11 +0000245{
Jenkins4ba87db2019-05-23 17:11:51 +0100246 bool is_valid = bool(NEDepthwiseConvolutionLayer::validate(&input_info.clone()->set_is_resizable(false), &weights_info.clone()->set_is_resizable(false), &biases_info.clone()->set_is_resizable(false), &output_info.clone()->set_is_resizable(false), conv_info, depth_multiplier, ActivationLayerInfo(), dilation));
Jenkins52ba29e2018-08-29 15:32:11 +0000247 ARM_COMPUTE_EXPECT(is_valid == expected, framework::LogLevel::ERRORS);
248}
249// clang-format on
250// *INDENT-ON*
251
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000252TEST_SUITE(Float)
253TEST_SUITE(F32)
254TEST_SUITE(Generic)
255template <typename T>
256using NEDepthwiseConvolutionLayerFixture = DepthwiseConvolutionLayerValidationFixture<Tensor, Accessor, NEDepthwiseConvolutionLayer, T>;
Jenkins4ba87db2019-05-23 17:11:51 +0100257FIXTURE_DATA_TEST_CASE(RunSmall, NEDepthwiseConvolutionLayerFixture<float>, framework::DatasetMode::PRECOMMIT, combine(combine(combine(combine(datasets::SmallDepthwiseConvolutionLayerDataset(),
Jenkinsb3a371b2018-05-23 11:36:53 +0100258 depth_multipliers),
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000259 framework::dataset::make("DataType",
Jenkinsb3a371b2018-05-23 11:36:53 +0100260 DataType::F32)),
Jenkins4ba87db2019-05-23 17:11:51 +0100261 framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })),
262 ActivationFunctionsDataset))
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000263{
264 validate(Accessor(_target), _reference, tolerance_f32);
265}
Jenkins4ba87db2019-05-23 17:11:51 +0100266FIXTURE_DATA_TEST_CASE(RunLarge, NEDepthwiseConvolutionLayerFixture<float>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(datasets::LargeDepthwiseConvolutionLayerDataset(),
Jenkins975dfe12019-09-02 11:47:54 +0100267 large_depth_multipliers),
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000268 framework::dataset::make("DataType",
Jenkinsb3a371b2018-05-23 11:36:53 +0100269 DataType::F32)),
Jenkins4ba87db2019-05-23 17:11:51 +0100270 framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })),
271 ActivationFunctionsDataset))
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000272{
273 validate(Accessor(_target), _reference, tolerance_f32);
274}
Jenkins4ba87db2019-05-23 17:11:51 +0100275
276TEST_SUITE(Dilation)
277FIXTURE_DATA_TEST_CASE(RunSmall, NEDepthwiseConvolutionLayerFixture<float>, framework::DatasetMode::ALL, combine(combine(combine(combine(datasets::SmallDepthwiseDilatedConvolutionLayerDataset(),
278 depth_multipliers),
279 framework::dataset::make("DataType",
280 DataType::F32)),
281 framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })),
282 ActivationFunctionsDataset))
283{
284 validate(Accessor(_target), _reference, tolerance_f32);
285}
286FIXTURE_DATA_TEST_CASE(RunLarge, NEDepthwiseConvolutionLayerFixture<float>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(datasets::LargeDepthwiseDilatedConvolutionLayerDataset(),
Jenkins975dfe12019-09-02 11:47:54 +0100287 large_depth_multipliers),
Jenkins4ba87db2019-05-23 17:11:51 +0100288 framework::dataset::make("DataType",
289 DataType::F32)),
290 framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })),
291 ActivationFunctionsDataset))
292{
293 validate(Accessor(_target), _reference, tolerance_f32);
294}
295TEST_SUITE_END() // Dilation
Jenkinsb9abeae2018-11-22 11:58:08 +0000296TEST_SUITE_END() // Generic
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000297
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000298template <typename T>
Jenkins975dfe12019-09-02 11:47:54 +0100299using NEDepthwiseConvolutionLayerFixtureOptimized = DepthwiseConvolutionLayerValidationFixture<Tensor, Accessor, NEDepthwiseConvolutionLayerOptimized, T>;
300
301TEST_SUITE(W3x3)
302FIXTURE_DATA_TEST_CASE(RunSmall, NEDepthwiseConvolutionLayerFixtureOptimized<float>, framework::DatasetMode::ALL, combine(combine(combine(combine(datasets::SmallDepthwiseConvolutionLayerDataset3x3(),
303 depth_multipliers),
304 framework::dataset::make("DataType",
305 DataType::F32)),
306 framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })),
307 ActivationFunctionsDataset))
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000308{
309 validate(Accessor(_target), _reference, tolerance_f32);
310}
Jenkins975dfe12019-09-02 11:47:54 +0100311FIXTURE_DATA_TEST_CASE(RunLarge, NEDepthwiseConvolutionLayerFixtureOptimized<float>, framework::DatasetMode::NIGHTLY,
312 combine(combine(combine(combine(datasets::LargeDepthwiseConvolutionLayerDataset3x3(),
313 large_depth_multipliers),
314 framework::dataset::make("DataType",
315 DataType::F32)),
316 framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })),
317 ActivationFunctionsDataset))
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000318{
319 validate(Accessor(_target), _reference, tolerance_f32);
320}
Jenkins4ba87db2019-05-23 17:11:51 +0100321TEST_SUITE(Dilation)
Jenkins975dfe12019-09-02 11:47:54 +0100322FIXTURE_DATA_TEST_CASE(RunSmall, NEDepthwiseConvolutionLayerFixtureOptimized<float>, framework::DatasetMode::ALL,
323 combine(combine(combine(combine(datasets::SmallDepthwiseDilatedConvolutionLayerDataset3x3(),
324 depth_multipliers),
325 framework::dataset::make("DataType",
326 DataType::F32)),
327 framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })),
328 ActivationFunctionsDataset))
Jenkins4ba87db2019-05-23 17:11:51 +0100329{
330 validate(Accessor(_target), _reference, tolerance_f32);
331}
Jenkins975dfe12019-09-02 11:47:54 +0100332FIXTURE_DATA_TEST_CASE(RunLarge, NEDepthwiseConvolutionLayerFixtureOptimized<float>, framework::DatasetMode::NIGHTLY,
Jenkins4ba87db2019-05-23 17:11:51 +0100333 combine(combine(combine(combine(datasets::LargeDepthwiseDilatedConvolutionLayerDataset3x3(),
Jenkins975dfe12019-09-02 11:47:54 +0100334 large_depth_multipliers),
Jenkins4ba87db2019-05-23 17:11:51 +0100335 framework::dataset::make("DataType",
336 DataType::F32)),
337 framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })),
338 ActivationFunctionsDataset))
339{
340 validate(Accessor(_target), _reference, tolerance_f32);
341}
342
343TEST_SUITE_END() // Dilation
Jenkins975dfe12019-09-02 11:47:54 +0100344TEST_SUITE_END() // W3x3
Jenkins4ba87db2019-05-23 17:11:51 +0100345
Jenkins975dfe12019-09-02 11:47:54 +0100346TEST_SUITE(Optimized)
347FIXTURE_DATA_TEST_CASE(RunSmall3x3, NEDepthwiseConvolutionLayerFixtureOptimized<float>, framework::DatasetMode::PRECOMMIT,
Jenkins4ba87db2019-05-23 17:11:51 +0100348 combine(combine(combine(combine(datasets::SmallOptimizedDepthwiseConvolutionLayerDataset3x3(),
349 framework::dataset::make("DepthMultiplier", 1)),
350 framework::dataset::make("DataType",
351 DataType::F32)),
352 framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })),
353 ActivationFunctionsDataset))
Jenkins514be652019-02-28 12:25:18 +0000354{
355 validate(Accessor(_target), _reference, tolerance_f32);
356}
Jenkins975dfe12019-09-02 11:47:54 +0100357FIXTURE_DATA_TEST_CASE(RunSmall5x5, NEDepthwiseConvolutionLayerFixtureOptimized<float>, framework::DatasetMode::PRECOMMIT,
358 combine(combine(combine(combine(datasets::SmallOptimizedDepthwiseConvolutionLayerDataset5x5(),
359 framework::dataset::make("DepthMultiplier", 1)),
360 framework::dataset::make("DataType",
361 DataType::F32)),
362 framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })),
363 ActivationFunctionsDataset))
364{
365 validate(Accessor(_target), _reference, tolerance_f32);
366}
367FIXTURE_DATA_TEST_CASE(RunLarge3x3, NEDepthwiseConvolutionLayerFixtureOptimized<float>, framework::DatasetMode::NIGHTLY,
Jenkins4ba87db2019-05-23 17:11:51 +0100368 combine(combine(combine(combine(datasets::LargeOptimizedDepthwiseConvolutionLayerDataset3x3(),
369 framework::dataset::make("DepthMultiplier", 1)),
370 framework::dataset::make("DataType",
371 DataType::F32)),
372 framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })),
373 ActivationFunctionsDataset))
Anthony Barbier06ea0482018-02-22 15:45:35 +0000374{
375 validate(Accessor(_target), _reference, tolerance_f32);
376}
Jenkins975dfe12019-09-02 11:47:54 +0100377TEST_SUITE_END() // Optimized
Jenkinsb9abeae2018-11-22 11:58:08 +0000378TEST_SUITE_END() // F32
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000379
Jenkinsb9abeae2018-11-22 11:58:08 +0000380#ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC
381TEST_SUITE(F16)
Jenkins514be652019-02-28 12:25:18 +0000382TEST_SUITE(Generic)
383template <typename T>
384using NEDepthwiseConvolutionLayerFixture = DepthwiseConvolutionLayerValidationFixture<Tensor, Accessor, NEDepthwiseConvolutionLayer, T>;
Jenkins4ba87db2019-05-23 17:11:51 +0100385FIXTURE_DATA_TEST_CASE(RunSmall, NEDepthwiseConvolutionLayerFixture<half>, framework::DatasetMode::PRECOMMIT, combine(combine(combine(combine(datasets::SmallDepthwiseConvolutionLayerDataset(),
Jenkins514be652019-02-28 12:25:18 +0000386 depth_multipliers),
387 framework::dataset::make("DataType",
388 DataType::F16)),
Jenkins4ba87db2019-05-23 17:11:51 +0100389 framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })),
390 ActivationFunctionsDataset))
Jenkins514be652019-02-28 12:25:18 +0000391{
392 validate(Accessor(_target), _reference, tolerance_f16, tolerance_num);
393}
Jenkins4ba87db2019-05-23 17:11:51 +0100394FIXTURE_DATA_TEST_CASE(RunLarge, NEDepthwiseConvolutionLayerFixture<half>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(datasets::LargeDepthwiseConvolutionLayerDataset(),
Jenkins975dfe12019-09-02 11:47:54 +0100395 large_depth_multipliers),
Jenkins514be652019-02-28 12:25:18 +0000396 framework::dataset::make("DataType",
397 DataType::F16)),
Jenkins4ba87db2019-05-23 17:11:51 +0100398 framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })),
399 ActivationFunctionsDataset))
Jenkins514be652019-02-28 12:25:18 +0000400{
401 validate(Accessor(_target), _reference, tolerance_f16, tolerance_num);
402}
Jenkins4ba87db2019-05-23 17:11:51 +0100403
404TEST_SUITE(Dilation)
405FIXTURE_DATA_TEST_CASE(RunSmall, NEDepthwiseConvolutionLayerFixture<half>, framework::DatasetMode::ALL, combine(combine(combine(combine(datasets::SmallDepthwiseDilatedConvolutionLayerDataset(),
406 depth_multipliers),
407 framework::dataset::make("DataType",
408 DataType::F16)),
409 framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })),
410 ActivationFunctionsDataset))
411{
412 validate(Accessor(_target), _reference, tolerance_f16, tolerance_num);
413}
414FIXTURE_DATA_TEST_CASE(RunLarge, NEDepthwiseConvolutionLayerFixture<half>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(datasets::LargeDepthwiseDilatedConvolutionLayerDataset(),
Jenkins975dfe12019-09-02 11:47:54 +0100415 large_depth_multipliers),
Jenkins4ba87db2019-05-23 17:11:51 +0100416 framework::dataset::make("DataType",
417 DataType::F16)),
418 framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })),
419 ActivationFunctionsDataset))
420{
421 validate(Accessor(_target), _reference, tolerance_f16, tolerance_num);
422}
423TEST_SUITE_END() // Dilation
424
Jenkins514be652019-02-28 12:25:18 +0000425TEST_SUITE_END() // Generic
Jenkinsb9abeae2018-11-22 11:58:08 +0000426template <typename T>
Jenkins975dfe12019-09-02 11:47:54 +0100427using NEDepthwiseConvolutionLayerFixtureOptimized = DepthwiseConvolutionLayerValidationFixture<Tensor, Accessor, NEDepthwiseConvolutionLayerOptimized, T>;
428TEST_SUITE(W3x3)
429FIXTURE_DATA_TEST_CASE(RunSmall, NEDepthwiseConvolutionLayerFixtureOptimized<half>, framework::DatasetMode::ALL, combine(combine(combine(combine(datasets::SmallDepthwiseConvolutionLayerDataset3x3(),
430 depth_multipliers),
431 framework::dataset::make("DataType",
432 DataType::F16)),
433 framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })),
434 ActivationFunctionsDataset))
Jenkinsb9abeae2018-11-22 11:58:08 +0000435{
436 validate(Accessor(_target), _reference, tolerance_f16);
437}
Jenkins975dfe12019-09-02 11:47:54 +0100438FIXTURE_DATA_TEST_CASE(RunLarge, NEDepthwiseConvolutionLayerFixtureOptimized<half>, framework::DatasetMode::NIGHTLY,
439 combine(combine(combine(combine(datasets::LargeDepthwiseConvolutionLayerDataset3x3(),
440 large_depth_multipliers),
441 framework::dataset::make("DataType",
442 DataType::F16)),
443 framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })),
444 ActivationFunctionsDataset))
Jenkinsb9abeae2018-11-22 11:58:08 +0000445{
446 validate(Accessor(_target), _reference, tolerance_f16);
447}
Jenkins4ba87db2019-05-23 17:11:51 +0100448
449TEST_SUITE(Dilation)
450
Jenkins975dfe12019-09-02 11:47:54 +0100451FIXTURE_DATA_TEST_CASE(RunSmall, NEDepthwiseConvolutionLayerFixtureOptimized<half>, framework::DatasetMode::ALL,
452 combine(combine(combine(combine(datasets::SmallDepthwiseDilatedConvolutionLayerDataset3x3(),
453 depth_multipliers),
454 framework::dataset::make("DataType",
455 DataType::F16)),
456 framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })),
457 ActivationFunctionsDataset))
Jenkins4ba87db2019-05-23 17:11:51 +0100458{
459 validate(Accessor(_target), _reference, tolerance_f16);
460}
Jenkins975dfe12019-09-02 11:47:54 +0100461FIXTURE_DATA_TEST_CASE(RunLarge, NEDepthwiseConvolutionLayerFixtureOptimized<half>, framework::DatasetMode::NIGHTLY,
Jenkins4ba87db2019-05-23 17:11:51 +0100462 combine(combine(combine(combine(datasets::LargeDepthwiseDilatedConvolutionLayerDataset3x3(),
Jenkins975dfe12019-09-02 11:47:54 +0100463 large_depth_multipliers),
Jenkins4ba87db2019-05-23 17:11:51 +0100464 framework::dataset::make("DataType",
465 DataType::F16)),
466 framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })),
467 ActivationFunctionsDataset))
468{
469 validate(Accessor(_target), _reference, tolerance_f16);
470}
471
472TEST_SUITE_END() // Dilation
Jenkins975dfe12019-09-02 11:47:54 +0100473TEST_SUITE_END() // W3x3
Jenkins4ba87db2019-05-23 17:11:51 +0100474
Jenkins975dfe12019-09-02 11:47:54 +0100475TEST_SUITE(Optimized)
476FIXTURE_DATA_TEST_CASE(RunSmallW3x3, NEDepthwiseConvolutionLayerFixtureOptimized<half>, framework::DatasetMode::PRECOMMIT,
Jenkins4ba87db2019-05-23 17:11:51 +0100477 combine(combine(combine(combine(datasets::SmallOptimizedDepthwiseConvolutionLayerDataset3x3(),
478 framework::dataset::make("DepthMultiplier", 1)),
479 framework::dataset::make("DataType",
480 DataType::F16)),
481 framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })),
482 ActivationFunctionsDataset))
Jenkins514be652019-02-28 12:25:18 +0000483{
484 validate(Accessor(_target), _reference, tolerance_f16);
485}
Jenkins975dfe12019-09-02 11:47:54 +0100486FIXTURE_DATA_TEST_CASE(RunSmallW5x5, NEDepthwiseConvolutionLayerFixtureOptimized<half>, framework::DatasetMode::PRECOMMIT,
487 combine(combine(combine(combine(datasets::SmallOptimizedDepthwiseConvolutionLayerDataset5x5(),
488 framework::dataset::make("DepthMultiplier", 1)),
489 framework::dataset::make("DataType",
490 DataType::F16)),
491 framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })),
492 ActivationFunctionsDataset))
493{
494 validate(Accessor(_target), _reference, tolerance_f16);
495}
496FIXTURE_DATA_TEST_CASE(RunLargeW3x3, NEDepthwiseConvolutionLayerFixtureOptimized<half>, framework::DatasetMode::NIGHTLY,
Jenkins4ba87db2019-05-23 17:11:51 +0100497 combine(combine(combine(combine(datasets::LargeOptimizedDepthwiseConvolutionLayerDataset3x3(),
498 framework::dataset::make("DepthMultiplier", 1)),
499 framework::dataset::make("DataType",
500 DataType::F16)),
501 framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })),
502 ActivationFunctionsDataset))
Jenkinsb9abeae2018-11-22 11:58:08 +0000503{
504 validate(Accessor(_target), _reference, tolerance_f16);
505}
Jenkins975dfe12019-09-02 11:47:54 +0100506TEST_SUITE_END() // Optimized
Jenkinsb9abeae2018-11-22 11:58:08 +0000507TEST_SUITE_END() // FP16
508#endif // __ARM_FEATURE_FP16_VECTOR_ARITHMETIC
509
510TEST_SUITE_END() // Float
Anthony Barbierf45d5a92018-01-24 16:23:15 +0000511
512template <typename T>
Jenkins975dfe12019-09-02 11:47:54 +0100513using NEDepthwiseConvolutionLayerQuantizedFixtureOptimized = DepthwiseConvolutionLayerValidationQuantizedFixture<Tensor, Accessor, NEDepthwiseConvolutionLayerOptimized, T>;
Anthony Barbier06ea0482018-02-22 15:45:35 +0000514template <typename T>
515using NEDepthwiseConvolutionLayerQuantizedFixture = DepthwiseConvolutionLayerValidationQuantizedFixture<Tensor, Accessor, NEDepthwiseConvolutionLayer, T>;
Anthony Barbierf45d5a92018-01-24 16:23:15 +0000516
517TEST_SUITE(Quantized)
518TEST_SUITE(QASYMM8)
Anthony Barbier06ea0482018-02-22 15:45:35 +0000519TEST_SUITE(Generic)
Jenkinsb3a371b2018-05-23 11:36:53 +0100520FIXTURE_DATA_TEST_CASE(RunSmall, NEDepthwiseConvolutionLayerQuantizedFixture<uint8_t>, framework::DatasetMode::PRECOMMIT,
Jenkins975dfe12019-09-02 11:47:54 +0100521 combine(combine(combine(combine(combine(combine(datasets::SmallDepthwiseConvolutionLayerDataset(),
522 depth_multipliers),
523 framework::dataset::make("DataType", DataType::QASYMM8)),
524 framework::dataset::make("SrcQuantizationInfo", { QuantizationInfo(0.3f, 10) })),
525 framework::dataset::make("DstQuantizationInfo", { QuantizationInfo(0.5f, 4) })),
Jenkins4ba87db2019-05-23 17:11:51 +0100526 framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })),
527 ActivationFunctionsDataset))
Anthony Barbier06ea0482018-02-22 15:45:35 +0000528{
529 validate(Accessor(_target), _reference, tolerance_qasymm8);
530}
Jenkins4ba87db2019-05-23 17:11:51 +0100531
532TEST_SUITE(Dilation)
533FIXTURE_DATA_TEST_CASE(RunSmall, NEDepthwiseConvolutionLayerQuantizedFixture<uint8_t>, framework::DatasetMode::PRECOMMIT,
Jenkins975dfe12019-09-02 11:47:54 +0100534 combine(combine(combine(combine(combine(combine(datasets::SmallDepthwiseDilatedConvolutionLayerDataset(),
535 depth_multipliers),
536 framework::dataset::make("DataType", DataType::QASYMM8)),
537 framework::dataset::make("SrcQuantizationInfo", { QuantizationInfo(0.5f, 10) })),
538 framework::dataset::make("DstQuantizationInfo", { QuantizationInfo(0.8f, 1) })),
Jenkins4ba87db2019-05-23 17:11:51 +0100539 framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })),
540 ActivationFunctionsDataset))
541{
542 validate(Accessor(_target), _reference, tolerance_qasymm8);
543}
544FIXTURE_DATA_TEST_CASE(RunLarge, NEDepthwiseConvolutionLayerQuantizedFixture<uint8_t>, framework::DatasetMode::NIGHTLY,
Jenkins975dfe12019-09-02 11:47:54 +0100545 combine(combine(combine(combine(combine(combine(datasets::LargeDepthwiseDilatedConvolutionLayerDataset(),
546 large_depth_multipliers),
547 framework::dataset::make("DataType", DataType::QASYMM8)),
548 framework::dataset::make("SrcQuantizationInfo", { QuantizationInfo(0.5f, 10) })),
549 framework::dataset::make("DstQuantizationInfo", { QuantizationInfo(0.9f, 11) })),
Jenkins4ba87db2019-05-23 17:11:51 +0100550 framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })),
551 ActivationFunctionsDataset))
552{
553 validate(Accessor(_target), _reference, tolerance_qasymm8);
554}
Jenkins975dfe12019-09-02 11:47:54 +0100555TEST_SUITE_END() // Dilation
Jenkins514be652019-02-28 12:25:18 +0000556TEST_SUITE_END() // Generic
Anthony Barbierf45d5a92018-01-24 16:23:15 +0000557TEST_SUITE(W3x3)
Jenkins975dfe12019-09-02 11:47:54 +0100558FIXTURE_DATA_TEST_CASE(RunSmall, NEDepthwiseConvolutionLayerQuantizedFixtureOptimized<uint8_t>, framework::DatasetMode::PRECOMMIT,
559 combine(combine(combine(combine(combine(combine(datasets::SmallDepthwiseConvolutionLayerDataset3x3(), depth_multipliers),
560 framework::dataset::make("DataType", DataType::QASYMM8)),
561 framework::dataset::make("SrcQuantizationInfo", { QuantizationInfo(0.3f, 10) })),
562 framework::dataset::make("DstQuantizationInfo", { QuantizationInfo(0.5f, 10) })),
Jenkins4ba87db2019-05-23 17:11:51 +0100563 framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })),
564 ActivationFunctionsDataset))
Anthony Barbierf45d5a92018-01-24 16:23:15 +0000565{
566 validate(Accessor(_target), _reference, tolerance_qasymm8);
567}
Jenkins975dfe12019-09-02 11:47:54 +0100568FIXTURE_DATA_TEST_CASE(RunLarge, NEDepthwiseConvolutionLayerQuantizedFixtureOptimized<uint8_t>, framework::DatasetMode::NIGHTLY,
569 combine(combine(combine(combine(combine(combine(datasets::LargeDepthwiseConvolutionLayerDataset3x3(),
570 large_depth_multipliers),
571 framework::dataset::make("DataType", DataType::QASYMM8)),
572 framework::dataset::make("SrcQuantizationInfo", { QuantizationInfo(0.5f, 10) })),
573 framework::dataset::make("DstQuantizationInfo", { QuantizationInfo(0.5f, 10) })),
Jenkins4ba87db2019-05-23 17:11:51 +0100574 framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })),
575 ActivationFunctionsDataset))
Anthony Barbierf45d5a92018-01-24 16:23:15 +0000576{
577 validate(Accessor(_target), _reference, tolerance_qasymm8);
578}
Jenkins4ba87db2019-05-23 17:11:51 +0100579
580TEST_SUITE(Dilation)
581
Jenkins975dfe12019-09-02 11:47:54 +0100582FIXTURE_DATA_TEST_CASE(RunSmall, NEDepthwiseConvolutionLayerQuantizedFixtureOptimized<uint8_t>, framework::DatasetMode::PRECOMMIT,
583 combine(combine(combine(combine(combine(combine(datasets::SmallDepthwiseDilatedConvolutionLayerDataset3x3(), depth_multipliers),
584 framework::dataset::make("DataType", DataType::QASYMM8)),
585 framework::dataset::make("SrcQuantizationInfo", { QuantizationInfo(0.5f, 10) })),
586 framework::dataset::make("DstQuantizationInfo", { QuantizationInfo(0.7f, 10) })),
Jenkins4ba87db2019-05-23 17:11:51 +0100587 framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })),
588 ActivationFunctionsDataset))
589{
590 validate(Accessor(_target), _reference, tolerance_qasymm8);
591}
Jenkins975dfe12019-09-02 11:47:54 +0100592FIXTURE_DATA_TEST_CASE(RunLarge, NEDepthwiseConvolutionLayerQuantizedFixtureOptimized<uint8_t>, framework::DatasetMode::NIGHTLY,
593 combine(combine(combine(combine(combine(combine(datasets::LargeDepthwiseDilatedConvolutionLayerDataset3x3(),
594 large_depth_multipliers),
595 framework::dataset::make("DataType", DataType::QASYMM8)),
596 framework::dataset::make("SrcQuantizationInfo", { QuantizationInfo(0.5f, 10) })),
597 framework::dataset::make("DstQuantizationInfo", { QuantizationInfo(0.5f, 10) })),
Jenkins4ba87db2019-05-23 17:11:51 +0100598 framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })),
599 ActivationFunctionsDataset))
600{
601 validate(Accessor(_target), _reference, tolerance_qasymm8);
602}
603TEST_SUITE_END() // Dilation
Jenkins514be652019-02-28 12:25:18 +0000604TEST_SUITE_END() // W3x3
Jenkins975dfe12019-09-02 11:47:54 +0100605
606TEST_SUITE(Optimized)
607FIXTURE_DATA_TEST_CASE(RunSmall3x3, NEDepthwiseConvolutionLayerQuantizedFixtureOptimized<uint8_t>, framework::DatasetMode::PRECOMMIT,
608 combine(combine(combine(combine(combine(combine(datasets::SmallOptimizedDepthwiseConvolutionLayerDataset3x3(),
609 framework::dataset::make("DepthMultiplier", 1)),
610 framework::dataset::make("DataType",
611 DataType::QASYMM8)),
612 framework::dataset::make("SrcQuantizationInfo", { QuantizationInfo(0.5f, 10) })),
613 framework::dataset::make("DstQuantizationInfo", { QuantizationInfo(0.5f, 10) })),
614 framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })),
615 ActivationFunctionsDataset))
616{
617 validate(Accessor(_target), _reference, tolerance_qasymm8);
618}
619FIXTURE_DATA_TEST_CASE(RunSmall5x5, NEDepthwiseConvolutionLayerQuantizedFixtureOptimized<uint8_t>, framework::DatasetMode::PRECOMMIT,
620 combine(combine(combine(combine(combine(combine(datasets::SmallOptimizedDepthwiseConvolutionLayerDataset5x5(),
621 framework::dataset::make("DepthMultiplier", 1)),
622 framework::dataset::make("DataType",
623 DataType::QASYMM8)),
624 framework::dataset::make("SrcQuantizationInfo", { QuantizationInfo(0.5f, 10) })),
625 framework::dataset::make("DstQuantizationInfo", { QuantizationInfo(0.5f, 10) })),
626 framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })),
627 ActivationFunctionsDataset))
628{
629 validate(Accessor(_target), _reference, tolerance_qasymm8);
630}
631FIXTURE_DATA_TEST_CASE(RunLarge3x3, NEDepthwiseConvolutionLayerQuantizedFixtureOptimized<uint8_t>, framework::DatasetMode::NIGHTLY,
632 combine(combine(combine(combine(combine(combine(datasets::LargeOptimizedDepthwiseConvolutionLayerDataset3x3(),
633 framework::dataset::make("DepthMultiplier", 1)),
634 framework::dataset::make("DataType",
635 DataType::QASYMM8)),
636 framework::dataset::make("SrcQuantizationInfo", { QuantizationInfo(0.5f, 10) })),
637 framework::dataset::make("DstQuantizationInfo", { QuantizationInfo(0.5f, 10) })),
638 framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })),
639 ActivationFunctionsDataset))
640{
641 validate(Accessor(_target), _reference, tolerance_qasymm8);
642}
643TEST_SUITE_END() // Optimized
Jenkins514be652019-02-28 12:25:18 +0000644TEST_SUITE_END() // QASYMM8
645TEST_SUITE_END() // Quantized
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000646
Jenkins514be652019-02-28 12:25:18 +0000647TEST_SUITE_END() // DepthwiseConvLayer
648TEST_SUITE_END() // NEON
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000649} // namespace validation
650} // namespace test
651} // namespace arm_compute