blob: 274a0f523a4b19e7292384701a3931224b5ac428 [file] [log] [blame]
Giorgio Arena04a8f8c2017-11-23 11:45:24 +00001/*
Usama Arife73686a2019-04-08 17:30:48 +01002 * Copyright (c) 2017-2019 ARM Limited.
Giorgio Arena04a8f8c2017-11-23 11:45:24 +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,
Usama Arife73686a2019-04-08 17:30:48 +010021 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
Giorgio Arena04a8f8c2017-11-23 11:45:24 +000022 * 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"
Usama Arife73686a2019-04-08 17:30:48 +010031#include "tests/datasets/DilatedDepthwiseConvolutionLayerDataset.h"
Giorgio Arena04a8f8c2017-11-23 11:45:24 +000032#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/DepthwiseConvolutionLayerFixture.h"
37
38namespace arm_compute
39{
40namespace test
41{
42namespace validation
43{
44namespace
45{
Georgios Pinitas009fede2018-10-26 12:54:21 +010046RelativeTolerance<half_float::half> tolerance_f16(half_float::half(0.01)); /**< Tolerance value for comparing reference's output against implementation's output for DataType::F16 */
47constexpr RelativeTolerance<float> tolerance_f32(0.01f); /**< Tolerance value for comparing reference's output against implementation's output for DataType::F32 */
Georgios Pinitas83e3e752018-11-07 18:33:08 +000048constexpr AbsoluteTolerance<uint8_t> tolerance_qasymm8(0); /**< Tolerance value for comparing reference's output against implementation's output for DataType::QASYMM8 */
Georgios Pinitas009fede2018-10-26 12:54:21 +010049constexpr float tolerance_num = 0.05f; /**< Tolerance number */
Giorgio Arena76572242018-04-04 17:44:26 +010050
51const auto depth_multipliers = framework::dataset::make("DepthMultiplier", { 1, 2, 3 });
Manuel Bottinia788c2f2019-04-08 13:18:00 +010052
53//Activation Functions
54const auto ActivationFunctionsDataset = framework::dataset::make("ActivationInfo",
55{
56 ActivationLayerInfo(),
57 ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU)
58});
Giorgio Arena04a8f8c2017-11-23 11:45:24 +000059} // namespace
60
61TEST_SUITE(CL)
62TEST_SUITE(DepthwiseConvolutionLayer)
63
Giorgio Arenaad0c7382018-04-23 16:16:21 +010064// *INDENT-OFF*
65// clang-format off
Usama Arife73686a2019-04-08 17:30:48 +010066DATA_TEST_CASE(Validate3x3, framework::DatasetMode::ALL, zip(zip(zip(zip(zip(zip(zip(zip(
Vidhya Sudhan Loganathan7485d5a2018-07-04 09:34:00 +010067 framework::dataset::make("InputInfo", { TensorInfo(TensorShape(32U, 18U, 2U), 1, DataType::F32), // Mismatching data type input/weights
68 TensorInfo(TensorShape(32U, 18U, 3U), 1, DataType::F32), // Mismatching input feature maps
69 TensorInfo(TensorShape(32U, 18U, 2U), 1, DataType::F32), // Unsupported weights dimensions
70 TensorInfo(TensorShape(32U, 18U, 2U), 1, DataType::QASYMM8), // Unsupported activation
71 TensorInfo(TensorShape(32U, 18U, 2U), 1, DataType::F32), // Mismatching depth multiplier
72 TensorInfo(TensorShape(32U, 18U, 2U), 1, DataType::F32), // Invalid stride
73 TensorInfo(TensorShape(32U, 18U, 2U), 1, DataType::F32), // Invalid biases size
74 TensorInfo(TensorShape(32U, 18U, 2U), 1, DataType::F32), // Invalid biases dimensions
75 TensorInfo(TensorShape(32U, 18U, 2U), 1, DataType::F32), // Invalid output size
76 TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), // Window shrink
Usama Arife73686a2019-04-08 17:30:48 +010077 TensorInfo(TensorShape(32U, 18U, 8U), 1, DataType::F32), // patch size bigger than input width
78 TensorInfo(TensorShape(32U, 18U, 8U), 1, DataType::F32), // dilation < 1
Vidhya Sudhan Loganathan7485d5a2018-07-04 09:34:00 +010079 TensorInfo(TensorShape(32U, 18U, 8U), 1, DataType::F32),
80 TensorInfo(TensorShape(50U, 32U, 8U), 1, DataType::QASYMM8),
Giorgio Arenaad0c7382018-04-23 16:16:21 +010081 }),
Vidhya Sudhan Loganathan7485d5a2018-07-04 09:34:00 +010082 framework::dataset::make("WeightsInfo", { TensorInfo(TensorShape(3U, 3U, 2U), 1, DataType::F16),
83 TensorInfo(TensorShape(3U, 3U, 2U), 1, DataType::F32),
84 TensorInfo(TensorShape(5U, 5U, 2U), 1, DataType::F32),
85 TensorInfo(TensorShape(3U, 3U, 2U), 1, DataType::QASYMM8),
86 TensorInfo(TensorShape(3U, 3U, 2U), 1, DataType::F32),
87 TensorInfo(TensorShape(3U, 3U, 2U), 1, DataType::F32),
88 TensorInfo(TensorShape(3U, 3U, 2U), 1, DataType::F32),
89 TensorInfo(TensorShape(3U, 3U, 2U), 1, DataType::F32),
90 TensorInfo(TensorShape(3U, 3U, 2U), 1, DataType::F32),
91 TensorInfo(TensorShape(3U, 3U, 2U), 1, DataType::F32),
92 TensorInfo(TensorShape(3U, 3U, 16U), 1, DataType::F32),
Usama Arife73686a2019-04-08 17:30:48 +010093 TensorInfo(TensorShape(3U, 3U, 16U), 1, DataType::F32),
94 TensorInfo(TensorShape(3U, 3U, 16U), 1, DataType::F32),
Vidhya Sudhan Loganathan7485d5a2018-07-04 09:34:00 +010095 TensorInfo(TensorShape(3U, 3U, 24U), 1, DataType::QASYMM8),
Giorgio Arenaad0c7382018-04-23 16:16:21 +010096 })),
Vidhya Sudhan Loganathan7485d5a2018-07-04 09:34:00 +010097 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::S32),
101 TensorInfo(TensorShape(2U), 1, DataType::F32),
102 TensorInfo(TensorShape(2U), 1, DataType::F32),
103 TensorInfo(TensorShape(4U), 1, DataType::F32),
104 TensorInfo(TensorShape(2U, 2U), 1, DataType::F32),
105 TensorInfo(TensorShape(2U), 1, DataType::F32),
106 TensorInfo(TensorShape(2U), 1, DataType::F32),
107 TensorInfo(TensorShape(16U), 1, DataType::F32),
Usama Arife73686a2019-04-08 17:30:48 +0100108 TensorInfo(TensorShape(16U), 1, DataType::F32),
109 TensorInfo(TensorShape(16U), 1, DataType::F32),
Vidhya Sudhan Loganathan7485d5a2018-07-04 09:34:00 +0100110 TensorInfo(TensorShape(24U), 1, DataType::S32),
Giorgio Arenaad0c7382018-04-23 16:16:21 +0100111 })),
Vidhya Sudhan Loganathan7485d5a2018-07-04 09:34:00 +0100112 framework::dataset::make("OutputInfo", { TensorInfo(TensorShape(30U, 16U, 2U), 1, DataType::F32),
113 TensorInfo(TensorShape(30U, 16U, 2U), 1, DataType::F32),
114 TensorInfo(TensorShape(30U, 16U, 2U), 1, DataType::F32),
115 TensorInfo(TensorShape(30U, 16U, 2U), 1, DataType::QASYMM8),
116 TensorInfo(TensorShape(30U, 16U, 2U), 1, DataType::F32),
117 TensorInfo(TensorShape(30U, 16U, 2U), 1, DataType::F32),
118 TensorInfo(TensorShape(30U, 16U, 2U), 1, DataType::F32),
119 TensorInfo(TensorShape(30U, 16U, 2U), 1, DataType::F32),
120 TensorInfo(TensorShape(32U, 18U, 2U), 1, DataType::F32),
121 TensorInfo(TensorShape(25U, 11U, 2U), 1, DataType::F32),
122 TensorInfo(TensorShape(30U, 16U, 16U), 1, DataType::F32),
Usama Arife73686a2019-04-08 17:30:48 +0100123 TensorInfo(TensorShape(30U, 16U, 16U), 1, DataType::F32),
124 TensorInfo(TensorShape(30U, 16U, 16U), 1, DataType::F32),
Vidhya Sudhan Loganathan7485d5a2018-07-04 09:34:00 +0100125 TensorInfo(TensorShape(48U, 30U, 24U), 1, DataType::QASYMM8),
Giorgio Arenaad0c7382018-04-23 16:16:21 +0100126 })),
127 framework::dataset::make("ConvInfo", { PadStrideInfo(1, 1, 0, 0),
128 PadStrideInfo(1, 1, 0, 0),
129 PadStrideInfo(1, 1, 0, 0),
130 PadStrideInfo(1, 1, 0, 0),
131 PadStrideInfo(1, 1, 0, 0),
132 PadStrideInfo(4, 1, 0, 0),
133 PadStrideInfo(1, 1, 0, 0),
134 PadStrideInfo(1, 1, 0, 0),
135 PadStrideInfo(1, 1, 0, 0),
136 PadStrideInfo(1, 1, 0, 0),
137 PadStrideInfo(1, 1, 0, 0),
138 PadStrideInfo(1, 1, 0, 0),
Usama Arife73686a2019-04-08 17:30:48 +0100139 PadStrideInfo(1, 1, 0, 0),
140 PadStrideInfo(1, 1, 0, 0),
Giorgio Arenaad0c7382018-04-23 16:16:21 +0100141 })),
142 framework::dataset::make("DepthMultiplier", { 1,
143 1,
144 1,
145 1,
146 3,
147 1,
148 1,
149 1,
150 1,
151 1,
152 2,
Usama Arife73686a2019-04-08 17:30:48 +0100153 2,
154 2,
Giorgio Arenaad0c7382018-04-23 16:16:21 +0100155 3,
156 })),
157 framework::dataset::make("ActivationInfo", { ActivationLayerInfo(),
158 ActivationLayerInfo(),
159 ActivationLayerInfo(),
160 ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::LINEAR),
161 ActivationLayerInfo(),
162 ActivationLayerInfo(),
163 ActivationLayerInfo(),
164 ActivationLayerInfo(),
165 ActivationLayerInfo(),
166 ActivationLayerInfo(),
167 ActivationLayerInfo(),
Usama Arife73686a2019-04-08 17:30:48 +0100168 ActivationLayerInfo(),
169 ActivationLayerInfo(),
Giorgio Arenaad0c7382018-04-23 16:16:21 +0100170 ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU),
171 })),
Usama Arife73686a2019-04-08 17:30:48 +0100172 framework::dataset::make("Dilation", { Size2D(1U, 1U),
173 Size2D(1U, 1U),
174 Size2D(1U, 1U),
175 Size2D(1U, 1U),
176 Size2D(1U, 1U),
177 Size2D(1U, 1U),
178 Size2D(1U, 1U),
179 Size2D(1U, 1U),
180 Size2D(1U, 1U),
181 Size2D(1U, 1U),
182 Size2D(20U, 1U),
183 Size2D(0U, 1U),
184 Size2D(1U, 1U),
185 Size2D(1U, 1U),
186 })),
187 framework::dataset::make("Expected", { false, false, false, false, false, false, false, false, false, false, false, false, true, true })),
188 input_info, weights_info, biases_info, output_info, conv_info, depth_multiplier, act_info, dilation, expected)
Giorgio Arenaad0c7382018-04-23 16:16:21 +0100189{
Usama Arife73686a2019-04-08 17:30:48 +0100190 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,GPUTarget::MIDGARD, dilation));
Giorgio Arenaad0c7382018-04-23 16:16:21 +0100191 ARM_COMPUTE_EXPECT(is_valid == expected, framework::LogLevel::ERRORS);
192}
193
Usama Arife73686a2019-04-08 17:30:48 +0100194DATA_TEST_CASE(ValidateGeneric, framework::DatasetMode::ALL, zip(zip(zip(zip(zip(zip(zip(
Vidhya Sudhan Loganathan7485d5a2018-07-04 09:34:00 +0100195 framework::dataset::make("InputInfo", { TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), // Mismatching data type input/weights
196 TensorInfo(TensorShape(27U, 13U, 3U), 1, DataType::F32), // Mismatching input feature maps
197 TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), // Mismatching depth multiplier
198 TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), // Invalid biases size
199 TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), // Invalid biases dimensions
200 TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), // Invalid output size
Usama Arife73686a2019-04-08 17:30:48 +0100201 TensorInfo(TensorShape(27U, 13U, 8U), 1, DataType::F32), // patch size bigger than input width
202 TensorInfo(TensorShape(27U, 13U, 8U), 1, DataType::F32), // dilation < 1
Vidhya Sudhan Loganathan7485d5a2018-07-04 09:34:00 +0100203 TensorInfo(TensorShape(27U, 13U, 8U), 1, DataType::F32),
204 TensorInfo(TensorShape(32U, 13U, 8U), 1, DataType::QASYMM8),
Giorgio Arenaad0c7382018-04-23 16:16:21 +0100205 }),
Vidhya Sudhan Loganathan7485d5a2018-07-04 09:34:00 +0100206 framework::dataset::make("WeightsInfo", { TensorInfo(TensorShape(3U, 3U, 2U), 1, DataType::F16),
207 TensorInfo(TensorShape(3U, 3U, 2U), 1, DataType::F32),
208 TensorInfo(TensorShape(3U, 3U, 2U), 1, DataType::F32),
209 TensorInfo(TensorShape(3U, 3U, 2U), 1, DataType::F32),
210 TensorInfo(TensorShape(3U, 3U, 2U), 1, DataType::F32),
211 TensorInfo(TensorShape(3U, 3U, 2U), 1, DataType::F32),
212 TensorInfo(TensorShape(3U, 3U, 16U), 1, DataType::F32),
Usama Arife73686a2019-04-08 17:30:48 +0100213 TensorInfo(TensorShape(3U, 3U, 16U), 1, DataType::F32),
214 TensorInfo(TensorShape(3U, 3U, 16U), 1, DataType::F32),
Vidhya Sudhan Loganathan7485d5a2018-07-04 09:34:00 +0100215 TensorInfo(TensorShape(3U, 3U, 24U), 1, DataType::QASYMM8),
Giorgio Arenaad0c7382018-04-23 16:16:21 +0100216 })),
Vidhya Sudhan Loganathan7485d5a2018-07-04 09:34:00 +0100217 framework::dataset::make("BiasesInfo", { TensorInfo(TensorShape(2U), 1, DataType::F32),
218 TensorInfo(TensorShape(2U), 1, DataType::F32),
219 TensorInfo(TensorShape(2U), 1, DataType::F32),
220 TensorInfo(TensorShape(4U), 1, DataType::F32),
221 TensorInfo(TensorShape(2U, 2U), 1, DataType::F32),
222 TensorInfo(TensorShape(2U), 1, DataType::F32),
223 TensorInfo(TensorShape(16U), 1, DataType::F32),
Usama Arife73686a2019-04-08 17:30:48 +0100224 TensorInfo(TensorShape(16U), 1, DataType::F32),
225 TensorInfo(TensorShape(16U), 1, DataType::F32),
Vidhya Sudhan Loganathan7485d5a2018-07-04 09:34:00 +0100226 TensorInfo(TensorShape(24U), 1, DataType::S32),
Giorgio Arenaad0c7382018-04-23 16:16:21 +0100227 })),
Vidhya Sudhan Loganathan7485d5a2018-07-04 09:34:00 +0100228 framework::dataset::make("OutputInfo", { TensorInfo(TensorShape(25U, 11U, 2U), 1, DataType::F32),
229 TensorInfo(TensorShape(25U, 11U, 2U), 1, DataType::F32),
230 TensorInfo(TensorShape(25U, 11U, 2U), 1, DataType::F32),
231 TensorInfo(TensorShape(25U, 11U, 2U), 1, DataType::F32),
232 TensorInfo(TensorShape(25U, 11U, 2U), 1, DataType::F32),
233 TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32),
234 TensorInfo(TensorShape(25U, 11U, 16U), 1, DataType::F32),
Usama Arife73686a2019-04-08 17:30:48 +0100235 TensorInfo(TensorShape(25U, 11U, 16U), 1, DataType::F32),
236 TensorInfo(TensorShape(25U, 11U, 16U), 1, DataType::F32),
Vidhya Sudhan Loganathan7485d5a2018-07-04 09:34:00 +0100237 TensorInfo(TensorShape(32U, 11U, 24U), 1, DataType::QASYMM8),
Giorgio Arenaad0c7382018-04-23 16:16:21 +0100238 })),
239 framework::dataset::make("ConvInfo", { PadStrideInfo(1, 1, 0, 0),
240 PadStrideInfo(1, 1, 0, 0),
241 PadStrideInfo(1, 1, 0, 0),
242 PadStrideInfo(1, 1, 0, 0),
243 PadStrideInfo(1, 1, 0, 0),
244 PadStrideInfo(1, 1, 0, 0),
245 PadStrideInfo(1, 1, 0, 0),
Usama Arife73686a2019-04-08 17:30:48 +0100246 PadStrideInfo(1, 1, 0, 0),
247 PadStrideInfo(1, 1, 0, 0),
Giorgio Arenaad0c7382018-04-23 16:16:21 +0100248 PadStrideInfo(1, 1, 1, 0),
249 })),
250 framework::dataset::make("DepthMultiplier", { 1,
251 1,
252 3,
253 1,
254 1,
255 1,
256 2,
Usama Arife73686a2019-04-08 17:30:48 +0100257 2,
258 2,
Giorgio Arenaad0c7382018-04-23 16:16:21 +0100259 3,
260 })),
Usama Arife73686a2019-04-08 17:30:48 +0100261 framework::dataset::make("Dilation", { Size2D(1U, 1U),
262 Size2D(1U, 1U),
263 Size2D(1U, 1U),
264 Size2D(1U, 1U),
265 Size2D(1U, 1U),
266 Size2D(1U, 1U),
267 Size2D(20U, 1U),
268 Size2D(0U, 1U),
269 Size2D(1U, 1U),
270 Size2D(1U, 1U),
271 })),
272 framework::dataset::make("Expected", { false, false, false, false, false, false, false, false, true, true })),
273 input_info, weights_info, biases_info, output_info, conv_info, depth_multiplier, dilation, expected)
Giorgio Arenaad0c7382018-04-23 16:16:21 +0100274{
Usama Arife73686a2019-04-08 17:30:48 +0100275 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,ActivationLayerInfo(), dilation));
Giorgio Arenaad0c7382018-04-23 16:16:21 +0100276 ARM_COMPUTE_EXPECT(is_valid == expected, framework::LogLevel::ERRORS);
277}
278// clang-format on
279// *INDENT-ON*
280
Giorgio Arena04a8f8c2017-11-23 11:45:24 +0000281template <typename T>
282using CLDepthwiseConvolutionLayerFixture = DepthwiseConvolutionLayerValidationFixture<CLTensor, CLAccessor, CLDepthwiseConvolutionLayer, T>;
283
Giorgio Arena04a8f8c2017-11-23 11:45:24 +0000284TEST_SUITE(Float)
Michele Di Giorgiod24af8a2018-05-08 17:23:52 +0100285TEST_SUITE(FP16)
Michele Di Giorgio933fe862018-02-19 15:42:12 +0000286TEST_SUITE(W3x3)
Giorgio Arenae6bb3c62018-08-23 11:19:11 +0100287TEST_SUITE(NCHW)
Pablo Tello8bf622a2018-12-03 15:54:49 +0000288FIXTURE_DATA_TEST_CASE(RunSmall, CLDepthwiseConvolutionLayerFixture<half>, framework::DatasetMode::ALL,
Manuel Bottinia788c2f2019-04-08 13:18:00 +0100289 combine(combine(combine(combine(framework::dataset::concat(datasets::SmallDepthwiseConvolutionLayerDataset3x3(),
290 datasets::SmallDepthwiseConvolutionLayerDataset3x3NCHW()),
291 depth_multipliers),
292 framework::dataset::make("DataType",
293 DataType::F16)),
294 framework::dataset::make("DataLayout", DataLayout::NCHW)),
295 ActivationFunctionsDataset))
Michele Di Giorgio933fe862018-02-19 15:42:12 +0000296{
297 validate(CLAccessor(_target), _reference, tolerance_f16);
298}
Manuel Bottinia788c2f2019-04-08 13:18:00 +0100299FIXTURE_DATA_TEST_CASE(RunLarge, CLDepthwiseConvolutionLayerFixture<half>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(datasets::LargeDepthwiseConvolutionLayerDataset3x3(),
Pablo Tello8bf622a2018-12-03 15:54:49 +0000300 depth_multipliers),
301 framework::dataset::make("DataType",
302 DataType::F16)),
Manuel Bottinia788c2f2019-04-08 13:18:00 +0100303 framework::dataset::make("DataLayout", DataLayout::NCHW)),
304 ActivationFunctionsDataset))
Michele Di Giorgio933fe862018-02-19 15:42:12 +0000305{
306 validate(CLAccessor(_target), _reference, tolerance_f16);
307}
Usama Arife73686a2019-04-08 17:30:48 +0100308TEST_SUITE(Dilation)
Manuel Bottinia788c2f2019-04-08 13:18:00 +0100309FIXTURE_DATA_TEST_CASE(RunSmall, CLDepthwiseConvolutionLayerFixture<half>, framework::DatasetMode::ALL, combine(combine(combine(combine(datasets::SmallDepthwiseDilatedConvolutionLayerDataset3x3(),
Usama Arife73686a2019-04-08 17:30:48 +0100310 depth_multipliers),
311 framework::dataset::make("DataType",
312 DataType::F16)),
Manuel Bottinia788c2f2019-04-08 13:18:00 +0100313 framework::dataset::make("DataLayout", { DataLayout::NCHW })),
314 ActivationFunctionsDataset))
Usama Arife73686a2019-04-08 17:30:48 +0100315{
316 validate(CLAccessor(_target), _reference, tolerance_f16);
317}
Manuel Bottinia788c2f2019-04-08 13:18:00 +0100318FIXTURE_DATA_TEST_CASE(RunLarge, CLDepthwiseConvolutionLayerFixture<half>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(datasets::LargeDepthwiseDilatedConvolutionLayerDataset3x3(),
Usama Arife73686a2019-04-08 17:30:48 +0100319 depth_multipliers),
320 framework::dataset::make("DataType",
321 DataType::F16)),
Manuel Bottinia788c2f2019-04-08 13:18:00 +0100322 framework::dataset::make("DataLayout", { DataLayout::NCHW })),
323 ActivationFunctionsDataset))
Usama Arife73686a2019-04-08 17:30:48 +0100324{
325 validate(CLAccessor(_target), _reference, tolerance_f16);
326}
327TEST_SUITE_END() // Dilation
328TEST_SUITE_END() // NCHW
Michele Di Giorgiod24af8a2018-05-08 17:23:52 +0100329
Giorgio Arenae6bb3c62018-08-23 11:19:11 +0100330TEST_SUITE(NHWC)
Pablo Tello8bf622a2018-12-03 15:54:49 +0000331FIXTURE_DATA_TEST_CASE(RunSmall, CLDepthwiseConvolutionLayerFixture<half>, framework::DatasetMode::ALL,
Manuel Bottinia788c2f2019-04-08 13:18:00 +0100332 combine(combine(combine(combine(datasets::SmallDepthwiseConvolutionLayerDataset3x3(),
333 depth_multipliers),
334 framework::dataset::make("DataType",
335 DataType::F16)),
336 framework::dataset::make("DataLayout", DataLayout::NHWC)),
337 ActivationFunctionsDataset))
Giorgio Arenae6bb3c62018-08-23 11:19:11 +0100338{
339 validate(CLAccessor(_target), _reference, tolerance_f16);
340}
Manuel Bottinia788c2f2019-04-08 13:18:00 +0100341FIXTURE_DATA_TEST_CASE(RunLarge, CLDepthwiseConvolutionLayerFixture<half>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(datasets::LargeDepthwiseConvolutionLayerDataset3x3(),
Georgios Pinitas05045c12018-12-07 18:31:47 +0000342 depth_multipliers),
Pablo Tello8bf622a2018-12-03 15:54:49 +0000343 framework::dataset::make("DataType",
344 DataType::F16)),
Manuel Bottinia788c2f2019-04-08 13:18:00 +0100345 framework::dataset::make("DataLayout", DataLayout::NHWC)),
346 ActivationFunctionsDataset))
Giorgio Arenae6bb3c62018-08-23 11:19:11 +0100347{
348 validate(CLAccessor(_target), _reference, tolerance_f16);
349}
Usama Arife73686a2019-04-08 17:30:48 +0100350TEST_SUITE(Dilation)
Manuel Bottinia788c2f2019-04-08 13:18:00 +0100351FIXTURE_DATA_TEST_CASE(RunSmall, CLDepthwiseConvolutionLayerFixture<half>, framework::DatasetMode::ALL, combine(combine(combine(combine(datasets::SmallDepthwiseDilatedConvolutionLayerDataset3x3(),
Usama Arife73686a2019-04-08 17:30:48 +0100352 depth_multipliers),
353 framework::dataset::make("DataType",
354 DataType::F16)),
Manuel Bottinia788c2f2019-04-08 13:18:00 +0100355 framework::dataset::make("DataLayout", { DataLayout::NHWC })),
356 ActivationFunctionsDataset))
Usama Arife73686a2019-04-08 17:30:48 +0100357{
358 validate(CLAccessor(_target), _reference, tolerance_f16);
359}
Manuel Bottinia788c2f2019-04-08 13:18:00 +0100360FIXTURE_DATA_TEST_CASE(RunLarge, CLDepthwiseConvolutionLayerFixture<half>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(datasets::LargeDepthwiseDilatedConvolutionLayerDataset3x3(),
Usama Arife73686a2019-04-08 17:30:48 +0100361 depth_multipliers),
362 framework::dataset::make("DataType",
363 DataType::F16)),
Manuel Bottinia788c2f2019-04-08 13:18:00 +0100364 framework::dataset::make("DataLayout", { DataLayout::NHWC })),
365 ActivationFunctionsDataset))
Usama Arife73686a2019-04-08 17:30:48 +0100366{
367 validate(CLAccessor(_target), _reference, tolerance_f16);
368}
369TEST_SUITE_END() // Dilation
370TEST_SUITE_END() // NHWC
371TEST_SUITE_END() // W3x3
Giorgio Arenae6bb3c62018-08-23 11:19:11 +0100372
Michele Di Giorgiod24af8a2018-05-08 17:23:52 +0100373TEST_SUITE(Generic)
Manuel Bottinia788c2f2019-04-08 13:18:00 +0100374FIXTURE_DATA_TEST_CASE(RunSmall, CLDepthwiseConvolutionLayerFixture<half>, framework::DatasetMode::ALL, combine(combine(combine(combine(datasets::SmallDepthwiseConvolutionLayerDataset(),
375 depth_multipliers),
Michele Di Giorgiod24af8a2018-05-08 17:23:52 +0100376 framework::dataset::make("DataType",
377 DataType::F16)),
Manuel Bottinia788c2f2019-04-08 13:18:00 +0100378 framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })),
379 ActivationFunctionsDataset))
Michele Di Giorgiod24af8a2018-05-08 17:23:52 +0100380{
381 validate(CLAccessor(_target), _reference, tolerance_f16, tolerance_num);
382}
Manuel Bottinia788c2f2019-04-08 13:18:00 +0100383FIXTURE_DATA_TEST_CASE(RunLarge, CLDepthwiseConvolutionLayerFixture<half>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(datasets::LargeDepthwiseConvolutionLayerDataset(),
Michele Di Giorgiod24af8a2018-05-08 17:23:52 +0100384 depth_multipliers),
385 framework::dataset::make("DataType",
386 DataType::F16)),
Manuel Bottinia788c2f2019-04-08 13:18:00 +0100387 framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })),
388 ActivationFunctionsDataset))
Michele Di Giorgiod24af8a2018-05-08 17:23:52 +0100389{
390 validate(CLAccessor(_target), _reference, tolerance_f16, tolerance_num);
391}
Usama Arife73686a2019-04-08 17:30:48 +0100392
393TEST_SUITE(Dilation)
Manuel Bottinia788c2f2019-04-08 13:18:00 +0100394FIXTURE_DATA_TEST_CASE(RunSmall, CLDepthwiseConvolutionLayerFixture<half>, framework::DatasetMode::ALL, combine(combine(combine(combine(datasets::SmallDepthwiseDilatedConvolutionLayerDataset(),
Usama Arife73686a2019-04-08 17:30:48 +0100395 depth_multipliers),
396 framework::dataset::make("DataType",
397 DataType::F16)),
Manuel Bottinia788c2f2019-04-08 13:18:00 +0100398 framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })),
399 ActivationFunctionsDataset))
Usama Arife73686a2019-04-08 17:30:48 +0100400{
401 validate(CLAccessor(_target), _reference, tolerance_f16, tolerance_num);
402}
Manuel Bottinia788c2f2019-04-08 13:18:00 +0100403FIXTURE_DATA_TEST_CASE(RunLarge, CLDepthwiseConvolutionLayerFixture<half>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(datasets::LargeDepthwiseDilatedConvolutionLayerDataset(),
Usama Arife73686a2019-04-08 17:30:48 +0100404 depth_multipliers),
405 framework::dataset::make("DataType",
406 DataType::F16)),
Manuel Bottinia788c2f2019-04-08 13:18:00 +0100407 framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })),
408 ActivationFunctionsDataset))
Usama Arife73686a2019-04-08 17:30:48 +0100409{
410 validate(CLAccessor(_target), _reference, tolerance_f16, tolerance_num);
411}
412TEST_SUITE_END() // Dilation
413TEST_SUITE_END() // Generic
414TEST_SUITE_END() // FP16
Michele Di Giorgio933fe862018-02-19 15:42:12 +0000415
Giorgio Arena04a8f8c2017-11-23 11:45:24 +0000416TEST_SUITE(FP32)
417TEST_SUITE(W3x3)
Giorgio Arenad051e972018-06-20 11:46:42 +0100418TEST_SUITE(NCHW)
Pablo Tello8bf622a2018-12-03 15:54:49 +0000419FIXTURE_DATA_TEST_CASE(RunSmall, CLDepthwiseConvolutionLayerFixture<float>, framework::DatasetMode::ALL,
Manuel Bottinia788c2f2019-04-08 13:18:00 +0100420 combine(combine(combine(combine(framework::dataset::concat(datasets::SmallDepthwiseConvolutionLayerDataset3x3(),
421 datasets::SmallDepthwiseConvolutionLayerDataset3x3NCHW()),
422 depth_multipliers),
423 framework::dataset::make("DataType",
424 DataType::F32)),
425 framework::dataset::make("DataLayout", DataLayout::NCHW)),
426 ActivationFunctionsDataset))
Giorgio Arena04a8f8c2017-11-23 11:45:24 +0000427{
428 validate(CLAccessor(_target), _reference, tolerance_f32);
429}
Manuel Bottinia788c2f2019-04-08 13:18:00 +0100430FIXTURE_DATA_TEST_CASE(RunLarge, CLDepthwiseConvolutionLayerFixture<float>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(datasets::LargeDepthwiseConvolutionLayerDataset3x3(),
Pablo Tello8bf622a2018-12-03 15:54:49 +0000431 depth_multipliers),
432 framework::dataset::make("DataType",
433 DataType::F32)),
Manuel Bottinia788c2f2019-04-08 13:18:00 +0100434 framework::dataset::make("DataLayout", DataLayout::NCHW)),
435 ActivationFunctionsDataset))
Giorgio Arena04a8f8c2017-11-23 11:45:24 +0000436{
437 validate(CLAccessor(_target), _reference, tolerance_f32);
438}
Usama Arife73686a2019-04-08 17:30:48 +0100439TEST_SUITE(Dilation)
440FIXTURE_DATA_TEST_CASE(RunSmall, CLDepthwiseConvolutionLayerFixture<float>, framework::DatasetMode::ALL,
Manuel Bottinia788c2f2019-04-08 13:18:00 +0100441 combine(combine(combine(combine(datasets::SmallDepthwiseDilatedConvolutionLayerDataset3x3(), depth_multipliers),
442 framework::dataset::make("DataType",
443 DataType::F32)),
444 framework::dataset::make("DataLayout", DataLayout::NCHW)),
445 ActivationFunctionsDataset))
Usama Arife73686a2019-04-08 17:30:48 +0100446{
447 validate(CLAccessor(_target), _reference, tolerance_f32);
448}
Manuel Bottinia788c2f2019-04-08 13:18:00 +0100449FIXTURE_DATA_TEST_CASE(RunLarge, CLDepthwiseConvolutionLayerFixture<float>, framework::DatasetMode::NIGHTLY,
450 combine(combine(combine(combine(datasets::LargeDepthwiseDilatedConvolutionLayerDataset3x3(),
451 depth_multipliers),
452 framework::dataset::make("DataType",
453 DataType::F32)),
454 framework::dataset::make("DataLayout", DataLayout::NCHW)),
455 ActivationFunctionsDataset))
Usama Arife73686a2019-04-08 17:30:48 +0100456{
457 validate(CLAccessor(_target), _reference, tolerance_f32);
458}
459
460TEST_SUITE_END() // Dilation
461TEST_SUITE_END() // NCHW
Giorgio Arenad051e972018-06-20 11:46:42 +0100462TEST_SUITE(NHWC)
Pablo Tello8bf622a2018-12-03 15:54:49 +0000463FIXTURE_DATA_TEST_CASE(RunSmall, CLDepthwiseConvolutionLayerFixture<float>, framework::DatasetMode::ALL,
Manuel Bottinia788c2f2019-04-08 13:18:00 +0100464 combine(combine(combine(combine(datasets::SmallDepthwiseConvolutionLayerDataset3x3(),
465 depth_multipliers),
466 framework::dataset::make("DataType",
467 DataType::F32)),
468 framework::dataset::make("DataLayout", DataLayout::NHWC)),
469 ActivationFunctionsDataset))
Giorgio Arenad051e972018-06-20 11:46:42 +0100470{
471 validate(CLAccessor(_target), _reference, tolerance_f32);
472}
Manuel Bottinia788c2f2019-04-08 13:18:00 +0100473FIXTURE_DATA_TEST_CASE(RunLarge, CLDepthwiseConvolutionLayerFixture<float>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(datasets::LargeDepthwiseConvolutionLayerDataset3x3(),
Georgios Pinitas05045c12018-12-07 18:31:47 +0000474 depth_multipliers),
Pablo Tello8bf622a2018-12-03 15:54:49 +0000475 framework::dataset::make("DataType",
476 DataType::F32)),
Manuel Bottinia788c2f2019-04-08 13:18:00 +0100477 framework::dataset::make("DataLayout", DataLayout::NHWC)),
478 ActivationFunctionsDataset))
Giorgio Arenad051e972018-06-20 11:46:42 +0100479{
480 validate(CLAccessor(_target), _reference, tolerance_f32);
481}
Usama Arife73686a2019-04-08 17:30:48 +0100482TEST_SUITE(Dilation)
483
484FIXTURE_DATA_TEST_CASE(RunSmall, CLDepthwiseConvolutionLayerFixture<float>, framework::DatasetMode::ALL,
Manuel Bottinia788c2f2019-04-08 13:18:00 +0100485 combine(combine(combine(combine(datasets::SmallDepthwiseDilatedConvolutionLayerDataset3x3(),
486 depth_multipliers),
487 framework::dataset::make("DataType",
488 DataType::F32)),
489 framework::dataset::make("DataLayout", DataLayout::NHWC)),
490 ActivationFunctionsDataset))
Usama Arife73686a2019-04-08 17:30:48 +0100491{
492 validate(CLAccessor(_target), _reference, tolerance_f32);
493}
Manuel Bottinia788c2f2019-04-08 13:18:00 +0100494FIXTURE_DATA_TEST_CASE(RunLarge, CLDepthwiseConvolutionLayerFixture<float>, framework::DatasetMode::NIGHTLY,
495 combine(combine(combine(combine(datasets::LargeDepthwiseDilatedConvolutionLayerDataset3x3(),
496 depth_multipliers),
497 framework::dataset::make("DataType",
498 DataType::F32)),
499 framework::dataset::make("DataLayout", DataLayout::NHWC)),
500 ActivationFunctionsDataset))
Usama Arife73686a2019-04-08 17:30:48 +0100501{
502 validate(CLAccessor(_target), _reference, tolerance_f32);
503}
504TEST_SUITE_END() // Dilation
505TEST_SUITE_END() // NHWC
506TEST_SUITE_END() // W3x3
Michele Di Giorgiod24af8a2018-05-08 17:23:52 +0100507
508TEST_SUITE(Generic)
Manuel Bottinia788c2f2019-04-08 13:18:00 +0100509FIXTURE_DATA_TEST_CASE(RunSmall, CLDepthwiseConvolutionLayerFixture<float>, framework::DatasetMode::ALL, combine(combine(combine(combine(datasets::SmallDepthwiseConvolutionLayerDataset(),
510 depth_multipliers),
Michele Di Giorgiod24af8a2018-05-08 17:23:52 +0100511 framework::dataset::make("DataType",
512 DataType::F32)),
Manuel Bottinia788c2f2019-04-08 13:18:00 +0100513 framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })),
514 ActivationFunctionsDataset))
Michele Di Giorgiod24af8a2018-05-08 17:23:52 +0100515{
516 validate(CLAccessor(_target), _reference, tolerance_f32);
517}
Manuel Bottinia788c2f2019-04-08 13:18:00 +0100518FIXTURE_DATA_TEST_CASE(RunLarge, CLDepthwiseConvolutionLayerFixture<float>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(datasets::LargeDepthwiseConvolutionLayerDataset(),
Michele Di Giorgiod24af8a2018-05-08 17:23:52 +0100519 depth_multipliers),
520 framework::dataset::make("DataType",
521 DataType::F32)),
Manuel Bottinia788c2f2019-04-08 13:18:00 +0100522 framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })),
523 ActivationFunctionsDataset))
Michele Di Giorgiod24af8a2018-05-08 17:23:52 +0100524{
525 validate(CLAccessor(_target), _reference, tolerance_f32);
526}
Usama Arife73686a2019-04-08 17:30:48 +0100527
528TEST_SUITE(Dilation)
Manuel Bottinia788c2f2019-04-08 13:18:00 +0100529FIXTURE_DATA_TEST_CASE(RunSmall, CLDepthwiseConvolutionLayerFixture<float>, framework::DatasetMode::ALL, combine(combine(combine(combine(datasets::SmallDepthwiseDilatedConvolutionLayerDataset(),
Usama Arife73686a2019-04-08 17:30:48 +0100530 depth_multipliers),
531 framework::dataset::make("DataType",
532 DataType::F32)),
Manuel Bottinia788c2f2019-04-08 13:18:00 +0100533 framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })),
534 ActivationFunctionsDataset))
Usama Arife73686a2019-04-08 17:30:48 +0100535{
536 validate(CLAccessor(_target), _reference, tolerance_f32);
537}
Manuel Bottinia788c2f2019-04-08 13:18:00 +0100538FIXTURE_DATA_TEST_CASE(RunLarge, CLDepthwiseConvolutionLayerFixture<float>, framework::DatasetMode::NIGHTLY,
539 combine(combine(combine(combine(datasets::LargeDepthwiseDilatedConvolutionLayerDataset3x3(),
540 depth_multipliers),
541 framework::dataset::make("DataType",
542 DataType::F32)),
543 framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })),
544 ActivationFunctionsDataset))
Usama Arife73686a2019-04-08 17:30:48 +0100545{
546 validate(CLAccessor(_target), _reference, tolerance_f32);
547}
548TEST_SUITE_END() // Dilation
549TEST_SUITE_END() // Generic
550TEST_SUITE_END() // FP32
551TEST_SUITE_END() // Float
Giorgio Arena04a8f8c2017-11-23 11:45:24 +0000552
553template <typename T>
Georgios Pinitasde5a1cc2018-02-02 12:52:07 +0000554using CLDepthwiseConvolutionLayerQuantizedFixture = DepthwiseConvolutionLayerValidationQuantizedFixture<CLTensor, CLAccessor, CLDepthwiseConvolutionLayer, T>;
Giorgio Arena04a8f8c2017-11-23 11:45:24 +0000555
556TEST_SUITE(Quantized)
557TEST_SUITE(QASYMM8)
Georgios Pinitasde5a1cc2018-02-02 12:52:07 +0000558TEST_SUITE(Generic)
Giorgio Arena76572242018-04-04 17:44:26 +0100559FIXTURE_DATA_TEST_CASE(RunSmall, CLDepthwiseConvolutionLayerQuantizedFixture<uint8_t>, framework::DatasetMode::PRECOMMIT,
Manuel Bottinia788c2f2019-04-08 13:18:00 +0100560 combine(combine(combine(combine(combine(datasets::SmallDepthwiseConvolutionLayerDataset(),
561 depth_multipliers),
562 framework::dataset::make("DataType", DataType::QASYMM8)),
563 framework::dataset::make("QuantizationInfo", { QuantizationInfo(0.5f, 10) })),
564 framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })),
565 ActivationFunctionsDataset))
Georgios Pinitasde5a1cc2018-02-02 12:52:07 +0000566{
567 validate(CLAccessor(_target), _reference, tolerance_qasymm8);
568}
Giorgio Arena76572242018-04-04 17:44:26 +0100569FIXTURE_DATA_TEST_CASE(RunLarge, CLDepthwiseConvolutionLayerQuantizedFixture<uint8_t>, framework::DatasetMode::NIGHTLY,
Manuel Bottinia788c2f2019-04-08 13:18:00 +0100570 combine(combine(combine(combine(combine(datasets::LargeDepthwiseConvolutionLayerDataset(),
571 depth_multipliers),
572 framework::dataset::make("DataType", DataType::QASYMM8)),
573 framework::dataset::make("QuantizationInfo", { QuantizationInfo(0.5f, 10) })),
574 framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })),
575 ActivationFunctionsDataset))
Georgios Pinitasde5a1cc2018-02-02 12:52:07 +0000576{
577 validate(CLAccessor(_target), _reference, tolerance_qasymm8);
578}
Usama Arife73686a2019-04-08 17:30:48 +0100579TEST_SUITE(Dilation)
580FIXTURE_DATA_TEST_CASE(RunSmall, CLDepthwiseConvolutionLayerQuantizedFixture<uint8_t>, framework::DatasetMode::PRECOMMIT,
Manuel Bottinia788c2f2019-04-08 13:18:00 +0100581 combine(combine(combine(combine(combine(datasets::SmallDepthwiseDilatedConvolutionLayerDataset(),
582 depth_multipliers),
583 framework::dataset::make("DataType", DataType::QASYMM8)),
584 framework::dataset::make("QuantizationInfo", { QuantizationInfo(0.5f, 10) })),
585 framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })),
586 ActivationFunctionsDataset))
Usama Arife73686a2019-04-08 17:30:48 +0100587{
588 validate(CLAccessor(_target), _reference, tolerance_qasymm8);
589}
590FIXTURE_DATA_TEST_CASE(RunLarge, CLDepthwiseConvolutionLayerQuantizedFixture<uint8_t>, framework::DatasetMode::NIGHTLY,
Manuel Bottinia788c2f2019-04-08 13:18:00 +0100591 combine(combine(combine(combine(combine(datasets::LargeDepthwiseDilatedConvolutionLayerDataset(),
592 depth_multipliers),
593 framework::dataset::make("DataType", DataType::QASYMM8)),
594 framework::dataset::make("QuantizationInfo", { QuantizationInfo(0.5f, 10) })),
595 framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })),
596 ActivationFunctionsDataset))
Usama Arife73686a2019-04-08 17:30:48 +0100597{
598 validate(CLAccessor(_target), _reference, tolerance_qasymm8);
599}
600TEST_SUITE_END() // Dilation
601TEST_SUITE_END() // Generic
Giorgio Arena04a8f8c2017-11-23 11:45:24 +0000602TEST_SUITE(W3x3)
Pablo Tello8bf622a2018-12-03 15:54:49 +0000603FIXTURE_DATA_TEST_CASE(RunSmall, CLDepthwiseConvolutionLayerQuantizedFixture<uint8_t>, framework::DatasetMode::PRECOMMIT,
Manuel Bottinia788c2f2019-04-08 13:18:00 +0100604 combine(combine(combine(combine(combine(datasets::SmallDepthwiseConvolutionLayerDataset3x3(),
605 depth_multipliers),
606 framework::dataset::make("DataType", DataType::QASYMM8)),
607 framework::dataset::make("QuantizationInfo", { QuantizationInfo(0.5f, 10) })),
608 framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })),
609 ActivationFunctionsDataset))
Giorgio Arena04a8f8c2017-11-23 11:45:24 +0000610{
611 validate(CLAccessor(_target), _reference, tolerance_qasymm8);
612}
Pablo Tello8bf622a2018-12-03 15:54:49 +0000613FIXTURE_DATA_TEST_CASE(RunLarge, CLDepthwiseConvolutionLayerQuantizedFixture<uint8_t>, framework::DatasetMode::NIGHTLY,
Manuel Bottinia788c2f2019-04-08 13:18:00 +0100614 combine(combine(combine(combine(combine(datasets::LargeDepthwiseConvolutionLayerDataset3x3(),
615 depth_multipliers),
616 framework::dataset::make("DataType", DataType::QASYMM8)),
617 framework::dataset::make("QuantizationInfo", { QuantizationInfo(0.5f, 10) })),
618 framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })),
619 ActivationFunctionsDataset))
Giorgio Arena04a8f8c2017-11-23 11:45:24 +0000620{
621 validate(CLAccessor(_target), _reference, tolerance_qasymm8);
622}
Usama Arife73686a2019-04-08 17:30:48 +0100623TEST_SUITE(Dilation)
624FIXTURE_DATA_TEST_CASE(RunSmall, CLDepthwiseConvolutionLayerQuantizedFixture<uint8_t>, framework::DatasetMode::PRECOMMIT,
Manuel Bottinia788c2f2019-04-08 13:18:00 +0100625 combine(combine(combine(combine(combine(datasets::SmallDepthwiseDilatedConvolutionLayerDataset3x3(),
626 depth_multipliers),
627 framework::dataset::make("DataType", DataType::QASYMM8)),
628 framework::dataset::make("QuantizationInfo", { QuantizationInfo(0.5f, 10) })),
629 framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })),
630 ActivationFunctionsDataset))
Usama Arife73686a2019-04-08 17:30:48 +0100631{
632 validate(CLAccessor(_target), _reference, tolerance_qasymm8);
633}
634FIXTURE_DATA_TEST_CASE(RunLarge, CLDepthwiseConvolutionLayerQuantizedFixture<uint8_t>, framework::DatasetMode::NIGHTLY,
Manuel Bottinia788c2f2019-04-08 13:18:00 +0100635 combine(combine(combine(combine(combine(datasets::LargeDepthwiseDilatedConvolutionLayerDataset3x3(),
636 depth_multipliers),
637 framework::dataset::make("DataType", DataType::QASYMM8)),
638 framework::dataset::make("QuantizationInfo", { QuantizationInfo(0.5f, 10) })),
639 framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })),
640 ActivationFunctionsDataset))
Usama Arife73686a2019-04-08 17:30:48 +0100641{
642 validate(CLAccessor(_target), _reference, tolerance_qasymm8);
643}
644TEST_SUITE_END() // Dilation
645TEST_SUITE_END() // W3x3
646TEST_SUITE_END() // QASYMM8
647TEST_SUITE_END() // Quantized
Giorgio Arena04a8f8c2017-11-23 11:45:24 +0000648
Usama Arife73686a2019-04-08 17:30:48 +0100649TEST_SUITE_END() // DepthwiseConvolutionLayer
650TEST_SUITE_END() // CL
Giorgio Arena04a8f8c2017-11-23 11:45:24 +0000651} // namespace validation
652} // namespace test
653} // namespace arm_compute