1 /*
2 * Copyright (c) 2022-2023 Arm Limited.
3 *
4 * SPDX-License-Identifier: MIT
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to
8 * deal in the Software without restriction, including without limitation the
9 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10 * sell copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in all
14 * copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 * SOFTWARE.
23 */
24
25 #include "arm_compute/dynamic_fusion/sketch/gpu/operators/GpuDepthwiseConv2d.h"
26
27 #include "tests/CL/CLAccessor.h"
28 #include "tests/datasets/DepthwiseConvolutionLayerDataset.h"
29 #include "tests/datasets/DilatedDepthwiseConvolutionLayerDataset.h"
30 #include "tests/framework/Asserts.h"
31 #include "tests/framework/Fixture.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/dynamic_fusion/gpu/cl/DepthwiseConv2dFixture.h"
36
37 namespace arm_compute
38 {
39 namespace test
40 {
41 namespace validation
42 {
43 const auto depth_multipliers = framework::dataset::make("DepthMultiplier", { 1U, 4U });
44 const auto large_depth_multipliers = framework::dataset::make("DepthMultiplier", { 1, 2, 5, 8 });
45
46 TEST_SUITE(CL)
47 TEST_SUITE(DYNAMIC_FUSION)
48 TEST_SUITE(DEPTHWISE_CONV2D)
49
50 RelativeTolerance<float> tolerance_f32(0.01f); /**< Tolerance value for comparing reference's output against implementation's output for DataType::F32 */
51 RelativeTolerance<half_float::half> tolerance_f16(half_float::half(0.1)); /**< Tolerance value for comparing reference's output against implementation's output for DataType::F16 */
52 constexpr float tolerance_num = 0.02f; /**< Tolerance number */
53
54 // *INDENT-OFF*
55 // clang-format off
56 DATA_TEST_CASE(Validate, framework::DatasetMode::ALL, zip(zip(zip(zip(zip(zip(zip( // Explanations of failing tests
57 framework::dataset::make("InputInfo", { TensorInfo(TensorShape(2U, 27U, 13U), 1, DataType::F32, DataLayout::NHWC), // Mismatching data type input/weights
58 TensorInfo(TensorShape(3U, 27U, 13U), 1, DataType::F32, DataLayout::NHWC), // Mismatching input feature maps
59 TensorInfo(TensorShape(2U, 27U, 13U), 1, DataType::F32, DataLayout::NHWC), // Mismatching depth multiplier
60 TensorInfo(TensorShape(2U, 27U, 13U), 1, DataType::F32, DataLayout::NHWC), // Invalid biases size
61 TensorInfo(TensorShape(2U, 27U, 13U), 1, DataType::F32, DataLayout::NHWC), // Invalid biases dimensions
62 TensorInfo(TensorShape(8U, 27U, 13U), 1, DataType::F32, DataLayout::NHWC), // dilation < 1
63 TensorInfo(TensorShape(8U, 27U, 13U), 1, DataType::F32, DataLayout::NHWC),
64 TensorInfo(TensorShape(8U, 32U, 13U), 1, DataType::QASYMM8, DataLayout::NHWC), // Unsupported data type
65 TensorInfo(TensorShape(8U, 32U, 13U), 1, DataType::QASYMM8_SIGNED, DataLayout::NHWC), // Unsupported data type
66 TensorInfo(TensorShape(8U, 32U, 13U), 1, DataType::QSYMM16, DataLayout::NHWC), // Unsupported data type
67 TensorInfo(TensorShape(8U, 32U, 13U), 1, DataType::QSYMM8, DataLayout::NHWC), // Unsupported data type
68 TensorInfo(TensorShape(8U, 32U, 13U), 1, DataType::QSYMM8_PER_CHANNEL, DataLayout::NHWC), // Unsupported data type
69 TensorInfo(TensorShape(8U, 32U, 13U), 1, DataType::QASYMM16, DataLayout::NHWC), // Unsupported data type
70 TensorInfo(TensorShape(8U, 32U, 13U), 1, DataType::U8, DataLayout::NHWC), // Unsupported data type
71 TensorInfo(TensorShape(8U, 32U, 13U), 1, DataType::S8, DataLayout::NHWC), // Unsupported data type
72 TensorInfo(TensorShape(8U, 32U, 13U), 1, DataType::U16, DataLayout::NHWC), // Unsupported data type
73 TensorInfo(TensorShape(8U, 32U, 13U), 1, DataType::S16, DataLayout::NHWC), // Unsupported data type
74 TensorInfo(TensorShape(8U, 32U, 13U), 1, DataType::U32, DataLayout::NHWC), // Unsupported data type
75 TensorInfo(TensorShape(8U, 32U, 13U), 1, DataType::S32, DataLayout::NHWC), // Unsupported data type
76 TensorInfo(TensorShape(32U, 13U, 8U), 1, DataType::F32, DataLayout::NCHW), // Unsupported data layout
77 TensorInfo(TensorShape(8U, 32U, 13U, 4U), 1, DataType::F32, DataLayout::NHWC),
78 TensorInfo(TensorShape(8U, 32U, 13U, 4U), 1, DataType::F32, DataLayout::NHWC), // weight dimension > 3
79 TensorInfo(TensorShape(8U, 32U, 13U, 4U), 1, DataType::F32, DataLayout::NHWC),
80 TensorInfo(TensorShape(8U, 32U, 13U, 4U), 1, DataType::F32, DataLayout::NHWC),
81 TensorInfo(TensorShape(8U, 32U, 13U, 4U), 1, DataType::F32, DataLayout::NHWC),
82 }),
83 framework::dataset::make("WeightsInfo", { TensorInfo(TensorShape(2U, 3U, 3U, 2U), 1, DataType::F16, DataLayout::NHWC),
84 TensorInfo(TensorShape(2U, 3U, 3U, 2U), 1, DataType::F32, DataLayout::NHWC),
85 TensorInfo(TensorShape(2U, 3U, 3U, 2U), 1, DataType::F32, DataLayout::NHWC),
86 TensorInfo(TensorShape(2U, 3U, 3U, 2U), 1, DataType::F32, DataLayout::NHWC),
87 TensorInfo(TensorShape(2U, 3U, 3U, 2U), 1, DataType::F32, DataLayout::NHWC),
88 TensorInfo(TensorShape(16U, 3U, 3U), 1, DataType::F32, DataLayout::NHWC),
89 TensorInfo(TensorShape(16U, 3U, 3U), 1, DataType::F32, DataLayout::NHWC),
90 TensorInfo(TensorShape(24U, 3U, 3U), 1, DataType::QASYMM8, DataLayout::NHWC),
91 TensorInfo(TensorShape(24U, 3U, 3U), 1, DataType::QASYMM8_SIGNED, DataLayout::NHWC),
92 TensorInfo(TensorShape(24U, 3U, 3U), 1, DataType::QSYMM16, DataLayout::NHWC),
93 TensorInfo(TensorShape(24U, 3U, 3U), 1, DataType::QSYMM8, DataLayout::NHWC),
94 TensorInfo(TensorShape(24U, 3U, 3U), 1, DataType::QSYMM8_PER_CHANNEL, DataLayout::NHWC),
95 TensorInfo(TensorShape(24U, 3U, 3U), 1, DataType::QASYMM16, DataLayout::NHWC),
96 TensorInfo(TensorShape(24U, 3U, 3U), 1, DataType::U8, DataLayout::NHWC),
97 TensorInfo(TensorShape(24U, 3U, 3U), 1, DataType::S8, DataLayout::NHWC),
98 TensorInfo(TensorShape(24U, 3U, 3U), 1, DataType::U16, DataLayout::NHWC),
99 TensorInfo(TensorShape(24U, 3U, 3U), 1, DataType::S16, DataLayout::NHWC),
100 TensorInfo(TensorShape(24U, 3U, 3U), 1, DataType::U32, DataLayout::NHWC),
101 TensorInfo(TensorShape(24U, 3U, 3U), 1, DataType::S32, DataLayout::NHWC),
102 TensorInfo(TensorShape(3U, 3U, 24U), 1, DataType::F32, DataLayout::NCHW),
103 TensorInfo(TensorShape(24U, 3U, 3U), 1, DataType::F32, DataLayout::NHWC),
104 TensorInfo(TensorShape(24U, 3U, 3U, 5U), 1, DataType::F32, DataLayout::NHWC),
105 TensorInfo(TensorShape(24U, 3U, 3U), 1, DataType::F32, DataLayout::NHWC),
106 TensorInfo(TensorShape(24U, 3U, 3U), 1, DataType::F32, DataLayout::NHWC),
107 TensorInfo(TensorShape(24U, 4U, 3U), 1, DataType::F32, DataLayout::NHWC),
108 })),
109 framework::dataset::make("BiasesInfo", { TensorInfo(TensorShape(2U), 1, DataType::F32, DataLayout::NHWC),
110 TensorInfo(TensorShape(2U), 1, DataType::F32, DataLayout::NHWC),
111 TensorInfo(TensorShape(2U), 1, DataType::F32, DataLayout::NHWC),
112 TensorInfo(TensorShape(4U), 1, DataType::F32, DataLayout::NHWC),
113 TensorInfo(TensorShape(2U, 2U), 1, DataType::F32, DataLayout::NHWC),
114 TensorInfo(TensorShape(16U), 1, DataType::F32, DataLayout::NHWC),
115 TensorInfo(TensorShape(16U), 1, DataType::F32, DataLayout::NHWC),
116 TensorInfo(TensorShape(24U), 1, DataType::S32, DataLayout::NHWC),
117 TensorInfo(TensorShape(24U), 1, DataType::S32, DataLayout::NHWC),
118 TensorInfo(TensorShape(24U), 1, DataType::S32, DataLayout::NHWC),
119 TensorInfo(TensorShape(24U), 1, DataType::S32, DataLayout::NHWC),
120 TensorInfo(TensorShape(24U), 1, DataType::S32, DataLayout::NHWC),
121 TensorInfo(TensorShape(24U), 1, DataType::S32, DataLayout::NHWC),
122 TensorInfo(TensorShape(24U), 1, DataType::S32, DataLayout::NHWC),
123 TensorInfo(TensorShape(24U), 1, DataType::S32, DataLayout::NHWC),
124 TensorInfo(TensorShape(24U), 1, DataType::S32, DataLayout::NHWC),
125 TensorInfo(TensorShape(24U), 1, DataType::S32, DataLayout::NHWC),
126 TensorInfo(TensorShape(24U), 1, DataType::S32, DataLayout::NHWC),
127 TensorInfo(TensorShape(24U), 1, DataType::S32, DataLayout::NHWC),
128 TensorInfo(TensorShape(24U), 1, DataType::S32, DataLayout::NCHW),
129 TensorInfo(TensorShape(24U), 1, DataType::F32, DataLayout::NHWC),
130 TensorInfo(TensorShape(24U), 1, DataType::F32, DataLayout::NHWC),
131 TensorInfo(TensorShape(24U), 1, DataType::F32, DataLayout::NHWC),
132 TensorInfo(TensorShape(24U), 1, DataType::F32, DataLayout::NHWC),
133 TensorInfo(TensorShape(24U), 1, DataType::F32, DataLayout::NHWC),
134 })),
135 framework::dataset::make("Padding", { Padding2D(0, 0, 0, 0),
136 Padding2D(0, 0, 0, 0),
137 Padding2D(0, 0, 0, 0),
138 Padding2D(0, 0, 0, 0),
139 Padding2D(0, 0, 0, 0),
140 Padding2D(0, 0, 0, 0),
141 Padding2D(0, 0, 0, 0),
142 Padding2D(1, 1, 0, 0),
143 Padding2D(1, 1, 0, 0),
144 Padding2D(1, 1, 0, 0),
145 Padding2D(1, 1, 0, 0),
146 Padding2D(1, 1, 0, 0),
147 Padding2D(1, 1, 0, 0),
148 Padding2D(1, 1, 0, 0),
149 Padding2D(1, 1, 0, 0),
150 Padding2D(1, 1, 0, 0),
151 Padding2D(1, 1, 0, 0),
152 Padding2D(1, 1, 0, 0),
153 Padding2D(1, 1, 0, 0),
154 Padding2D(1, 1, 0, 0),
155 Padding2D(1, 1, 0, 0),
156 Padding2D(1, 1, 0, 0),
157 Padding2D(2, 1, 2, 1),
158 Padding2D(2, 1, 2, 1),
159 Padding2D(2, 1, 2, 1),
160 })),
161 framework::dataset::make("Stride", { Size2D(1, 1),
162 Size2D(1, 1),
163 Size2D(1, 1),
164 Size2D(1, 1),
165 Size2D(1, 1),
166 Size2D(1, 1),
167 Size2D(1, 1),
168 Size2D(1, 1),
169 Size2D(1, 1),
170 Size2D(1, 1),
171 Size2D(1, 1),
172 Size2D(1, 1),
173 Size2D(1, 1),
174 Size2D(1, 1),
175 Size2D(1, 1),
176 Size2D(1, 1),
177 Size2D(1, 1),
178 Size2D(1, 1),
179 Size2D(1, 1),
180 Size2D(1, 1),
181 Size2D(1, 1),
182 Size2D(1, 1),
183 Size2D(1, 1),
184 Size2D(2, 3),
185 Size2D(2, 3),
186 })),
187 framework::dataset::make("DepthMultiplier", { 1,
188 1,
189 3,
190 1,
191 1,
192 2,
193 2,
194 3,
195 3,
196 3,
197 3,
198 3,
199 3,
200 3,
201 3,
202 3,
203 3,
204 3,
205 3,
206 3,
207 3,
208 3,
209 3,
210 3,
211 3,
212 })),
213 framework::dataset::make("Dilation", { Size2D(1U, 1U),
214 Size2D(1U, 1U),
215 Size2D(1U, 1U),
216 Size2D(1U, 1U),
217 Size2D(1U, 1U),
218 Size2D(0U, 1U),
219 Size2D(1U, 1U),
220 Size2D(1U, 1U),
221 Size2D(1U, 1U),
222 Size2D(1U, 1U),
223 Size2D(1U, 1U),
224 Size2D(1U, 1U),
225 Size2D(1U, 1U),
226 Size2D(1U, 1U),
227 Size2D(1U, 1U),
228 Size2D(1U, 1U),
229 Size2D(1U, 1U),
230 Size2D(1U, 1U),
231 Size2D(1U, 1U),
232 Size2D(1U, 1U),
233 Size2D(1U, 1U),
234 Size2D(1U, 1U),
235 Size2D(1U, 1U),
236 Size2D(1U, 1U),
237 Size2D(2U, 3U),
238 })),
239 framework::dataset::make("Expected", { false, false, false, false, false, false, true, false,
240 false, false, false, false, false, false, false, false, false, false,
241 false, false, true, false, true, true, true })),
242 input_info, weights_info, biases_info, padding, stride, depth_multiplier, dilation, expected)
243 {
244 CLCompileContext cl_compile_ctx = CLKernelLibrary::get().get_compile_context();
245 GpuWorkloadContext gpu_ctx = GpuWorkloadContext{ &cl_compile_ctx };
246 GpuWorkloadSketch sketch{ &gpu_ctx };
247
248 const TensorInfo sketch_input_info = sketch.create_tensor_info(input_info);
249 const TensorInfo sketch_weights_info = sketch.create_tensor_info(weights_info);
250 const TensorInfo sketch_biases_info = sketch.create_tensor_info(biases_info);
251
252 DepthwiseConv2dAttributes attributes {};
253 attributes.pad(padding)
254 .stride(stride)
255 .dilation(dilation)
256 .depth_multiplier(depth_multiplier);
257
258 const Status status = GpuDepthwiseConv2d::validate_op(sketch, &sketch_input_info, &sketch_weights_info, &sketch_biases_info, attributes);
259 const bool res = bool(status);
260 ARM_COMPUTE_EXPECT(res == expected, framework::LogLevel::ERRORS);
261 }
262 // clang-format on
263 // *INDENT-ON*
264
265 template <typename T>
266 using DynamicFusionGpuDepthwiseConv2dFixture = DynamicFusionGpuDepthwiseConv2dValidationFixture<CLTensor, CLAccessor, GpuDepthwiseConv2d, T>;
267
268 TEST_SUITE(Float)
TEST_SUITE(FP16)269 TEST_SUITE(FP16)
270 TEST_SUITE(W3x3)
271 FIXTURE_DATA_TEST_CASE(RunSmall, DynamicFusionGpuDepthwiseConv2dFixture<half>, framework::DatasetMode::ALL,
272 combine(combine(combine(datasets::SmallDepthwiseConvolutionLayerDataset3x3(),
273 depth_multipliers),
274 framework::dataset::make("DataType", DataType::F16)),
275 framework::dataset::make("DataLayout", DataLayout::NHWC)))
276 {
277 validate(CLAccessor(_target), _reference, tolerance_f16);
278 }
279 FIXTURE_DATA_TEST_CASE(RunLarge, DynamicFusionGpuDepthwiseConv2dFixture<half>, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::LargeDepthwiseConvolutionLayerDataset3x3(),
280 large_depth_multipliers),
281 framework::dataset::make("DataType", DataType::F16)),
282 framework::dataset::make("DataLayout", DataLayout::NHWC)))
283 {
284 validate(CLAccessor(_target), _reference, tolerance_f16);
285 }
286 TEST_SUITE(Dilation)
287 FIXTURE_DATA_TEST_CASE(RunSmall, DynamicFusionGpuDepthwiseConv2dFixture<half>, framework::DatasetMode::ALL, combine(combine(combine(datasets::SmallDepthwiseDilatedConvolutionLayerDataset3x3(),
288 depth_multipliers),
289 framework::dataset::make("DataType", DataType::F16)),
290 framework::dataset::make("DataLayout", { DataLayout::NHWC })))
291 {
292 validate(CLAccessor(_target), _reference, tolerance_f16);
293 }
294 FIXTURE_DATA_TEST_CASE(RunLarge, DynamicFusionGpuDepthwiseConv2dFixture<half>, framework::DatasetMode::NIGHTLY,
295 combine(combine(combine(datasets::LargeDepthwiseDilatedConvolutionLayerDataset3x3(),
296 large_depth_multipliers),
297 framework::dataset::make("DataType", DataType::F16)),
298 framework::dataset::make("DataLayout", { DataLayout::NHWC })))
299 {
300 validate(CLAccessor(_target), _reference, tolerance_f16);
301 }
302 TEST_SUITE_END() // Dilation
TEST_SUITE_END()303 TEST_SUITE_END() // W3x3
304
305 TEST_SUITE(Generic)
306 FIXTURE_DATA_TEST_CASE(RunSmall, DynamicFusionGpuDepthwiseConv2dFixture<half>, framework::DatasetMode::ALL, combine(combine(combine(datasets::SmallDepthwiseConvolutionLayerDataset(),
307 depth_multipliers),
308 framework::dataset::make("DataType", DataType::F16)),
309 framework::dataset::make("DataLayout", { DataLayout::NHWC })))
310 {
311 validate(CLAccessor(_target), _reference, tolerance_f16, tolerance_num);
312 }
313 FIXTURE_DATA_TEST_CASE(RunLarge, DynamicFusionGpuDepthwiseConv2dFixture<half>, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::LargeDepthwiseConvolutionLayerDataset(),
314 large_depth_multipliers),
315 framework::dataset::make("DataType", DataType::F16)),
316 framework::dataset::make("DataLayout", { DataLayout::NHWC })))
317 {
318 validate(CLAccessor(_target), _reference, tolerance_f16, tolerance_num);
319 }
320
321 TEST_SUITE(Dilation)
322 FIXTURE_DATA_TEST_CASE(RunSmall, DynamicFusionGpuDepthwiseConv2dFixture<half>, framework::DatasetMode::ALL, combine(combine(combine(datasets::SmallDepthwiseDilatedConvolutionLayerDataset(),
323 depth_multipliers),
324 framework::dataset::make("DataType", DataType::F16)),
325 framework::dataset::make("DataLayout", { DataLayout::NHWC })))
326 {
327 validate(CLAccessor(_target), _reference, tolerance_f16, tolerance_num);
328 }
329 FIXTURE_DATA_TEST_CASE(RunLarge, DynamicFusionGpuDepthwiseConv2dFixture<half>, framework::DatasetMode::NIGHTLY,
330 combine(combine(combine(datasets::LargeDepthwiseDilatedConvolutionLayerDataset(),
331 large_depth_multipliers),
332 framework::dataset::make("DataType", DataType::F16)),
333 framework::dataset::make("DataLayout", { DataLayout::NHWC })))
334 {
335 validate(CLAccessor(_target), _reference, tolerance_f16, tolerance_num);
336 }
337 TEST_SUITE_END() // Dilation
TEST_SUITE_END()338 TEST_SUITE_END() // Generic
339 TEST_SUITE_END() // FP16
340
341 TEST_SUITE(FP32)
342 TEST_SUITE(W3x3)
343 FIXTURE_DATA_TEST_CASE(RunSmall, DynamicFusionGpuDepthwiseConv2dFixture<float>, framework::DatasetMode::ALL,
344 combine(combine(combine(datasets::SmallDepthwiseConvolutionLayerDataset3x3(),
345 depth_multipliers),
346 framework::dataset::make("DataType", DataType::F32)),
347 framework::dataset::make("DataLayout", DataLayout::NHWC)))
348 {
349 validate(CLAccessor(_target), _reference, tolerance_f32);
350 }
351 FIXTURE_DATA_TEST_CASE(RunLarge, DynamicFusionGpuDepthwiseConv2dFixture<float>, framework::DatasetMode::NIGHTLY,
352 combine(combine(combine(datasets::LargeDepthwiseConvolutionLayerDataset3x3(),
353 large_depth_multipliers),
354 framework::dataset::make("DataType", DataType::F32)),
355 framework::dataset::make("DataLayout", DataLayout::NHWC)))
356 {
357 validate(CLAccessor(_target), _reference, tolerance_f32);
358 }
359
360 TEST_SUITE(Dilation)
361
362 FIXTURE_DATA_TEST_CASE(RunSmall, DynamicFusionGpuDepthwiseConv2dFixture<float>, framework::DatasetMode::ALL,
363 combine(combine(combine(datasets::SmallDepthwiseDilatedConvolutionLayerDataset3x3(),
364 depth_multipliers),
365 framework::dataset::make("DataType", DataType::F32)),
366 framework::dataset::make("DataLayout", DataLayout::NHWC)))
367 {
368 validate(CLAccessor(_target), _reference, tolerance_f32);
369 }
370 FIXTURE_DATA_TEST_CASE(RunLarge, DynamicFusionGpuDepthwiseConv2dFixture<float>, framework::DatasetMode::NIGHTLY,
371 combine(combine(combine(datasets::LargeDepthwiseDilatedConvolutionLayerDataset3x3(),
372 large_depth_multipliers),
373 framework::dataset::make("DataType", DataType::F32)),
374 framework::dataset::make("DataLayout", DataLayout::NHWC)))
375 {
376 validate(CLAccessor(_target), _reference, tolerance_f32);
377 }
378 TEST_SUITE_END() // Dilation
TEST_SUITE_END()379 TEST_SUITE_END() // W3x3
380
381 TEST_SUITE(Generic)
382 FIXTURE_DATA_TEST_CASE(RunSmall, DynamicFusionGpuDepthwiseConv2dFixture<float>, framework::DatasetMode::ALL,
383 combine(combine(combine(datasets::SmallDepthwiseConvolutionLayerDataset(),
384 depth_multipliers),
385 framework::dataset::make("DataType", DataType::F32)),
386 framework::dataset::make("DataLayout", { DataLayout::NHWC })))
387 {
388 validate(CLAccessor(_target), _reference, tolerance_f32);
389 }
390
391 FIXTURE_DATA_TEST_CASE(RunLarge, DynamicFusionGpuDepthwiseConv2dFixture<float>, framework::DatasetMode::NIGHTLY,
392 combine(combine(combine(datasets::LargeDepthwiseConvolutionLayerDataset(),
393 large_depth_multipliers),
394 framework::dataset::make("DataType", DataType::F32)),
395 framework::dataset::make("DataLayout", { DataLayout::NHWC })))
396 {
397 validate(CLAccessor(_target), _reference, tolerance_f32);
398 }
399
400 FIXTURE_DATA_TEST_CASE(RunLargeKernelSize, DynamicFusionGpuDepthwiseConv2dFixture<float>, framework::DatasetMode::ALL,
401 combine(combine(combine(datasets::LargeKernelSizeDepthwiseConvolutionLayerNHWCDataset(),
402 framework::dataset::make("DepthMultiplier", { 1 })),
403 framework::dataset::make("DataType", DataType::F32)),
404 framework::dataset::make("DataLayout", { DataLayout::NHWC })))
405 {
406 validate(CLAccessor(_target), _reference, tolerance_f32);
407 }
408
409 TEST_SUITE(Dilation)
410 FIXTURE_DATA_TEST_CASE(RunSmall, DynamicFusionGpuDepthwiseConv2dFixture<float>, framework::DatasetMode::ALL, combine(combine(combine(datasets::SmallDepthwiseDilatedConvolutionLayerDataset(),
411 depth_multipliers),
412 framework::dataset::make("DataType", DataType::F32)),
413 framework::dataset::make("DataLayout", { DataLayout::NHWC })))
414 {
415 validate(CLAccessor(_target), _reference, tolerance_f32);
416 }
417 FIXTURE_DATA_TEST_CASE(RunLarge, DynamicFusionGpuDepthwiseConv2dFixture<float>, framework::DatasetMode::NIGHTLY,
418 combine(combine(combine(datasets::LargeDepthwiseDilatedConvolutionLayerDataset3x3(),
419 large_depth_multipliers),
420 framework::dataset::make("DataType", DataType::F32)),
421 framework::dataset::make("DataLayout", { DataLayout::NHWC })))
422 {
423 validate(CLAccessor(_target), _reference, tolerance_f32);
424 }
425 TEST_SUITE_END() // Dilation
426 TEST_SUITE_END() // Generic
427 TEST_SUITE_END() // FP32
428 TEST_SUITE_END() // Float
429 TEST_SUITE_END() // DEPTHWISE_CONV2D
430 TEST_SUITE_END() // DYNAMIC_FUSION
431 TEST_SUITE_END() // CL
432 } // namespace validation
433 } // namespace test
434 } // namespace arm_compute
435