blob: 093d342ce1731865f44d9f22fc77e41ea766d291 [file] [log] [blame]
Anthony Barbier8140e1e2017-12-14 23:48:46 +00001/*
Anthony Barbierf45d5a92018-01-24 16:23:15 +00002 * Copyright (c) 2017-2018 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,
21 * OUT OF OR IN CONCLCTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 * SOFTWARE.
23 */
24#include "arm_compute/core/Types.h"
25#include "arm_compute/runtime/CL/CLTensor.h"
26#include "arm_compute/runtime/CL/CLTensorAllocator.h"
27#include "arm_compute/runtime/CL/functions/CLDepthwiseConvolutionLayer.h"
28#include "tests/CL/CLAccessor.h"
29#include "tests/PaddingCalculator.h"
30#include "tests/datasets/DepthwiseConvolutionLayerDataset.h"
31#include "tests/framework/Asserts.h"
32#include "tests/framework/Macros.h"
33#include "tests/framework/datasets/Datasets.h"
34#include "tests/validation/Validation.h"
35#include "tests/validation/fixtures/DepthwiseConvolutionLayerFixture.h"
36
37namespace arm_compute
38{
39namespace test
40{
41namespace validation
42{
43namespace
44{
Anthony Barbier06ea0482018-02-22 15:45:35 +000045RelativeTolerance<half_float::half> tolerance_f16(half_float::half(0.001)); /**< Tolerance value for comparing reference's output against implementation's output for DataType::F16 */
46constexpr RelativeTolerance<float> tolerance_f32(0.01f); /**< Tolerance value for comparing reference's output against implementation's output for DataType::F32 */
47constexpr AbsoluteTolerance<uint8_t> tolerance_qasymm8(1); /**< Tolerance value for comparing reference's output against implementation's output for DataType::QASYMM8 */
Jenkinsb3a371b2018-05-23 11:36:53 +010048constexpr float tolerance_num = 0.05f; /**< Tolerance number */
49
50const auto depth_multipliers = framework::dataset::make("DepthMultiplier", { 1, 2, 3 });
Anthony Barbier8140e1e2017-12-14 23:48:46 +000051} // namespace
52
53TEST_SUITE(CL)
54TEST_SUITE(DepthwiseConvolutionLayer)
55
Jenkinsb3a371b2018-05-23 11:36:53 +010056// *INDENT-OFF*
57// clang-format off
58DATA_TEST_CASE(Validate3x3, framework::DatasetMode::ALL, zip(zip(zip(zip(zip(zip(zip(
59 framework::dataset::make("InputInfo", { TensorInfo(TensorShape(32U, 18U, 2U), 1, DataType::F32, 0), // Mismatching data type input/weights
60 TensorInfo(TensorShape(32U, 18U, 3U), 1, DataType::F32, 0), // Mismatching input feature maps
61 TensorInfo(TensorShape(32U, 18U, 2U), 1, DataType::F32, 0), // Unsupported weights dimensions
62 TensorInfo(TensorShape(32U, 18U, 2U), 1, DataType::QASYMM8, 0), // Unsupported activation
63 TensorInfo(TensorShape(32U, 18U, 2U), 1, DataType::F32, 0), // Mismatching depth multiplier
64 TensorInfo(TensorShape(32U, 18U, 2U), 1, DataType::F32, 0), // Invalid stride
65 TensorInfo(TensorShape(32U, 18U, 2U), 1, DataType::F32, 0), // Invalid biases size
66 TensorInfo(TensorShape(32U, 18U, 2U), 1, DataType::F32, 0), // Invalid biases dimensions
67 TensorInfo(TensorShape(32U, 18U, 2U), 1, DataType::F32, 0), // Invalid output size
68 TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32, 0), // Window shrink
69 TensorInfo(TensorShape(32U, 18U, 8U), 1, DataType::F32, 0),
70 TensorInfo(TensorShape(50U, 32U, 8U), 1, DataType::QASYMM8, 0),
71 }),
72 framework::dataset::make("WeightsInfo", { TensorInfo(TensorShape(3U, 3U, 2U), 1, DataType::F16, 0),
73 TensorInfo(TensorShape(3U, 3U, 2U), 1, DataType::F32, 0),
74 TensorInfo(TensorShape(5U, 5U, 2U), 1, DataType::F32, 0),
75 TensorInfo(TensorShape(3U, 3U, 2U), 1, DataType::QASYMM8, 0),
76 TensorInfo(TensorShape(3U, 3U, 2U), 1, DataType::F32, 0),
77 TensorInfo(TensorShape(3U, 3U, 2U), 1, DataType::F32, 0),
78 TensorInfo(TensorShape(3U, 3U, 2U), 1, DataType::F32, 0),
79 TensorInfo(TensorShape(3U, 3U, 2U), 1, DataType::F32, 0),
80 TensorInfo(TensorShape(3U, 3U, 2U), 1, DataType::F32, 0),
81 TensorInfo(TensorShape(3U, 3U, 2U), 1, DataType::F32, 0),
82 TensorInfo(TensorShape(3U, 3U, 16U), 1, DataType::F32, 0),
83 TensorInfo(TensorShape(3U, 3U, 24U), 1, DataType::QASYMM8, 0),
84 })),
85 framework::dataset::make("BiasesInfo", { TensorInfo(TensorShape(2U), 1, DataType::F32, 0),
86 TensorInfo(TensorShape(2U), 1, DataType::F32, 0),
87 TensorInfo(TensorShape(2U), 1, DataType::F32, 0),
88 TensorInfo(TensorShape(2U), 1, DataType::S32, 0),
89 TensorInfo(TensorShape(2U), 1, DataType::F32, 0),
90 TensorInfo(TensorShape(2U), 1, DataType::F32, 0),
91 TensorInfo(TensorShape(4U), 1, DataType::F32, 0),
92 TensorInfo(TensorShape(2U, 2U), 1, DataType::F32, 0),
93 TensorInfo(TensorShape(2U), 1, DataType::F32, 0),
94 TensorInfo(TensorShape(2U), 1, DataType::F32, 0),
95 TensorInfo(TensorShape(16U), 1, DataType::F32, 0),
96 TensorInfo(TensorShape(24U), 1, DataType::S32, 0),
97 })),
98 framework::dataset::make("OutputInfo", { TensorInfo(TensorShape(30U, 16U, 2U), 1, DataType::F32, 0),
99 TensorInfo(TensorShape(30U, 16U, 2U), 1, DataType::F32, 0),
100 TensorInfo(TensorShape(30U, 16U, 2U), 1, DataType::F32, 0),
101 TensorInfo(TensorShape(30U, 16U, 2U), 1, DataType::QASYMM8, 0),
102 TensorInfo(TensorShape(30U, 16U, 2U), 1, DataType::F32, 0),
103 TensorInfo(TensorShape(30U, 16U, 2U), 1, DataType::F32, 0),
104 TensorInfo(TensorShape(30U, 16U, 2U), 1, DataType::F32, 0),
105 TensorInfo(TensorShape(30U, 16U, 2U), 1, DataType::F32, 0),
106 TensorInfo(TensorShape(32U, 18U, 2U), 1, DataType::F32, 0),
107 TensorInfo(TensorShape(25U, 11U, 2U), 1, DataType::F32, 0),
108 TensorInfo(TensorShape(30U, 16U, 16U), 1, DataType::F32, 0),
109 TensorInfo(TensorShape(48U, 30U, 24U), 1, DataType::QASYMM8, 0),
110 })),
111 framework::dataset::make("ConvInfo", { PadStrideInfo(1, 1, 0, 0),
112 PadStrideInfo(1, 1, 0, 0),
113 PadStrideInfo(1, 1, 0, 0),
114 PadStrideInfo(1, 1, 0, 0),
115 PadStrideInfo(1, 1, 0, 0),
116 PadStrideInfo(4, 1, 0, 0),
117 PadStrideInfo(1, 1, 0, 0),
118 PadStrideInfo(1, 1, 0, 0),
119 PadStrideInfo(1, 1, 0, 0),
120 PadStrideInfo(1, 1, 0, 0),
121 PadStrideInfo(1, 1, 0, 0),
122 PadStrideInfo(1, 1, 0, 0),
123 })),
124 framework::dataset::make("DepthMultiplier", { 1,
125 1,
126 1,
127 1,
128 3,
129 1,
130 1,
131 1,
132 1,
133 1,
134 2,
135 3,
136 })),
137 framework::dataset::make("ActivationInfo", { ActivationLayerInfo(),
138 ActivationLayerInfo(),
139 ActivationLayerInfo(),
140 ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::LINEAR),
141 ActivationLayerInfo(),
142 ActivationLayerInfo(),
143 ActivationLayerInfo(),
144 ActivationLayerInfo(),
145 ActivationLayerInfo(),
146 ActivationLayerInfo(),
147 ActivationLayerInfo(),
148 ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU),
149 })),
150 framework::dataset::make("Expected", { false, false, false, false, false, false, false, false, false, false, true, true })),
151 input_info, weights_info, biases_info, output_info, conv_info, depth_multiplier, act_info, expected)
152{
153 bool is_valid = bool(CLDepthwiseConvolutionLayer3x3::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, act_info));
154 ARM_COMPUTE_EXPECT(is_valid == expected, framework::LogLevel::ERRORS);
155}
156
157DATA_TEST_CASE(ValidateGeneric, framework::DatasetMode::ALL, zip(zip(zip(zip(zip(zip(
158 framework::dataset::make("InputInfo", { TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32, 0), // Mismatching data type input/weights
159 TensorInfo(TensorShape(27U, 13U, 3U), 1, DataType::F32, 0), // Mismatching input feature maps
160 TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32, 0), // Mismatching depth multiplier
161 TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32, 0), // Invalid biases size
162 TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32, 0), // Invalid biases dimensions
163 TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32, 0), // Invalid output size
164 TensorInfo(TensorShape(27U, 13U, 8U), 1, DataType::F32, 0),
165 TensorInfo(TensorShape(32U, 13U, 8U), 1, DataType::QASYMM8, 0),
166 }),
167 framework::dataset::make("WeightsInfo", { TensorInfo(TensorShape(3U, 3U, 2U), 1, DataType::F16, 0),
168 TensorInfo(TensorShape(3U, 3U, 2U), 1, DataType::F32, 0),
169 TensorInfo(TensorShape(3U, 3U, 2U), 1, DataType::F32, 0),
170 TensorInfo(TensorShape(3U, 3U, 2U), 1, DataType::F32, 0),
171 TensorInfo(TensorShape(3U, 3U, 2U), 1, DataType::F32, 0),
172 TensorInfo(TensorShape(3U, 3U, 2U), 1, DataType::F32, 0),
173 TensorInfo(TensorShape(3U, 3U, 16U), 1, DataType::F32, 0),
174 TensorInfo(TensorShape(3U, 3U, 24U), 1, DataType::QASYMM8, 0),
175 })),
176 framework::dataset::make("BiasesInfo", { TensorInfo(TensorShape(2U), 1, DataType::F32, 0),
177 TensorInfo(TensorShape(2U), 1, DataType::F32, 0),
178 TensorInfo(TensorShape(2U), 1, DataType::F32, 0),
179 TensorInfo(TensorShape(4U), 1, DataType::F32, 0),
180 TensorInfo(TensorShape(2U, 2U), 1, DataType::F32, 0),
181 TensorInfo(TensorShape(2U), 1, DataType::F32, 0),
182 TensorInfo(TensorShape(16U), 1, DataType::F32, 0),
183 TensorInfo(TensorShape(24U), 1, DataType::S32, 0),
184 })),
185 framework::dataset::make("OutputInfo", { TensorInfo(TensorShape(25U, 11U, 2U), 1, DataType::F32, 0),
186 TensorInfo(TensorShape(25U, 11U, 2U), 1, DataType::F32, 0),
187 TensorInfo(TensorShape(25U, 11U, 2U), 1, DataType::F32, 0),
188 TensorInfo(TensorShape(25U, 11U, 2U), 1, DataType::F32, 0),
189 TensorInfo(TensorShape(25U, 11U, 2U), 1, DataType::F32, 0),
190 TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32, 0),
191 TensorInfo(TensorShape(25U, 11U, 16U), 1, DataType::F32, 0),
192 TensorInfo(TensorShape(32U, 11U, 24U), 1, DataType::QASYMM8, 0),
193 })),
194 framework::dataset::make("ConvInfo", { PadStrideInfo(1, 1, 0, 0),
195 PadStrideInfo(1, 1, 0, 0),
196 PadStrideInfo(1, 1, 0, 0),
197 PadStrideInfo(1, 1, 0, 0),
198 PadStrideInfo(1, 1, 0, 0),
199 PadStrideInfo(1, 1, 0, 0),
200 PadStrideInfo(1, 1, 0, 0),
201 PadStrideInfo(1, 1, 1, 0),
202 })),
203 framework::dataset::make("DepthMultiplier", { 1,
204 1,
205 3,
206 1,
207 1,
208 1,
209 2,
210 3,
211 })),
212 framework::dataset::make("Expected", { false, false, false, false, false, false, true, true })),
213 input_info, weights_info, biases_info, output_info, conv_info, depth_multiplier, expected)
214{
215 bool is_valid = bool(CLDepthwiseConvolutionLayer::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));
216 ARM_COMPUTE_EXPECT(is_valid == expected, framework::LogLevel::ERRORS);
217}
218// clang-format on
219// *INDENT-ON*
220
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000221template <typename T>
222using CLDepthwiseConvolutionLayerFixture = DepthwiseConvolutionLayerValidationFixture<CLTensor, CLAccessor, CLDepthwiseConvolutionLayer, T>;
223
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000224template <typename T>
225using CLDepthwiseConvolutionLayerFixture3x3 = DepthwiseConvolutionLayerValidationFixture<CLTensor, CLAccessor, CLDepthwiseConvolutionLayer3x3, T>;
226
227TEST_SUITE(Float)
Jenkinsb3a371b2018-05-23 11:36:53 +0100228TEST_SUITE(FP16)
Anthony Barbier06ea0482018-02-22 15:45:35 +0000229TEST_SUITE(W3x3)
Jenkinsb3a371b2018-05-23 11:36:53 +0100230FIXTURE_DATA_TEST_CASE(RunSmall, CLDepthwiseConvolutionLayerFixture3x3<half>, framework::DatasetMode::ALL,
231 combine(combine(combine(framework::dataset::concat(datasets::SmallDepthwiseConvolutionLayerDataset3x3(),
232 datasets::SmallDepthwiseConvolutionLayerDataset3x3NCHW()),
233 depth_multipliers),
234 framework::dataset::make("DataType",
235 DataType::F16)),
236 framework::dataset::make("DataLayout", DataLayout::NCHW)))
Anthony Barbier06ea0482018-02-22 15:45:35 +0000237{
238 validate(CLAccessor(_target), _reference, tolerance_f16);
239}
Jenkinsb3a371b2018-05-23 11:36:53 +0100240FIXTURE_DATA_TEST_CASE(RunLarge, CLDepthwiseConvolutionLayerFixture3x3<half>, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::LargeDepthwiseConvolutionLayerDataset3x3(),
241 depth_multipliers),
Anthony Barbier06ea0482018-02-22 15:45:35 +0000242 framework::dataset::make("DataType",
Jenkinsb3a371b2018-05-23 11:36:53 +0100243 DataType::F16)),
244 framework::dataset::make("DataLayout", DataLayout::NCHW)))
Anthony Barbier06ea0482018-02-22 15:45:35 +0000245{
246 validate(CLAccessor(_target), _reference, tolerance_f16);
247}
248TEST_SUITE_END()
Jenkinsb3a371b2018-05-23 11:36:53 +0100249
250TEST_SUITE(Generic)
251FIXTURE_DATA_TEST_CASE(RunSmall, CLDepthwiseConvolutionLayerFixture<half>, framework::DatasetMode::ALL, combine(combine(combine(datasets::SmallDepthwiseConvolutionLayerDataset(), depth_multipliers),
252 framework::dataset::make("DataType",
253 DataType::F16)),
254 framework::dataset::make("DataLayout", DataLayout::NCHW)))
255{
256 validate(CLAccessor(_target), _reference, tolerance_f16, tolerance_num);
257}
258FIXTURE_DATA_TEST_CASE(RunLarge, CLDepthwiseConvolutionLayerFixture<half>, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::LargeDepthwiseConvolutionLayerDataset(),
259 depth_multipliers),
260 framework::dataset::make("DataType",
261 DataType::F16)),
262 framework::dataset::make("DataLayout", DataLayout::NCHW)))
263{
264 validate(CLAccessor(_target), _reference, tolerance_f16, tolerance_num);
265}
266TEST_SUITE_END()
Anthony Barbier06ea0482018-02-22 15:45:35 +0000267TEST_SUITE_END()
268
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000269TEST_SUITE(FP32)
270TEST_SUITE(W3x3)
Jenkinsb3a371b2018-05-23 11:36:53 +0100271FIXTURE_DATA_TEST_CASE(RunSmall, CLDepthwiseConvolutionLayerFixture3x3<float>, framework::DatasetMode::ALL,
272 combine(combine(combine(framework::dataset::concat(datasets::SmallDepthwiseConvolutionLayerDataset3x3(),
273 datasets::SmallDepthwiseConvolutionLayerDataset3x3NCHW()),
274 depth_multipliers),
275 framework::dataset::make("DataType",
276 DataType::F32)),
277 framework::dataset::make("DataLayout", DataLayout::NCHW)))
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000278{
279 validate(CLAccessor(_target), _reference, tolerance_f32);
280}
Jenkinsb3a371b2018-05-23 11:36:53 +0100281FIXTURE_DATA_TEST_CASE(RunLarge, CLDepthwiseConvolutionLayerFixture3x3<float>, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::LargeDepthwiseConvolutionLayerDataset3x3(),
282 depth_multipliers),
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000283 framework::dataset::make("DataType",
Jenkinsb3a371b2018-05-23 11:36:53 +0100284 DataType::F32)),
285 framework::dataset::make("DataLayout", DataLayout::NCHW)))
286{
287 validate(CLAccessor(_target), _reference, tolerance_f32);
288}
289TEST_SUITE_END()
290
291TEST_SUITE(Generic)
292FIXTURE_DATA_TEST_CASE(RunSmall, CLDepthwiseConvolutionLayerFixture<float>, framework::DatasetMode::ALL, combine(combine(combine(datasets::SmallDepthwiseConvolutionLayerDataset(), depth_multipliers),
293 framework::dataset::make("DataType",
294 DataType::F32)),
295 framework::dataset::make("DataLayout", DataLayout::NCHW)))
296{
297 validate(CLAccessor(_target), _reference, tolerance_f32);
298}
299FIXTURE_DATA_TEST_CASE(RunLarge, CLDepthwiseConvolutionLayerFixture<float>, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::LargeDepthwiseConvolutionLayerDataset(),
300 depth_multipliers),
301 framework::dataset::make("DataType",
302 DataType::F32)),
303 framework::dataset::make("DataLayout", DataLayout::NCHW)))
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000304{
305 validate(CLAccessor(_target), _reference, tolerance_f32);
306}
307TEST_SUITE_END()
308TEST_SUITE_END()
309TEST_SUITE_END()
310
311template <typename T>
Anthony Barbier06ea0482018-02-22 15:45:35 +0000312using CLDepthwiseConvolutionLayerQuantizedFixture = DepthwiseConvolutionLayerValidationQuantizedFixture<CLTensor, CLAccessor, CLDepthwiseConvolutionLayer, T>;
313template <typename T>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000314using CLDepthwiseConvolutionLayerQuantizedFixture3x3 = DepthwiseConvolutionLayerValidationQuantizedFixture<CLTensor, CLAccessor, CLDepthwiseConvolutionLayer3x3, T>;
315
316TEST_SUITE(Quantized)
317TEST_SUITE(QASYMM8)
Anthony Barbier06ea0482018-02-22 15:45:35 +0000318TEST_SUITE(Generic)
Jenkinsb3a371b2018-05-23 11:36:53 +0100319FIXTURE_DATA_TEST_CASE(RunSmall, CLDepthwiseConvolutionLayerQuantizedFixture<uint8_t>, framework::DatasetMode::PRECOMMIT,
320 combine(combine(combine(combine(datasets::SmallDepthwiseConvolutionLayerDataset(),
321 depth_multipliers),
322 framework::dataset::make("DataType", DataType::QASYMM8)),
323 framework::dataset::make("QuantizationInfo", { QuantizationInfo(0.5f, 10) })),
324 framework::dataset::make("DataLayout", DataLayout::NCHW)))
Anthony Barbier06ea0482018-02-22 15:45:35 +0000325{
326 validate(CLAccessor(_target), _reference, tolerance_qasymm8);
327}
Jenkinsb3a371b2018-05-23 11:36:53 +0100328FIXTURE_DATA_TEST_CASE(RunLarge, CLDepthwiseConvolutionLayerQuantizedFixture<uint8_t>, framework::DatasetMode::NIGHTLY,
329 combine(combine(combine(combine(datasets::LargeDepthwiseConvolutionLayerDataset(),
330 depth_multipliers),
331 framework::dataset::make("DataType", DataType::QASYMM8)),
332 framework::dataset::make("QuantizationInfo", { QuantizationInfo(0.5f, 10) })),
333 framework::dataset::make("DataLayout", DataLayout::NCHW)))
Anthony Barbier06ea0482018-02-22 15:45:35 +0000334{
335 validate(CLAccessor(_target), _reference, tolerance_qasymm8);
336}
337TEST_SUITE_END()
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000338TEST_SUITE(W3x3)
Jenkinsb3a371b2018-05-23 11:36:53 +0100339FIXTURE_DATA_TEST_CASE(RunSmall, CLDepthwiseConvolutionLayerQuantizedFixture3x3<uint8_t>, framework::DatasetMode::PRECOMMIT,
340 combine(combine(combine(combine(datasets::SmallDepthwiseConvolutionLayerDataset3x3(),
341 framework::dataset::make("DepthMultiplier", 1)), // COMPMID-1071 Add depth multiplier support for NHWC
342 framework::dataset::make("DataType", DataType::QASYMM8)),
343 framework::dataset::make("QuantizationInfo", { QuantizationInfo(0.5f, 10) })),
344 framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })))
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000345{
346 validate(CLAccessor(_target), _reference, tolerance_qasymm8);
347}
Jenkinsb3a371b2018-05-23 11:36:53 +0100348FIXTURE_DATA_TEST_CASE(RunLarge, CLDepthwiseConvolutionLayerQuantizedFixture3x3<uint8_t>, framework::DatasetMode::NIGHTLY,
349 combine(combine(combine(combine(datasets::LargeDepthwiseConvolutionLayerDataset3x3(),
350 framework::dataset::make("DepthMultiplier", 1)), // COMPMID-1071 Add depth multiplier support for NHWC
351 framework::dataset::make("DataType", DataType::QASYMM8)),
352 framework::dataset::make("QuantizationInfo", { QuantizationInfo(0.5f, 10) })),
353 framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })))
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000354{
355 validate(CLAccessor(_target), _reference, tolerance_qasymm8);
356}
357TEST_SUITE_END()
358TEST_SUITE_END()
359TEST_SUITE_END()
360
361TEST_SUITE_END()
362TEST_SUITE_END()
363} // namespace validation
364} // namespace test
365} // namespace arm_compute