xref: /aosp_15_r20/external/ComputeLibrary/tests/validation/CL/Convolution3D.cpp (revision c217d954acce2dbc11938adb493fc0abd69584f3)
1*c217d954SCole Faust /*
2*c217d954SCole Faust  * Copyright (c) 2021, 2023 Arm Limited.
3*c217d954SCole Faust  *
4*c217d954SCole Faust  * SPDX-License-Identifier: MIT
5*c217d954SCole Faust  *
6*c217d954SCole Faust  * Permission is hereby granted, free of charge, to any person obtaining a copy
7*c217d954SCole Faust  * of this software and associated documentation files (the "Software"), to
8*c217d954SCole Faust  * deal in the Software without restriction, including without limitation the
9*c217d954SCole Faust  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10*c217d954SCole Faust  * sell copies of the Software, and to permit persons to whom the Software is
11*c217d954SCole Faust  * furnished to do so, subject to the following conditions:
12*c217d954SCole Faust  *
13*c217d954SCole Faust  * The above copyright notice and this permission notice shall be included in all
14*c217d954SCole Faust  * copies or substantial portions of the Software.
15*c217d954SCole Faust  *
16*c217d954SCole Faust  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17*c217d954SCole Faust  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18*c217d954SCole Faust  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19*c217d954SCole Faust  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20*c217d954SCole Faust  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21*c217d954SCole Faust  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22*c217d954SCole Faust  * SOFTWARE.
23*c217d954SCole Faust  */
24*c217d954SCole Faust #include "arm_compute/runtime/CL/CLTensor.h"
25*c217d954SCole Faust #include "arm_compute/runtime/CL/functions/CLConv3D.h"
26*c217d954SCole Faust #include "arm_compute/runtime/FunctionDescriptors.h"
27*c217d954SCole Faust #include "tests/CL/CLAccessor.h"
28*c217d954SCole Faust #include "tests/framework/Macros.h"
29*c217d954SCole Faust #include "tests/framework/datasets/Datasets.h"
30*c217d954SCole Faust #include "tests/validation/Validation.h"
31*c217d954SCole Faust #include "tests/validation/fixtures/DirectConvolution3DFixture.h"
32*c217d954SCole Faust 
33*c217d954SCole Faust namespace arm_compute
34*c217d954SCole Faust {
35*c217d954SCole Faust namespace test
36*c217d954SCole Faust {
37*c217d954SCole Faust namespace validation
38*c217d954SCole Faust {
39*c217d954SCole Faust namespace
40*c217d954SCole Faust {
41*c217d954SCole Faust const RelativeTolerance<half>        rel_tolerance_fp16(half(0.2)); /**< Relative tolerance for FP16 tests */
42*c217d954SCole Faust constexpr float                      abs_tolerance_fp16(0.02f);     /**< Absolute tolerance for FP16 tests */
43*c217d954SCole Faust constexpr RelativeTolerance<float>   rel_tolerance_fp32(0.05f);     /**< Relative tolerance for FP32 tests */
44*c217d954SCole Faust constexpr float                      abs_tolerance_fp32(0.0001f);   /**< Absolute tolerance for FP32 tests*/
45*c217d954SCole Faust constexpr AbsoluteTolerance<uint8_t> abs_tolerance_qasymm8(1);      /**< Absolute tolerance for quantized tests */
46*c217d954SCole Faust constexpr float                      tolerance_num = 0.07f;         /**< Tolerance number */
47*c217d954SCole Faust } // namespace
48*c217d954SCole Faust 
49*c217d954SCole Faust TEST_SUITE(CL)
TEST_SUITE(DirectConvolution3D)50*c217d954SCole Faust TEST_SUITE(DirectConvolution3D)
51*c217d954SCole Faust 
52*c217d954SCole Faust // *INDENT-OFF*
53*c217d954SCole Faust // clang-format off
54*c217d954SCole Faust DATA_TEST_CASE(Validate, framework::DatasetMode::ALL, zip(zip(zip(zip(zip(zip(zip(zip(
55*c217d954SCole Faust                framework::dataset::make("InputShape", { TensorShape(27U, 13U, 5U, 3U), // Unsupported data layout
56*c217d954SCole Faust                                                         TensorShape(27U, 13U, 5U, 3U), // Unsupported activation enabled
57*c217d954SCole Faust                                                         TensorShape(27U, 13U, 5U, 3U), // Mismatching data type
58*c217d954SCole Faust                                                         TensorShape(27U, 13U, 5U, 3U), // Unsupported data type
59*c217d954SCole Faust                                                         TensorShape(27U, 13U, 5U, 3U), // Mismatching input feature maps
60*c217d954SCole Faust                                                         TensorShape(27U, 13U, 5U, 3U), // Mismatching output feature maps
61*c217d954SCole Faust                                                         TensorShape(27U, 13U, 5U, 3U), // Mismatching bias shape
62*c217d954SCole Faust                                                         TensorShape(27U, 13U, 5U, 3U), // Unsupported number of weights dimensions
63*c217d954SCole Faust                                                         TensorShape(27U, 13U, 5U, 3U), // Unsupported number of biases dimensions
64*c217d954SCole Faust                                                         TensorShape(27U, 13U, 5U, 3U), // Mismatching output shape
65*c217d954SCole Faust                                                         TensorShape(27U, 13U, 5U, 3U)
66*c217d954SCole Faust                                                      }),
67*c217d954SCole Faust                framework::dataset::make("WeightsShape", { TensorShape(4U, 27U, 3U, 3U, 3U),
68*c217d954SCole Faust                                                           TensorShape(4U, 27U, 3U, 3U, 3U),
69*c217d954SCole Faust                                                           TensorShape(4U, 27U, 3U, 3U, 3U),
70*c217d954SCole Faust                                                           TensorShape(4U, 27U, 3U, 3U, 3U),
71*c217d954SCole Faust                                                           TensorShape(4U, 32U, 3U, 3U, 3U),
72*c217d954SCole Faust                                                           TensorShape(8U, 27U, 3U, 3U, 3U),
73*c217d954SCole Faust                                                           TensorShape(4U, 27U, 3U, 3U, 3U),
74*c217d954SCole Faust                                                           TensorShape(4U, 27U, 3U, 3U, 3U, 2U),
75*c217d954SCole Faust                                                           TensorShape(4U, 27U, 3U, 3U, 3U),
76*c217d954SCole Faust                                                           TensorShape(4U, 27U, 3U, 3U, 3U),
77*c217d954SCole Faust                                                           TensorShape(4U, 27U, 3U, 3U, 3U)
78*c217d954SCole Faust                                                      })),
79*c217d954SCole Faust                framework::dataset::make("BiasesShape", { TensorShape(4U),
80*c217d954SCole Faust                                                          TensorShape(4U),
81*c217d954SCole Faust                                                          TensorShape(4U),
82*c217d954SCole Faust                                                          TensorShape(4U),
83*c217d954SCole Faust                                                          TensorShape(4U),
84*c217d954SCole Faust                                                          TensorShape(4U),
85*c217d954SCole Faust                                                          TensorShape(8U),
86*c217d954SCole Faust                                                          TensorShape(4U),
87*c217d954SCole Faust                                                          TensorShape(4U),
88*c217d954SCole Faust                                                          TensorShape(4U),
89*c217d954SCole Faust                                                          TensorShape(4U)
90*c217d954SCole Faust                                                      })),
91*c217d954SCole Faust                framework::dataset::make("OutputShape", { TensorShape(4U, 13U, 5U, 3U),
92*c217d954SCole Faust                                                          TensorShape(4U, 13U, 5U, 3U),
93*c217d954SCole Faust                                                          TensorShape(4U, 13U, 5U, 3U),
94*c217d954SCole Faust                                                          TensorShape(4U, 13U, 5U, 3U),
95*c217d954SCole Faust                                                          TensorShape(4U, 13U, 5U, 3U),
96*c217d954SCole Faust                                                          TensorShape(4U, 13U, 5U, 3U),
97*c217d954SCole Faust                                                          TensorShape(4U, 13U, 5U, 3U),
98*c217d954SCole Faust                                                          TensorShape(4U, 13U, 5U, 3U),
99*c217d954SCole Faust                                                          TensorShape(4U, 13U, 5U, 3U, 2U),
100*c217d954SCole Faust                                                          TensorShape(4U, 11U, 5U, 3U),
101*c217d954SCole Faust                                                          TensorShape(4U, 13U, 5U, 3U)
102*c217d954SCole Faust                                                      })),
103*c217d954SCole Faust                framework::dataset::make("Conv3dInfo",  { Conv3dInfo(Size3D(1U, 1U, 1U), Padding3D(1U, 1U, 1U), ActivationLayerInfo(), Size3D(1U, 1U, 1U), DimensionRoundingType::FLOOR, false),
104*c217d954SCole Faust                                                          Conv3dInfo(Size3D(1U, 1U, 1U), Padding3D(1U, 1U, 1U), ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU), Size3D(1U, 1U, 1U), DimensionRoundingType::FLOOR, false),
105*c217d954SCole Faust                                                          Conv3dInfo(Size3D(1U, 1U, 1U), Padding3D(1U, 1U, 1U), ActivationLayerInfo(), Size3D(1U, 1U, 1U), DimensionRoundingType::FLOOR, false),
106*c217d954SCole Faust                                                          Conv3dInfo(Size3D(1U, 1U, 1U), Padding3D(1U, 1U, 1U), ActivationLayerInfo(), Size3D(1U, 1U, 1U), DimensionRoundingType::FLOOR, false),
107*c217d954SCole Faust                                                          Conv3dInfo(Size3D(1U, 1U, 1U), Padding3D(1U, 1U, 1U), ActivationLayerInfo(), Size3D(1U, 1U, 1U), DimensionRoundingType::FLOOR, false),
108*c217d954SCole Faust                                                          Conv3dInfo(Size3D(1U, 1U, 1U), Padding3D(1U, 1U, 1U), ActivationLayerInfo(), Size3D(1U, 1U, 1U), DimensionRoundingType::FLOOR, false),
109*c217d954SCole Faust                                                          Conv3dInfo(Size3D(1U, 1U, 1U), Padding3D(1U, 1U, 1U), ActivationLayerInfo(), Size3D(1U, 1U, 1U), DimensionRoundingType::FLOOR, false),
110*c217d954SCole Faust                                                          Conv3dInfo(Size3D(1U, 1U, 1U), Padding3D(1U, 1U, 1U), ActivationLayerInfo(), Size3D(1U, 1U, 1U), DimensionRoundingType::FLOOR, false),
111*c217d954SCole Faust                                                          Conv3dInfo(Size3D(1U, 1U, 1U), Padding3D(1U, 1U, 1U), ActivationLayerInfo(), Size3D(1U, 1U, 1U), DimensionRoundingType::FLOOR, false),
112*c217d954SCole Faust                                                          Conv3dInfo(Size3D(1U, 1U, 1U), Padding3D(1U, 1U, 1U), ActivationLayerInfo(), Size3D(1U, 1U, 1U), DimensionRoundingType::FLOOR, false),
113*c217d954SCole Faust                                                          Conv3dInfo(Size3D(1U, 1U, 1U), Padding3D(1U, 1U, 1U), ActivationLayerInfo(), Size3D(1U, 1U, 1U), DimensionRoundingType::FLOOR, false)
114*c217d954SCole Faust                                                       })),
115*c217d954SCole Faust                 framework::dataset::make("SrcDataType", { DataType::F32,
116*c217d954SCole Faust                                                           DataType::F32,
117*c217d954SCole Faust                                                           DataType::F32,
118*c217d954SCole Faust                                                           DataType::U32,
119*c217d954SCole Faust                                                           DataType::F32,
120*c217d954SCole Faust                                                           DataType::F32,
121*c217d954SCole Faust                                                           DataType::F32,
122*c217d954SCole Faust                                                           DataType::F32,
123*c217d954SCole Faust                                                           DataType::F32,
124*c217d954SCole Faust                                                           DataType::F32,
125*c217d954SCole Faust                                                           DataType::F32
126*c217d954SCole Faust                                                       })),
127*c217d954SCole Faust                 framework::dataset::make("WeightsDataType", { DataType::F32,
128*c217d954SCole Faust                                                               DataType::F32,
129*c217d954SCole Faust                                                               DataType::F16,
130*c217d954SCole Faust                                                               DataType::U32,
131*c217d954SCole Faust                                                               DataType::F32,
132*c217d954SCole Faust                                                               DataType::F32,
133*c217d954SCole Faust                                                               DataType::F32,
134*c217d954SCole Faust                                                               DataType::F32,
135*c217d954SCole Faust                                                               DataType::F32,
136*c217d954SCole Faust                                                               DataType::F32,
137*c217d954SCole Faust                                                               DataType::F32
138*c217d954SCole Faust                                                       })),
139*c217d954SCole Faust                 framework::dataset::make("DataLayout", { DataLayout::NCDHW,
140*c217d954SCole Faust                                                          DataLayout::NDHWC,
141*c217d954SCole Faust                                                          DataLayout::NDHWC,
142*c217d954SCole Faust                                                          DataLayout::NDHWC,
143*c217d954SCole Faust                                                          DataLayout::NDHWC,
144*c217d954SCole Faust                                                          DataLayout::NDHWC,
145*c217d954SCole Faust                                                          DataLayout::NDHWC,
146*c217d954SCole Faust                                                          DataLayout::NDHWC,
147*c217d954SCole Faust                                                          DataLayout::NDHWC,
148*c217d954SCole Faust                                                          DataLayout::NDHWC,
149*c217d954SCole Faust                                                          DataLayout::NDHWC
150*c217d954SCole Faust                                                       })),
151*c217d954SCole Faust                framework::dataset::make("Expected", { false, false, false, false, false, false, false, false, false, false, true })),
152*c217d954SCole Faust                input_shape, weights_shape, biases_shape, output_shape, conv3d_info, src_data_type, weights_data_type, data_layout, expected)
153*c217d954SCole Faust {
154*c217d954SCole Faust     TensorInfo input_info   = TensorInfo(input_shape, 1, src_data_type);
155*c217d954SCole Faust     TensorInfo weights_info = TensorInfo(weights_shape, 1, weights_data_type);
156*c217d954SCole Faust     TensorInfo biases_info  = TensorInfo(biases_shape, 1, src_data_type);
157*c217d954SCole Faust     TensorInfo output_info  = TensorInfo(output_shape, 1, src_data_type);
158*c217d954SCole Faust 
159*c217d954SCole Faust     input_info.set_data_layout(data_layout);
160*c217d954SCole Faust     weights_info.set_data_layout(data_layout);
161*c217d954SCole Faust     biases_info.set_data_layout(data_layout);
162*c217d954SCole Faust     output_info.set_data_layout(data_layout);
163*c217d954SCole Faust 
164*c217d954SCole Faust     bool is_valid = bool(CLConv3D::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), conv3d_info));
165*c217d954SCole Faust     ARM_COMPUTE_EXPECT(is_valid == expected, framework::LogLevel::ERRORS);
166*c217d954SCole Faust }
167*c217d954SCole Faust 
168*c217d954SCole Faust template <typename T>
169*c217d954SCole Faust using CLDirectConvolution3DFixture = DirectConvolution3DValidationFixture<CLTensor, CLAccessor, CLConv3D, T>;
170*c217d954SCole Faust template <typename T>
171*c217d954SCole Faust using CLDirectConvolution3DQuantizedFixture = DirectConvolution3DValidationQuantizedFixture<CLTensor, CLAccessor, CLConv3D, T>;
172*c217d954SCole Faust 
173*c217d954SCole Faust TEST_SUITE(NDHWC)
TEST_SUITE(FP16)174*c217d954SCole Faust TEST_SUITE(FP16)
175*c217d954SCole Faust FIXTURE_DATA_TEST_CASE(RunSmall, CLDirectConvolution3DFixture<half>, framework::DatasetMode::PRECOMMIT,
176*c217d954SCole Faust                        combine(combine(combine(zip(zip(zip(zip(zip(zip(zip(zip(zip(zip(zip(
177*c217d954SCole Faust                        framework::dataset::make("InputShape", { TensorShape(7U, 5U, 3U, 13U, 3U),
178*c217d954SCole Faust                                                                 TensorShape(15U, 7U, 11U, 7U),
179*c217d954SCole Faust                                                                 TensorShape(19U, 5U, 16U, 4U),
180*c217d954SCole Faust                                                                 TensorShape(13U, 5U, 17U, 2U)
181*c217d954SCole Faust                                                               }),
182*c217d954SCole Faust                        framework::dataset::make("StrideX", { 1, 3, 2, 1 })),
183*c217d954SCole Faust                        framework::dataset::make("StrideY", { 2, 1, 3, 1 })),
184*c217d954SCole Faust                        framework::dataset::make("StrideZ", { 3, 2, 1, 1 })),
185*c217d954SCole Faust                        framework::dataset::make("PadX", { 0, 2, 1, 0 })),
186*c217d954SCole Faust                        framework::dataset::make("PadY", { 1, 0, 2, 0 })),
187*c217d954SCole Faust                        framework::dataset::make("PadZ", { 2, 1, 0, 0 })),
188*c217d954SCole Faust                        framework::dataset::make("KernelWidth", { 3, 7, 5, 1 })),
189*c217d954SCole Faust                        framework::dataset::make("KernelHeight", { 5, 3, 7, 1 })),
190*c217d954SCole Faust                        framework::dataset::make("KernelDepth", { 7, 5, 3, 1 })),
191*c217d954SCole Faust                        framework::dataset::make("NumKernels", { 5, 3, 1, 11 })),
192*c217d954SCole Faust                        framework::dataset::make("HasBias", { true, true, true, false })),
193*c217d954SCole Faust                        framework::dataset::make("Activation", ActivationLayerInfo())),
194*c217d954SCole Faust                        framework::dataset::make("DataType", DataType::F16)),
195*c217d954SCole Faust                        framework::dataset::make("DataLayout", DataLayout::NDHWC)))
196*c217d954SCole Faust {
197*c217d954SCole Faust     validate(CLAccessor(_target), _reference, rel_tolerance_fp16, tolerance_num, abs_tolerance_fp16);
198*c217d954SCole Faust }
199*c217d954SCole Faust 
200*c217d954SCole Faust TEST_SUITE_END() // FP16
201*c217d954SCole Faust 
TEST_SUITE(FP32)202*c217d954SCole Faust TEST_SUITE(FP32)
203*c217d954SCole Faust FIXTURE_DATA_TEST_CASE(RunSmall, CLDirectConvolution3DFixture<float>, framework::DatasetMode::PRECOMMIT,
204*c217d954SCole Faust                        combine(combine(combine(zip(zip(zip(zip(zip(zip(zip(zip(zip(zip(zip(
205*c217d954SCole Faust                        framework::dataset::make("InputShape", { TensorShape(7U, 5U, 3U, 13U, 3U),
206*c217d954SCole Faust                                                                 TensorShape(15U, 7U, 11U, 7U),
207*c217d954SCole Faust                                                                 TensorShape(19U, 5U, 16U, 4U),
208*c217d954SCole Faust                                                                 TensorShape(13U, 5U, 17U, 2U)
209*c217d954SCole Faust                                                               }),
210*c217d954SCole Faust                        framework::dataset::make("StrideX", { 1, 3, 2, 1 })),
211*c217d954SCole Faust                        framework::dataset::make("StrideY", { 2, 1, 3, 1 })),
212*c217d954SCole Faust                        framework::dataset::make("StrideZ", { 3, 2, 1, 1 })),
213*c217d954SCole Faust                        framework::dataset::make("PadX", { 0, 2, 1, 0 })),
214*c217d954SCole Faust                        framework::dataset::make("PadY", { 1, 0, 2, 0 })),
215*c217d954SCole Faust                        framework::dataset::make("PadZ", { 2, 1, 0, 0 })),
216*c217d954SCole Faust                        framework::dataset::make("KernelWidth", { 3, 7, 5, 1 })),
217*c217d954SCole Faust                        framework::dataset::make("KernelHeight", { 5, 3, 7, 1 })),
218*c217d954SCole Faust                        framework::dataset::make("KernelDepth", { 7, 5, 3, 1 })),
219*c217d954SCole Faust                        framework::dataset::make("NumKernels", { 5, 3, 1, 11 })),
220*c217d954SCole Faust                        framework::dataset::make("HasBias", { true, true, true, false })),
221*c217d954SCole Faust                        framework::dataset::make("Activation", ActivationLayerInfo())),
222*c217d954SCole Faust                        framework::dataset::make("DataType", DataType::F32)),
223*c217d954SCole Faust                        framework::dataset::make("DataLayout", DataLayout::NDHWC)))
224*c217d954SCole Faust {
225*c217d954SCole Faust     validate(CLAccessor(_target), _reference, rel_tolerance_fp32, 0.0, abs_tolerance_fp32);
226*c217d954SCole Faust }
227*c217d954SCole Faust 
228*c217d954SCole Faust // clang-format on
229*c217d954SCole Faust // *INDENT-ON*
230*c217d954SCole Faust TEST_SUITE_END() // FP32
231*c217d954SCole Faust 
TEST_SUITE(QASYMM8)232*c217d954SCole Faust TEST_SUITE(QASYMM8)
233*c217d954SCole Faust FIXTURE_DATA_TEST_CASE(RunSmall, CLDirectConvolution3DQuantizedFixture<uint8_t>, framework::DatasetMode::PRECOMMIT,
234*c217d954SCole Faust                        combine(combine(combine(combine(combine(combine(zip(zip(zip(zip(zip(zip(zip(zip(zip(zip(zip(
235*c217d954SCole Faust                                                                                                                    framework::dataset::make("InputShape", { TensorShape(7U, 5U, 3U, 13U, 3U),
236*c217d954SCole Faust                                                                                                                            TensorShape(15U, 7U, 11U, 7U),
237*c217d954SCole Faust                                                                                                                            TensorShape(19U, 5U, 16U, 4U),
238*c217d954SCole Faust                                                                                                                            TensorShape(13U, 5U, 17U, 2U)
239*c217d954SCole Faust                                                                                                                                                           }),
240*c217d954SCole Faust                                                                                                                    framework::dataset::make("StrideX", { 1, 3, 2, 1 })),
241*c217d954SCole Faust                                                                                                                framework::dataset::make("StrideY", { 2, 1, 3, 1 })),
242*c217d954SCole Faust                                                                                                            framework::dataset::make("StrideZ", { 3, 2, 1, 1 })),
243*c217d954SCole Faust                                                                                                        framework::dataset::make("PadX", { 0, 2, 1, 0 })),
244*c217d954SCole Faust                                                                                                    framework::dataset::make("PadY", { 1, 0, 2, 0 })),
245*c217d954SCole Faust                                                                                                framework::dataset::make("PadZ", { 2, 1, 0, 0 })),
246*c217d954SCole Faust                                                                                            framework::dataset::make("KernelWidth", { 3, 7, 5, 1 })),
247*c217d954SCole Faust                                                                                        framework::dataset::make("KernelHeight", { 5, 3, 7, 1 })),
248*c217d954SCole Faust                                                                                    framework::dataset::make("KernelDepth", { 7, 5, 3, 1 })),
249*c217d954SCole Faust                                                                                framework::dataset::make("NumKernels", { 5, 3, 1, 11 })),
250*c217d954SCole Faust                                                                            framework::dataset::make("HasBias", { true, true, true, false })),
251*c217d954SCole Faust                                                                        framework::dataset::make("Activation", ActivationLayerInfo())),
252*c217d954SCole Faust                                                                framework::dataset::make("DataType", DataType::QASYMM8)),
253*c217d954SCole Faust                                                        framework::dataset::make("DataLayout", DataLayout::NDHWC)),
254*c217d954SCole Faust                                                framework::dataset::make("SrcQuantizationInfo", QuantizationInfo(0.1f, 10))),
255*c217d954SCole Faust                                        framework::dataset::make("WeightsQuantizationInfo", QuantizationInfo(0.3f, 20))),
256*c217d954SCole Faust                                framework::dataset::make("DstQuantizationInfo", QuantizationInfo(0.2f, 5))))
257*c217d954SCole Faust {
258*c217d954SCole Faust     validate(CLAccessor(_target), _reference, abs_tolerance_qasymm8);
259*c217d954SCole Faust }
260*c217d954SCole Faust 
261*c217d954SCole Faust TEST_SUITE_END() // QASYMM8
262*c217d954SCole Faust 
TEST_SUITE(QASYMM8_SIGNED)263*c217d954SCole Faust TEST_SUITE(QASYMM8_SIGNED)
264*c217d954SCole Faust FIXTURE_DATA_TEST_CASE(RunSmall, CLDirectConvolution3DQuantizedFixture<int8_t>, framework::DatasetMode::PRECOMMIT,
265*c217d954SCole Faust                        combine(combine(combine(combine(combine(combine(zip(zip(zip(zip(zip(zip(zip(zip(zip(zip(zip(
266*c217d954SCole Faust                                                                                                                    framework::dataset::make("InputShape", { TensorShape(7U, 5U, 3U, 13U, 3U),
267*c217d954SCole Faust                                                                                                                            TensorShape(15U, 7U, 11U, 7U),
268*c217d954SCole Faust                                                                                                                            TensorShape(19U, 5U, 16U, 4U),
269*c217d954SCole Faust                                                                                                                            TensorShape(13U, 5U, 17U, 2U)
270*c217d954SCole Faust                                                                                                                                                           }),
271*c217d954SCole Faust                                                                                                                    framework::dataset::make("StrideX", { 1, 3, 2, 1 })),
272*c217d954SCole Faust                                                                                                                framework::dataset::make("StrideY", { 2, 1, 3, 1 })),
273*c217d954SCole Faust                                                                                                            framework::dataset::make("StrideZ", { 3, 2, 1, 1 })),
274*c217d954SCole Faust                                                                                                        framework::dataset::make("PadX", { 0, 2, 1, 0 })),
275*c217d954SCole Faust                                                                                                    framework::dataset::make("PadY", { 1, 0, 2, 0 })),
276*c217d954SCole Faust                                                                                                framework::dataset::make("PadZ", { 2, 1, 0, 0 })),
277*c217d954SCole Faust                                                                                            framework::dataset::make("KernelWidth", { 3, 7, 5, 1 })),
278*c217d954SCole Faust                                                                                        framework::dataset::make("KernelHeight", { 5, 3, 7, 1 })),
279*c217d954SCole Faust                                                                                    framework::dataset::make("KernelDepth", { 7, 5, 3, 1 })),
280*c217d954SCole Faust                                                                                framework::dataset::make("NumKernels", { 5, 3, 1, 11 })),
281*c217d954SCole Faust                                                                            framework::dataset::make("HasBias", { true, true, true, false })),
282*c217d954SCole Faust                                                                        framework::dataset::make("Activation", ActivationLayerInfo())),
283*c217d954SCole Faust                                                                framework::dataset::make("DataType", DataType::QASYMM8_SIGNED)),
284*c217d954SCole Faust                                                        framework::dataset::make("DataLayout", DataLayout::NDHWC)),
285*c217d954SCole Faust                                                framework::dataset::make("SrcQuantizationInfo", QuantizationInfo(0.1f, 10))),
286*c217d954SCole Faust                                        framework::dataset::make("WeightsQuantizationInfo", QuantizationInfo(0.3f, 20))),
287*c217d954SCole Faust                                framework::dataset::make("DstQuantizationInfo", QuantizationInfo(0.2f, 5))))
288*c217d954SCole Faust {
289*c217d954SCole Faust     validate(CLAccessor(_target), _reference, abs_tolerance_qasymm8);
290*c217d954SCole Faust }
291*c217d954SCole Faust 
292*c217d954SCole Faust TEST_SUITE_END() // QASYMM8_SIGNED
293*c217d954SCole Faust 
294*c217d954SCole Faust TEST_SUITE_END() // NDHWC
295*c217d954SCole Faust TEST_SUITE_END() // DirectConvolution3D
296*c217d954SCole Faust TEST_SUITE_END() // CL
297*c217d954SCole Faust 
298*c217d954SCole Faust } // namespace validation
299*c217d954SCole Faust } // namespace test
300*c217d954SCole Faust } // namespace arm_compute
301