Michalis Spyrou | 780db4e | 2017-11-23 09:49:51 +0000 | [diff] [blame] | 1 | /* |
Viet-Hoa Do | 019a7d9 | 2023-06-27 16:33:57 +0100 | [diff] [blame] | 2 | * Copyright (c) 2017-2023 Arm Limited. |
Michalis Spyrou | 780db4e | 2017-11-23 09:49:51 +0000 | [diff] [blame] | 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 | */ |
Michalis Spyrou | 780db4e | 2017-11-23 09:49:51 +0000 | [diff] [blame] | 24 | #include "arm_compute/core/Types.h" |
Michele Di Giorgio | ed5a492 | 2018-09-13 16:22:01 +0100 | [diff] [blame] | 25 | #include "arm_compute/core/utils/misc/ShapeCalculator.h" |
Michalis Spyrou | 780db4e | 2017-11-23 09:49:51 +0000 | [diff] [blame] | 26 | #include "arm_compute/runtime/CL/CLTensor.h" |
| 27 | #include "arm_compute/runtime/CL/CLTensorAllocator.h" |
| 28 | #include "arm_compute/runtime/CL/functions/CLDeconvolutionLayer.h" |
| 29 | #include "tests/CL/CLAccessor.h" |
| 30 | #include "tests/PaddingCalculator.h" |
| 31 | #include "tests/datasets/ShapeDatasets.h" |
| 32 | #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/DeconvolutionLayerFixture.h" |
| 37 | |
| 38 | namespace arm_compute |
| 39 | { |
| 40 | namespace test |
| 41 | { |
| 42 | namespace validation |
| 43 | { |
| 44 | namespace |
| 45 | { |
Georgios Pinitas | 793f87d | 2018-05-18 20:08:58 +0100 | [diff] [blame] | 46 | constexpr AbsoluteTolerance<float> tolerance_fp32(0.001f); /**< Tolerance for floating point tests */ |
| 47 | RelativeTolerance<half_float::half> tolerance_f16(half_float::half(0.2)); /**< Tolerance value for comparing reference's for DataType::F16 */ |
Giuseppe Rossini | 0a958cb | 2020-01-16 16:38:56 +0000 | [diff] [blame] | 48 | constexpr AbsoluteTolerance<float> tolerance_qasymm8(1.0); /**< Tolerance value for comparing reference's output against implementation's output for quantized data types */ |
Georgios Pinitas | 793f87d | 2018-05-18 20:08:58 +0100 | [diff] [blame] | 49 | constexpr float tolerance_num = 0.07f; /**< Tolerance number */ |
Michalis Spyrou | 780db4e | 2017-11-23 09:49:51 +0000 | [diff] [blame] | 50 | |
Manuel Bottini | 6e10aa3 | 2020-04-30 13:28:23 +0100 | [diff] [blame] | 51 | const auto data9x9_small_asymm = framework::dataset::make("InputShape", TensorShape{ 10U, 10U, 1U, 1U }) *framework::dataset::make("StrideX", 2) *framework::dataset::make("StrideY", |
| 52 | 2) |
| 53 | *framework::dataset::make("PadLeft", 3) |
| 54 | *framework::dataset::make("PadRight", 4) *framework::dataset::make("PadTop", 3) *framework::dataset::make("PadBottom", 4) *framework::dataset::make("NumKernels", { 1 }); |
| 55 | |
Gunes Bayir | c6137d2 | 2023-10-09 20:47:16 +0100 | [diff] [blame] | 56 | const auto data4x4 = datasets::SmallDeconvolutionShapes() * framework::dataset::make("StrideX", 1, 4, 2) * framework::dataset::make("StrideY", 2, 4) * framework::dataset::make("PadX", 1, 3) |
giuros01 | a69a88b | 2019-01-31 16:29:19 +0000 | [diff] [blame] | 57 | * framework::dataset::make("PadY", 0, 2) * framework::dataset::make("NumKernels", { 3 }); |
Michalis Spyrou | 780db4e | 2017-11-23 09:49:51 +0000 | [diff] [blame] | 58 | |
Gunes Bayir | c6137d2 | 2023-10-09 20:47:16 +0100 | [diff] [blame] | 59 | const auto data3x3 = datasets::SmallDeconvolutionShapes() * framework::dataset::make("StrideX", 2, 4) * framework::dataset::make("StrideY", 1, 4, 2) * framework::dataset::make("PadX", 1, 2) |
| 60 | * framework::dataset::make("PadY", 1, 3) * framework::dataset::make("NumKernels", { 3 }); |
| 61 | |
Matthew Jackson | b9070a4 | 2019-08-22 16:13:27 +0100 | [diff] [blame] | 62 | const auto data3x3_asymm = datasets::SmallDeconvolutionShapes() * framework::dataset::make("StrideX", 1, 2) * framework::dataset::make("StrideY", 1, 2) * framework::dataset::make("PadLeft", 0, 1) |
| 63 | * framework::dataset::make("PadRight", 0, 1) * framework::dataset::make("PadTop", 0, 1) * framework::dataset::make("PadBottom", 0, 1) * framework::dataset::make("NumKernels", { 3 }); |
| 64 | |
Michalis Spyrou | 064add6 | 2018-11-01 18:14:27 +0000 | [diff] [blame] | 65 | const auto data3x3_precommit = datasets::SmallDeconvolutionShapes() * framework::dataset::make("StrideX", 1, 2) * framework::dataset::make("StrideY", 1, 2) * framework::dataset::make("PadX", 0, 2) |
giuros01 | a69a88b | 2019-01-31 16:29:19 +0000 | [diff] [blame] | 66 | * framework::dataset::make("PadY", 0, 2) * framework::dataset::make("NumKernels", { 3 }); |
Michalis Spyrou | 064add6 | 2018-11-01 18:14:27 +0000 | [diff] [blame] | 67 | |
Gunes Bayir | c6137d2 | 2023-10-09 20:47:16 +0100 | [diff] [blame] | 68 | const auto data3x3_precommit_large_channels = datasets::SmallDeconvolutionShapesWithLargerChannels() * framework::dataset::make("StrideX", 2) * framework::dataset::make("StrideY", 2) |
Gunes Bayir | 5945070 | 2022-12-12 09:29:06 +0000 | [diff] [blame] | 69 | * framework::dataset::make("PadX", 1) |
Gunes Bayir | ec0113d | 2022-11-09 09:26:27 +0000 | [diff] [blame] | 70 | * framework::dataset::make("PadY", 2) * framework::dataset::make("NumKernels", { 5 }); |
| 71 | |
giuros01 | 46a49a0 | 2019-04-01 13:50:22 +0100 | [diff] [blame] | 72 | const auto data2x2_precommit = datasets::SmallDeconvolutionShapes() * framework::dataset::make("StrideX", 2) * framework::dataset::make("StrideY", 2) * framework::dataset::make("PadX", 1) |
| 73 | * framework::dataset::make("PadY", 1) * framework::dataset::make("NumKernels", { 3 }); |
| 74 | |
Gunes Bayir | c6137d2 | 2023-10-09 20:47:16 +0100 | [diff] [blame] | 75 | const auto data1x1 = datasets::SmallDeconvolutionShapes() * framework::dataset::make("StrideX", 1, 4, 2) * framework::dataset::make("StrideY", 2, 4) * framework::dataset::make("PadX", 0, 1) |
giuros01 | a69a88b | 2019-01-31 16:29:19 +0000 | [diff] [blame] | 76 | * framework::dataset::make("PadY", 0, 1) * framework::dataset::make("NumKernels", { 3 }); |
Michalis Spyrou | 780db4e | 2017-11-23 09:49:51 +0000 | [diff] [blame] | 77 | |
Gunes Bayir | c6137d2 | 2023-10-09 20:47:16 +0100 | [diff] [blame] | 78 | const auto data5x1 = datasets::SmallDeconvolutionShapes() * framework::dataset::make("StrideX", 2, 4) * framework::dataset::make("StrideY", 1, 4, 2) * framework::dataset::make("PadX", 0, 1) |
Viet-Hoa Do | 019a7d9 | 2023-06-27 16:33:57 +0100 | [diff] [blame] | 79 | * framework::dataset::make("PadY", 0, 1) * framework::dataset::make("NumKernels", { 3 }); |
| 80 | |
giuros01 | 46a49a0 | 2019-04-01 13:50:22 +0100 | [diff] [blame] | 81 | const auto data_layouts_dataset = framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC }); |
Manuel Bottini | 9f0d5ec | 2019-08-19 13:31:38 +0100 | [diff] [blame] | 82 | |
| 83 | const auto add_bias_dataset = framework::dataset::make("AddBias", { true, false }); |
Michalis Spyrou | 780db4e | 2017-11-23 09:49:51 +0000 | [diff] [blame] | 84 | } // namespace |
| 85 | |
| 86 | TEST_SUITE(CL) |
| 87 | TEST_SUITE(DeconvolutionLayer) |
| 88 | |
Michalis Spyrou | 780db4e | 2017-11-23 09:49:51 +0000 | [diff] [blame] | 89 | // *INDENT-OFF* |
| 90 | // clang-format off |
Manuel Bottini | c1b76fa | 2019-06-17 12:04:40 +0100 | [diff] [blame] | 91 | DATA_TEST_CASE(Validate, framework::DatasetMode::ALL, zip(zip(zip(zip(zip( |
Freddie Liardet | e92b045 | 2021-04-22 14:55:17 +0100 | [diff] [blame] | 92 | framework::dataset::make("InputInfo", { TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), // Mismatching data type |
| 93 | TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), // Invalid weights shape |
| 94 | TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F16), // Non supported data type |
Gunes Bayir | ec0113d | 2022-11-09 09:26:27 +0000 | [diff] [blame] | 95 | TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), // Invalid bias shape |
Freddie Liardet | e92b045 | 2021-04-22 14:55:17 +0100 | [diff] [blame] | 96 | TensorInfo(TensorShape(13U, 11U, 4U, 3U), 1, DataType::F32), // Window shrink |
| 97 | TensorInfo(TensorShape(32U, 16U, 2U), 1, DataType::F32), |
Gunes Bayir | ec0113d | 2022-11-09 09:26:27 +0000 | [diff] [blame] | 98 | TensorInfo(TensorShape(2U, 13U, 27U), 1, DataType::F32, DataLayout::NHWC), // Mismatching data type |
| 99 | TensorInfo(TensorShape(2U, 13U, 27U), 1, DataType::F32, DataLayout::NHWC), // Invalid weights shape |
| 100 | TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F16, DataLayout::NHWC), // Non supported data type |
| 101 | TensorInfo(TensorShape(2U, 13U, 27U), 1, DataType::F32, DataLayout::NHWC), // Invalid bias shape |
| 102 | TensorInfo(TensorShape(4U, 11U, 13U, 3U), 1, DataType::F32, DataLayout::NHWC), // Window shrink |
| 103 | TensorInfo(TensorShape(2U, 16U, 32U), 1, DataType::F32, DataLayout::NHWC), |
Freddie Liardet | e92b045 | 2021-04-22 14:55:17 +0100 | [diff] [blame] | 104 | }), |
Vidhya Sudhan Loganathan | 7485d5a | 2018-07-04 09:34:00 +0100 | [diff] [blame] | 105 | framework::dataset::make("WeightsInfo", { TensorInfo(TensorShape(3U, 3U, 2U, 2U), 1, DataType::F16), |
Freddie Liardet | e92b045 | 2021-04-22 14:55:17 +0100 | [diff] [blame] | 106 | TensorInfo(TensorShape(3U, 3U, 2U, 4U), 1, DataType::F32), |
| 107 | TensorInfo(TensorShape(3U, 3U, 2U, 2U), 1, DataType::F16), |
| 108 | TensorInfo(TensorShape(3U, 2U, 2U, 2U), 1, DataType::F32), |
| 109 | TensorInfo(TensorShape(3U, 3U, 4U), 1, DataType::F32), |
Vidhya Sudhan Loganathan | 7485d5a | 2018-07-04 09:34:00 +0100 | [diff] [blame] | 110 | TensorInfo(TensorShape(1U, 1U, 2U, 4U), 1, DataType::F32), |
Gunes Bayir | ec0113d | 2022-11-09 09:26:27 +0000 | [diff] [blame] | 111 | TensorInfo(TensorShape(2U, 3U, 3U, 2U), 1, DataType::F16, DataLayout::NHWC), |
| 112 | TensorInfo(TensorShape(2U, 3U, 3U, 4U), 1, DataType::F32, DataLayout::NHWC), |
| 113 | TensorInfo(TensorShape(3U, 3U, 2U, 2U), 1, DataType::F16, DataLayout::NHWC), |
| 114 | TensorInfo(TensorShape(2U, 2U, 3U, 2U), 1, DataType::F32, DataLayout::NHWC), |
| 115 | TensorInfo(TensorShape(4U, 3U, 3U), 1, DataType::F32, DataLayout::NHWC), |
| 116 | TensorInfo(TensorShape(2U, 2U, 2U, 4U), 1, DataType::F32, DataLayout::NHWC), |
Freddie Liardet | e92b045 | 2021-04-22 14:55:17 +0100 | [diff] [blame] | 117 | })), |
| 118 | framework::dataset::make("BiasInfo", { TensorInfo(TensorShape(1U), 1, DataType::F16), |
| 119 | TensorInfo(TensorShape(1U), 1, DataType::F32), |
| 120 | TensorInfo(TensorShape(1U), 1, DataType::F32), |
| 121 | TensorInfo(TensorShape(25U, 11U), 1, DataType::F32), |
| 122 | TensorInfo(TensorShape(1U), 1, DataType::F32), |
| 123 | TensorInfo(TensorShape(4U), 1, DataType::F32), |
Gunes Bayir | ec0113d | 2022-11-09 09:26:27 +0000 | [diff] [blame] | 124 | TensorInfo(TensorShape(1U), 1, DataType::F16, DataLayout::NHWC), |
| 125 | TensorInfo(TensorShape(1U), 1, DataType::F32, DataLayout::NHWC), |
| 126 | TensorInfo(TensorShape(1U), 1, DataType::F32, DataLayout::NHWC), |
| 127 | TensorInfo(TensorShape(25U, 11U), 1, DataType::F32, DataLayout::NHWC), |
| 128 | TensorInfo(TensorShape(1U), 1, DataType::F32, DataLayout::NHWC), |
| 129 | TensorInfo(TensorShape(4U), 1, DataType::F32, DataLayout::NHWC), |
Freddie Liardet | e92b045 | 2021-04-22 14:55:17 +0100 | [diff] [blame] | 130 | })), |
| 131 | framework::dataset::make("OutputInfo", { TensorInfo(TensorShape(25U, 11U, 2U), 1, DataType::F16), |
| 132 | TensorInfo(TensorShape(25U, 10U, 2U), 1, DataType::F32), |
| 133 | TensorInfo(TensorShape(25U, 11U, 2U), 1, DataType::F32), |
| 134 | TensorInfo(TensorShape(13U, 13U, 2U), 1, DataType::F32), |
| 135 | TensorInfo(TensorShape(11U, 9U, 1U, 3U), 1, DataType::F32), |
| 136 | TensorInfo(TensorShape(32U, 16U, 4U), 1, DataType::F32), |
Gunes Bayir | ec0113d | 2022-11-09 09:26:27 +0000 | [diff] [blame] | 137 | TensorInfo(TensorShape(2U, 11U, 25U), 1, DataType::F16, DataLayout::NHWC), |
| 138 | TensorInfo(TensorShape(2U, 10U, 25U), 1, DataType::F32, DataLayout::NHWC), |
| 139 | TensorInfo(TensorShape(25U, 11U, 2U), 1, DataType::F32, DataLayout::NHWC), |
| 140 | TensorInfo(TensorShape(2U, 13U, 13U), 1, DataType::F32, DataLayout::NHWC), |
| 141 | TensorInfo(TensorShape(1U, 9U, 11U, 3U), 1, DataType::F32, DataLayout::NHWC), |
| 142 | TensorInfo(TensorShape(4U, 43U, 91U), 1, DataType::F32, DataLayout::NHWC), |
Freddie Liardet | e92b045 | 2021-04-22 14:55:17 +0100 | [diff] [blame] | 143 | })), |
Michalis Spyrou | 780db4e | 2017-11-23 09:49:51 +0000 | [diff] [blame] | 144 | framework::dataset::make("PadStrideInfo", { PadStrideInfo(1, 1, 0, 0), |
| 145 | PadStrideInfo(1, 1, 0, 0), |
| 146 | PadStrideInfo(1, 1, 0, 0), |
Manuel Bottini | c1b76fa | 2019-06-17 12:04:40 +0100 | [diff] [blame] | 147 | PadStrideInfo(1, 1, 0, 0), |
Michalis Spyrou | 780db4e | 2017-11-23 09:49:51 +0000 | [diff] [blame] | 148 | PadStrideInfo(1, 1, 1, 1), |
| 149 | PadStrideInfo(1, 1, 0, 0), |
Gunes Bayir | ec0113d | 2022-11-09 09:26:27 +0000 | [diff] [blame] | 150 | PadStrideInfo(1, 1, 0, 0), |
| 151 | PadStrideInfo(1, 1, 0, 0), |
| 152 | PadStrideInfo(1, 1, 0, 0), |
| 153 | PadStrideInfo(1, 1, 0, 0), |
| 154 | PadStrideInfo(1, 1, 1, 1), |
| 155 | PadStrideInfo(3, 3, 2, 2), |
Michalis Spyrou | 780db4e | 2017-11-23 09:49:51 +0000 | [diff] [blame] | 156 | })), |
Gunes Bayir | ec0113d | 2022-11-09 09:26:27 +0000 | [diff] [blame] | 157 | framework::dataset::make("Expected", { false, false, false, false, false, true, // NCHW |
| 158 | false, false, false, false, false, true })), // NHWC |
Manuel Bottini | c1b76fa | 2019-06-17 12:04:40 +0100 | [diff] [blame] | 159 | input_info, weights_info, bias_info, output_info, pad_info, expected) |
Michalis Spyrou | 780db4e | 2017-11-23 09:49:51 +0000 | [diff] [blame] | 160 | { |
Manuel Bottini | c1b76fa | 2019-06-17 12:04:40 +0100 | [diff] [blame] | 161 | bool is_valid = bool(CLDeconvolutionLayer::validate(&input_info.clone()->set_is_resizable(false), &weights_info.clone()->set_is_resizable(false), &bias_info.clone()->set_is_resizable(false), &output_info.clone()->set_is_resizable(false), pad_info)); |
Michalis Spyrou | 780db4e | 2017-11-23 09:49:51 +0000 | [diff] [blame] | 162 | ARM_COMPUTE_EXPECT(is_valid == expected, framework::LogLevel::ERRORS); |
| 163 | } |
| 164 | // clang-format on |
| 165 | // *INDENT-ON* |
| 166 | |
| 167 | template <typename T> |
Michele Di Giorgio | 14cbfb2 | 2019-10-23 10:53:10 +0100 | [diff] [blame] | 168 | using CLDeconvolutionLayerFixture4x4 = DeconvolutionValidationFixture<CLTensor, CLAccessor, CLDeconvolutionLayer, T, 4, 4>; |
Georgios Pinitas | ced7a8d | 2018-02-01 16:31:33 +0000 | [diff] [blame] | 169 | |
| 170 | template <typename T> |
Michele Di Giorgio | 14cbfb2 | 2019-10-23 10:53:10 +0100 | [diff] [blame] | 171 | using CLDeconvolutionLayerFixture3x3 = DeconvolutionValidationFixture<CLTensor, CLAccessor, CLDeconvolutionLayer, T, 3, 3>; |
Michalis Spyrou | 780db4e | 2017-11-23 09:49:51 +0000 | [diff] [blame] | 172 | |
| 173 | template <typename T> |
Matthew Jackson | b9070a4 | 2019-08-22 16:13:27 +0100 | [diff] [blame] | 174 | using CLDeconvolutionLayerAsymmFixture3x3 = DeconvolutionValidationAsymmFixture<CLTensor, CLAccessor, CLDeconvolutionLayer, T, 3, 3>; |
giuros01 | 46a49a0 | 2019-04-01 13:50:22 +0100 | [diff] [blame] | 175 | |
| 176 | template <typename T> |
Michele Di Giorgio | 14cbfb2 | 2019-10-23 10:53:10 +0100 | [diff] [blame] | 177 | using CLDeconvolutionLayerFixture2x2 = DeconvolutionValidationFixture<CLTensor, CLAccessor, CLDeconvolutionLayer, T, 2, 2>; |
Matthew Jackson | b9070a4 | 2019-08-22 16:13:27 +0100 | [diff] [blame] | 178 | |
| 179 | template <typename T> |
Michele Di Giorgio | 14cbfb2 | 2019-10-23 10:53:10 +0100 | [diff] [blame] | 180 | using CLDeconvolutionLayerFixture1x1 = DeconvolutionValidationFixture<CLTensor, CLAccessor, CLDeconvolutionLayer, T, 1, 1>; |
Michalis Spyrou | 780db4e | 2017-11-23 09:49:51 +0000 | [diff] [blame] | 181 | |
Manuel Bottini | 6e10aa3 | 2020-04-30 13:28:23 +0100 | [diff] [blame] | 182 | template <typename T> |
| 183 | using CLDeconvolutionLayerAsymmFixture9x9 = DeconvolutionValidationAsymmFixture<CLTensor, CLAccessor, CLDeconvolutionLayer, T, 9, 9>; |
| 184 | |
Viet-Hoa Do | 019a7d9 | 2023-06-27 16:33:57 +0100 | [diff] [blame] | 185 | template <typename T> |
| 186 | using CLDeconvolutionLayerFixture5x1 = DeconvolutionValidationFixture<CLTensor, CLAccessor, CLDeconvolutionLayer, T, 5, 1>; |
| 187 | |
Michalis Spyrou | 780db4e | 2017-11-23 09:49:51 +0000 | [diff] [blame] | 188 | TEST_SUITE(Float) |
Michalis Spyrou | 780db4e | 2017-11-23 09:49:51 +0000 | [diff] [blame] | 189 | TEST_SUITE(FP32) |
Georgios Pinitas | ced7a8d | 2018-02-01 16:31:33 +0000 | [diff] [blame] | 190 | |
Georgios Pinitas | 793f87d | 2018-05-18 20:08:58 +0100 | [diff] [blame] | 191 | TEST_SUITE(W4x4) |
Manuel Bottini | 9f0d5ec | 2019-08-19 13:31:38 +0100 | [diff] [blame] | 192 | FIXTURE_DATA_TEST_CASE(Run, CLDeconvolutionLayerFixture4x4<float>, framework::DatasetMode::NIGHTLY, combine(combine(combine(data4x4, framework::dataset::make("DataType", DataType::F32)), |
| 193 | data_layouts_dataset), |
| 194 | add_bias_dataset)) |
Georgios Pinitas | ced7a8d | 2018-02-01 16:31:33 +0000 | [diff] [blame] | 195 | { |
| 196 | // Validate output |
| 197 | validate(CLAccessor(_target), _reference, tolerance_fp32); |
| 198 | } |
Michalis Spyrou | 064add6 | 2018-11-01 18:14:27 +0000 | [diff] [blame] | 199 | TEST_SUITE_END() // W4x4 |
Georgios Pinitas | ced7a8d | 2018-02-01 16:31:33 +0000 | [diff] [blame] | 200 | |
Michalis Spyrou | 780db4e | 2017-11-23 09:49:51 +0000 | [diff] [blame] | 201 | TEST_SUITE(W3x3) |
Manuel Bottini | 9f0d5ec | 2019-08-19 13:31:38 +0100 | [diff] [blame] | 202 | FIXTURE_DATA_TEST_CASE(RunSmall, CLDeconvolutionLayerFixture3x3<float>, framework::DatasetMode::PRECOMMIT, combine(combine(combine(data3x3_precommit, framework::dataset::make("DataType", |
| 203 | DataType::F32)), |
| 204 | data_layouts_dataset), |
| 205 | add_bias_dataset)) |
Michalis Spyrou | 780db4e | 2017-11-23 09:49:51 +0000 | [diff] [blame] | 206 | { |
| 207 | // Validate output |
| 208 | validate(CLAccessor(_target), _reference, tolerance_fp32); |
| 209 | } |
Gunes Bayir | ec0113d | 2022-11-09 09:26:27 +0000 | [diff] [blame] | 210 | |
| 211 | FIXTURE_DATA_TEST_CASE(RunSmallWithLargeChannels, CLDeconvolutionLayerFixture3x3<float>, framework::DatasetMode::PRECOMMIT, combine(combine(combine(data3x3_precommit_large_channels, |
| 212 | framework::dataset::make("DataType", |
| 213 | DataType::F32)), |
| 214 | data_layouts_dataset), |
| 215 | framework::dataset::make("AddBias", { true }))) |
| 216 | { |
| 217 | // Validate output |
| 218 | validate(CLAccessor(_target), _reference, tolerance_fp32); |
| 219 | } |
| 220 | |
Matthew Jackson | b9070a4 | 2019-08-22 16:13:27 +0100 | [diff] [blame] | 221 | FIXTURE_DATA_TEST_CASE(RunAsymm, CLDeconvolutionLayerAsymmFixture3x3<float>, framework::DatasetMode::NIGHTLY, combine(combine(combine(data3x3_asymm, framework::dataset::make("DataType", |
| 222 | DataType::F32)), |
| 223 | data_layouts_dataset), |
| 224 | add_bias_dataset)) |
| 225 | { |
| 226 | // Validate output |
| 227 | validate(CLAccessor(_target), _reference, tolerance_fp32); |
| 228 | } |
Manuel Bottini | 9f0d5ec | 2019-08-19 13:31:38 +0100 | [diff] [blame] | 229 | FIXTURE_DATA_TEST_CASE(RunLarge, CLDeconvolutionLayerFixture3x3<float>, framework::DatasetMode::NIGHTLY, combine(combine(combine(data3x3, framework::dataset::make("DataType", DataType::F32)), |
Gunes Bayir | c6137d2 | 2023-10-09 20:47:16 +0100 | [diff] [blame] | 230 | framework::dataset::make("DataLayout", { DataLayout::NHWC })), |
| 231 | framework::dataset::make("AddBias", { true }))) |
Michalis Spyrou | 064add6 | 2018-11-01 18:14:27 +0000 | [diff] [blame] | 232 | { |
| 233 | // Validate output |
| 234 | validate(CLAccessor(_target), _reference, tolerance_fp32); |
| 235 | } |
| 236 | TEST_SUITE_END() // W3x3 |
Michalis Spyrou | 780db4e | 2017-11-23 09:49:51 +0000 | [diff] [blame] | 237 | |
giuros01 | 46a49a0 | 2019-04-01 13:50:22 +0100 | [diff] [blame] | 238 | TEST_SUITE(W2x2) |
Manuel Bottini | 9f0d5ec | 2019-08-19 13:31:38 +0100 | [diff] [blame] | 239 | FIXTURE_DATA_TEST_CASE(RunSmall, CLDeconvolutionLayerFixture2x2<float>, framework::DatasetMode::PRECOMMIT, combine(combine(combine(data2x2_precommit, framework::dataset::make("DataType", |
| 240 | DataType::F32)), |
| 241 | data_layouts_dataset), |
| 242 | add_bias_dataset)) |
giuros01 | 46a49a0 | 2019-04-01 13:50:22 +0100 | [diff] [blame] | 243 | { |
| 244 | // Validate output |
| 245 | validate(CLAccessor(_target), _reference, tolerance_fp32); |
| 246 | } |
| 247 | TEST_SUITE_END() // W2x2 |
| 248 | |
Michalis Spyrou | 780db4e | 2017-11-23 09:49:51 +0000 | [diff] [blame] | 249 | TEST_SUITE(W1x1) |
Manuel Bottini | 9f0d5ec | 2019-08-19 13:31:38 +0100 | [diff] [blame] | 250 | FIXTURE_DATA_TEST_CASE(Run, CLDeconvolutionLayerFixture1x1<float>, framework::DatasetMode::NIGHTLY, combine(combine(combine(data1x1, framework::dataset::make("DataType", DataType::F32)), |
| 251 | data_layouts_dataset), |
Gunes Bayir | c6137d2 | 2023-10-09 20:47:16 +0100 | [diff] [blame] | 252 | framework::dataset::make("AddBias", { true }))) |
Michalis Spyrou | 780db4e | 2017-11-23 09:49:51 +0000 | [diff] [blame] | 253 | { |
| 254 | // Validate output |
| 255 | validate(CLAccessor(_target), _reference, tolerance_fp32); |
| 256 | } |
Michalis Spyrou | 064add6 | 2018-11-01 18:14:27 +0000 | [diff] [blame] | 257 | TEST_SUITE_END() // W1x1 |
Manuel Bottini | 6e10aa3 | 2020-04-30 13:28:23 +0100 | [diff] [blame] | 258 | TEST_SUITE(W9x9) |
| 259 | FIXTURE_DATA_TEST_CASE(RunSmall, CLDeconvolutionLayerAsymmFixture9x9<float>, framework::DatasetMode::ALL, combine(combine(combine(data9x9_small_asymm, framework::dataset::make("DataType", |
| 260 | DataType::F32)), |
| 261 | framework::dataset::make("DataLayout", { DataLayout::NHWC })), |
| 262 | framework::dataset::make("AddBias", { false }))) |
| 263 | { |
| 264 | // Validate output |
| 265 | validate(CLAccessor(_target), _reference, tolerance_fp32); |
| 266 | } |
| 267 | TEST_SUITE_END() // W9x9 |
Viet-Hoa Do | 019a7d9 | 2023-06-27 16:33:57 +0100 | [diff] [blame] | 268 | |
| 269 | TEST_SUITE(W5x1) |
| 270 | FIXTURE_DATA_TEST_CASE(Run, CLDeconvolutionLayerFixture5x1<float>, framework::DatasetMode::NIGHTLY, combine(combine(combine(data5x1, framework::dataset::make("DataType", DataType::F32)), |
| 271 | data_layouts_dataset), |
Gunes Bayir | c6137d2 | 2023-10-09 20:47:16 +0100 | [diff] [blame] | 272 | framework::dataset::make("AddBias", { true }))) |
Viet-Hoa Do | 019a7d9 | 2023-06-27 16:33:57 +0100 | [diff] [blame] | 273 | { |
| 274 | // Validate output |
| 275 | validate(CLAccessor(_target), _reference, tolerance_fp32); |
| 276 | } |
| 277 | TEST_SUITE_END() // W5x1 |
| 278 | |
Michalis Spyrou | 064add6 | 2018-11-01 18:14:27 +0000 | [diff] [blame] | 279 | TEST_SUITE_END() // FP32 |
Georgios Pinitas | 793f87d | 2018-05-18 20:08:58 +0100 | [diff] [blame] | 280 | |
| 281 | TEST_SUITE(FP16) |
| 282 | |
| 283 | TEST_SUITE(W4x4) |
Manuel Bottini | 9f0d5ec | 2019-08-19 13:31:38 +0100 | [diff] [blame] | 284 | FIXTURE_DATA_TEST_CASE(Run, CLDeconvolutionLayerFixture4x4<half>, framework::DatasetMode::NIGHTLY, combine(combine(combine(data4x4, framework::dataset::make("DataType", DataType::F16)), |
| 285 | data_layouts_dataset), |
Gunes Bayir | c6137d2 | 2023-10-09 20:47:16 +0100 | [diff] [blame] | 286 | framework::dataset::make("AddBias", { true }))) |
Georgios Pinitas | 793f87d | 2018-05-18 20:08:58 +0100 | [diff] [blame] | 287 | { |
| 288 | // Validate output |
| 289 | validate(CLAccessor(_target), _reference, tolerance_f16, tolerance_num); |
| 290 | } |
Michalis Spyrou | 064add6 | 2018-11-01 18:14:27 +0000 | [diff] [blame] | 291 | TEST_SUITE_END() // W4x4 |
Georgios Pinitas | 793f87d | 2018-05-18 20:08:58 +0100 | [diff] [blame] | 292 | |
| 293 | TEST_SUITE(W3x3) |
Manuel Bottini | 9f0d5ec | 2019-08-19 13:31:38 +0100 | [diff] [blame] | 294 | FIXTURE_DATA_TEST_CASE(RunSmall, CLDeconvolutionLayerFixture3x3<half>, framework::DatasetMode::PRECOMMIT, combine(combine(combine(data3x3_precommit, framework::dataset::make("DataType", |
| 295 | DataType::F16)), |
| 296 | data_layouts_dataset), |
| 297 | add_bias_dataset)) |
Georgios Pinitas | 793f87d | 2018-05-18 20:08:58 +0100 | [diff] [blame] | 298 | { |
| 299 | // Validate output |
| 300 | validate(CLAccessor(_target), _reference, tolerance_f16, tolerance_num); |
| 301 | } |
Manuel Bottini | 9f0d5ec | 2019-08-19 13:31:38 +0100 | [diff] [blame] | 302 | FIXTURE_DATA_TEST_CASE(RunLarge, CLDeconvolutionLayerFixture3x3<half>, framework::DatasetMode::NIGHTLY, combine(combine(combine(data3x3, framework::dataset::make("DataType", DataType::F16)), |
Gunes Bayir | c6137d2 | 2023-10-09 20:47:16 +0100 | [diff] [blame] | 303 | framework::dataset::make("DataLayout", { DataLayout::NHWC })), |
| 304 | framework::dataset::make("AddBias", { true }))) |
Michalis Spyrou | 064add6 | 2018-11-01 18:14:27 +0000 | [diff] [blame] | 305 | { |
| 306 | // Validate output |
| 307 | validate(CLAccessor(_target), _reference, tolerance_f16, tolerance_num); |
| 308 | } |
| 309 | TEST_SUITE_END() // W3x3 |
Georgios Pinitas | 793f87d | 2018-05-18 20:08:58 +0100 | [diff] [blame] | 310 | |
giuros01 | 46a49a0 | 2019-04-01 13:50:22 +0100 | [diff] [blame] | 311 | TEST_SUITE(W2x2) |
Manuel Bottini | 9f0d5ec | 2019-08-19 13:31:38 +0100 | [diff] [blame] | 312 | FIXTURE_DATA_TEST_CASE(RunSmall, CLDeconvolutionLayerFixture2x2<half>, framework::DatasetMode::PRECOMMIT, combine(combine(combine(data2x2_precommit, framework::dataset::make("DataType", |
| 313 | DataType::F16)), |
| 314 | data_layouts_dataset), |
| 315 | add_bias_dataset)) |
giuros01 | 46a49a0 | 2019-04-01 13:50:22 +0100 | [diff] [blame] | 316 | { |
| 317 | // Validate output |
giuros01 | b56d0cd | 2019-05-13 13:24:55 +0100 | [diff] [blame] | 318 | validate(CLAccessor(_target), _reference, tolerance_f16); |
giuros01 | 46a49a0 | 2019-04-01 13:50:22 +0100 | [diff] [blame] | 319 | } |
| 320 | TEST_SUITE_END() // W2x2 |
| 321 | |
Georgios Pinitas | 793f87d | 2018-05-18 20:08:58 +0100 | [diff] [blame] | 322 | TEST_SUITE(W1x1) |
Manuel Bottini | 9f0d5ec | 2019-08-19 13:31:38 +0100 | [diff] [blame] | 323 | FIXTURE_DATA_TEST_CASE(Run, CLDeconvolutionLayerFixture1x1<half>, framework::DatasetMode::NIGHTLY, combine(combine(combine(data1x1, framework::dataset::make("DataType", DataType::F16)), |
| 324 | data_layouts_dataset), |
Gunes Bayir | c6137d2 | 2023-10-09 20:47:16 +0100 | [diff] [blame] | 325 | framework::dataset::make("AddBias", { true }))) |
Georgios Pinitas | 793f87d | 2018-05-18 20:08:58 +0100 | [diff] [blame] | 326 | { |
| 327 | // Validate output |
| 328 | validate(CLAccessor(_target), _reference, tolerance_f16, tolerance_num); |
| 329 | } |
Michalis Spyrou | 064add6 | 2018-11-01 18:14:27 +0000 | [diff] [blame] | 330 | TEST_SUITE_END() // W1x1 |
Georgios Pinitas | 793f87d | 2018-05-18 20:08:58 +0100 | [diff] [blame] | 331 | |
Viet-Hoa Do | 019a7d9 | 2023-06-27 16:33:57 +0100 | [diff] [blame] | 332 | TEST_SUITE(W5x1) |
| 333 | FIXTURE_DATA_TEST_CASE(Run, CLDeconvolutionLayerFixture5x1<half>, framework::DatasetMode::NIGHTLY, combine(combine(combine(data5x1, framework::dataset::make("DataType", DataType::F16)), |
| 334 | data_layouts_dataset), |
Gunes Bayir | c6137d2 | 2023-10-09 20:47:16 +0100 | [diff] [blame] | 335 | framework::dataset::make("AddBias", { true }))) |
Viet-Hoa Do | 019a7d9 | 2023-06-27 16:33:57 +0100 | [diff] [blame] | 336 | { |
| 337 | // Validate output |
| 338 | validate(CLAccessor(_target), _reference, tolerance_f16, tolerance_num); |
| 339 | } |
| 340 | TEST_SUITE_END() // W5x1 |
| 341 | |
Michalis Spyrou | 064add6 | 2018-11-01 18:14:27 +0000 | [diff] [blame] | 342 | TEST_SUITE_END() // FP16 |
| 343 | TEST_SUITE_END() // Float |
Michalis Spyrou | 780db4e | 2017-11-23 09:49:51 +0000 | [diff] [blame] | 344 | |
Michele Di Giorgio | 9fef38a | 2018-07-06 18:06:58 +0100 | [diff] [blame] | 345 | template <typename T> |
| 346 | using CLDeconvolutionLayerQuantizedFixture4x4 = DeconvolutionValidationQuantizedFixture<CLTensor, CLAccessor, CLDeconvolutionLayer, T, 4, 4>; |
| 347 | |
| 348 | template <typename T> |
| 349 | using CLDeconvolutionLayerQuantizedFixture3x3 = DeconvolutionValidationQuantizedFixture<CLTensor, CLAccessor, CLDeconvolutionLayer, T, 3, 3>; |
| 350 | |
| 351 | template <typename T> |
giuros01 | 46a49a0 | 2019-04-01 13:50:22 +0100 | [diff] [blame] | 352 | using CLDeconvolutionLayerQuantizedFixture2x2 = DeconvolutionValidationQuantizedFixture<CLTensor, CLAccessor, CLDeconvolutionLayer, T, 2, 2>; |
| 353 | |
| 354 | template <typename T> |
Michele Di Giorgio | 9fef38a | 2018-07-06 18:06:58 +0100 | [diff] [blame] | 355 | using CLDeconvolutionLayerQuantizedFixture1x1 = DeconvolutionValidationQuantizedFixture<CLTensor, CLAccessor, CLDeconvolutionLayer, T, 1, 1>; |
| 356 | |
Freddie Liardet | e92b045 | 2021-04-22 14:55:17 +0100 | [diff] [blame] | 357 | template <typename T> |
Viet-Hoa Do | 019a7d9 | 2023-06-27 16:33:57 +0100 | [diff] [blame] | 358 | using CLDeconvolutionLayerQuantizedFixture5x1 = DeconvolutionValidationQuantizedFixture<CLTensor, CLAccessor, CLDeconvolutionLayer, T, 5, 1>; |
| 359 | |
| 360 | template <typename T> |
Freddie Liardet | e92b045 | 2021-04-22 14:55:17 +0100 | [diff] [blame] | 361 | using CLDeconvolutionLayerQuantizedPerChannelFixture4x4 = DeconvolutionValidationQuantizedPerChannelFixture<CLTensor, CLAccessor, CLDeconvolutionLayer, T, int8_t, 4, 4>; |
| 362 | |
| 363 | template <typename T> |
| 364 | using CLDeconvolutionLayerQuantizedPerChannelFixture3x3 = DeconvolutionValidationQuantizedPerChannelFixture<CLTensor, CLAccessor, CLDeconvolutionLayer, T, int8_t, 3, 3>; |
| 365 | |
| 366 | template <typename T> |
| 367 | using CLDeconvolutionLayerQuantizedPerChannelFixture2x2 = DeconvolutionValidationQuantizedPerChannelFixture<CLTensor, CLAccessor, CLDeconvolutionLayer, T, int8_t, 2, 2>; |
| 368 | |
| 369 | template <typename T> |
| 370 | using CLDeconvolutionLayerQuantizedPerChannelFixture1x1 = DeconvolutionValidationQuantizedPerChannelFixture<CLTensor, CLAccessor, CLDeconvolutionLayer, T, int8_t, 1, 1>; |
| 371 | |
Viet-Hoa Do | 019a7d9 | 2023-06-27 16:33:57 +0100 | [diff] [blame] | 372 | template <typename T> |
| 373 | using CLDeconvolutionLayerQuantizedPerChannelFixture5x1 = DeconvolutionValidationQuantizedPerChannelFixture<CLTensor, CLAccessor, CLDeconvolutionLayer, T, int8_t, 5, 1>; |
| 374 | |
Michele Di Giorgio | 9fef38a | 2018-07-06 18:06:58 +0100 | [diff] [blame] | 375 | TEST_SUITE(Quantized) |
| 376 | TEST_SUITE(QASYMM8) |
| 377 | |
| 378 | TEST_SUITE(W4x4) |
Manuel Bottini | 279814b | 2019-10-25 10:28:28 +0100 | [diff] [blame] | 379 | FIXTURE_DATA_TEST_CASE(Run, CLDeconvolutionLayerQuantizedFixture4x4<uint8_t>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(combine(data4x4, framework::dataset::make("DataType", |
Michalis Spyrou | 064add6 | 2018-11-01 18:14:27 +0000 | [diff] [blame] | 380 | DataType::QASYMM8)), |
| 381 | data_layouts_dataset), |
Giuseppe Rossini | 0a958cb | 2020-01-16 16:38:56 +0000 | [diff] [blame] | 382 | framework::dataset::make("InputQuantizationInfo", { QuantizationInfo(1.f / 255.f, 10), QuantizationInfo(2.f / 255.f, 5) })), |
| 383 | framework::dataset::make("OutputQuantizationInfo", { QuantizationInfo(3.f / 255.f, 5), QuantizationInfo(4.f / 255.f, 10) })), |
Gunes Bayir | c6137d2 | 2023-10-09 20:47:16 +0100 | [diff] [blame] | 384 | framework::dataset::make("AddBias", { true }))) |
Michele Di Giorgio | 9fef38a | 2018-07-06 18:06:58 +0100 | [diff] [blame] | 385 | { |
| 386 | // Validate output |
| 387 | validate(CLAccessor(_target), _reference, tolerance_qasymm8, tolerance_num); |
| 388 | } |
Michalis Spyrou | 064add6 | 2018-11-01 18:14:27 +0000 | [diff] [blame] | 389 | TEST_SUITE_END() // W4x4 |
Michele Di Giorgio | 9fef38a | 2018-07-06 18:06:58 +0100 | [diff] [blame] | 390 | |
| 391 | TEST_SUITE(W3x3) |
Manuel Bottini | 279814b | 2019-10-25 10:28:28 +0100 | [diff] [blame] | 392 | FIXTURE_DATA_TEST_CASE(RunSmall, CLDeconvolutionLayerQuantizedFixture3x3<uint8_t>, framework::DatasetMode::PRECOMMIT, combine(combine(combine(combine(combine(data3x3_precommit, |
Manuel Bottini | 9f0d5ec | 2019-08-19 13:31:38 +0100 | [diff] [blame] | 393 | framework::dataset::make("DataType", |
| 394 | DataType::QASYMM8)), |
Michalis Spyrou | 064add6 | 2018-11-01 18:14:27 +0000 | [diff] [blame] | 395 | data_layouts_dataset), |
Giuseppe Rossini | 0a958cb | 2020-01-16 16:38:56 +0000 | [diff] [blame] | 396 | framework::dataset::make("InputQuantizationInfo", { QuantizationInfo(1.f / 255.f, 10), QuantizationInfo(2.f / 255.f, 4) })), |
| 397 | framework::dataset::make("OutputQuantizationInfo", { QuantizationInfo(3.f / 255.f, 10), QuantizationInfo(4.f / 255.f, 5) })), |
Manuel Bottini | 9f0d5ec | 2019-08-19 13:31:38 +0100 | [diff] [blame] | 398 | add_bias_dataset)) |
Michele Di Giorgio | 9fef38a | 2018-07-06 18:06:58 +0100 | [diff] [blame] | 399 | { |
| 400 | // Validate output |
| 401 | validate(CLAccessor(_target), _reference, tolerance_qasymm8, tolerance_num); |
| 402 | } |
Manuel Bottini | 279814b | 2019-10-25 10:28:28 +0100 | [diff] [blame] | 403 | FIXTURE_DATA_TEST_CASE(RunLarge, CLDeconvolutionLayerQuantizedFixture3x3<uint8_t>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(combine(data3x3, |
Gunes Bayir | c6137d2 | 2023-10-09 20:47:16 +0100 | [diff] [blame] | 404 | framework::dataset::make("DataType", DataType::QASYMM8)), |
| 405 | framework::dataset::make("DataLayout", { DataLayout::NHWC })), |
Giuseppe Rossini | 0a958cb | 2020-01-16 16:38:56 +0000 | [diff] [blame] | 406 | framework::dataset::make("InputQuantizationInfo", { QuantizationInfo(1.f / 255.f, 10), QuantizationInfo(2.f / 255.f, 128) })), |
| 407 | framework::dataset::make("OutputQuantizationInfo", { QuantizationInfo(3.f / 255.f, 128), QuantizationInfo(4.f / 255.f, 128) })), |
Gunes Bayir | c6137d2 | 2023-10-09 20:47:16 +0100 | [diff] [blame] | 408 | framework::dataset::make("AddBias", { true }))) |
Michalis Spyrou | 064add6 | 2018-11-01 18:14:27 +0000 | [diff] [blame] | 409 | { |
| 410 | // Validate output |
| 411 | validate(CLAccessor(_target), _reference, tolerance_qasymm8, tolerance_num); |
| 412 | } |
| 413 | TEST_SUITE_END() // W3x3 |
Michele Di Giorgio | 9fef38a | 2018-07-06 18:06:58 +0100 | [diff] [blame] | 414 | |
giuros01 | 46a49a0 | 2019-04-01 13:50:22 +0100 | [diff] [blame] | 415 | TEST_SUITE(W2x2) |
Manuel Bottini | 279814b | 2019-10-25 10:28:28 +0100 | [diff] [blame] | 416 | FIXTURE_DATA_TEST_CASE(RunSmall, CLDeconvolutionLayerQuantizedFixture2x2<uint8_t>, framework::DatasetMode::PRECOMMIT, combine(combine(combine(combine(combine(data2x2_precommit, |
| 417 | framework::dataset::make("DataType", DataType::QASYMM8)), |
giuros01 | 46a49a0 | 2019-04-01 13:50:22 +0100 | [diff] [blame] | 418 | data_layouts_dataset), |
Giuseppe Rossini | 0a958cb | 2020-01-16 16:38:56 +0000 | [diff] [blame] | 419 | framework::dataset::make("InputQuantizationInfo", { QuantizationInfo(1.f / 255.f, 128), QuantizationInfo(2.f / 255.f, 128) })), |
| 420 | framework::dataset::make("OutputQuantizationInfo", { QuantizationInfo(3.f / 255.f, 64), QuantizationInfo(4.f / 255.f, 128) })), |
Manuel Bottini | 9f0d5ec | 2019-08-19 13:31:38 +0100 | [diff] [blame] | 421 | add_bias_dataset)) |
giuros01 | 46a49a0 | 2019-04-01 13:50:22 +0100 | [diff] [blame] | 422 | { |
| 423 | // Validate output |
Giuseppe Rossini | 0a958cb | 2020-01-16 16:38:56 +0000 | [diff] [blame] | 424 | validate(CLAccessor(_target), _reference, tolerance_qasymm8, tolerance_num); |
giuros01 | 46a49a0 | 2019-04-01 13:50:22 +0100 | [diff] [blame] | 425 | } |
| 426 | TEST_SUITE_END() // W2x2 |
| 427 | |
Michele Di Giorgio | 9fef38a | 2018-07-06 18:06:58 +0100 | [diff] [blame] | 428 | TEST_SUITE(W1x1) |
Manuel Bottini | 279814b | 2019-10-25 10:28:28 +0100 | [diff] [blame] | 429 | FIXTURE_DATA_TEST_CASE(Run, CLDeconvolutionLayerQuantizedFixture1x1<uint8_t>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(combine(data1x1, framework::dataset::make("DataType", |
Michalis Spyrou | 064add6 | 2018-11-01 18:14:27 +0000 | [diff] [blame] | 430 | DataType::QASYMM8)), |
| 431 | data_layouts_dataset), |
Giuseppe Rossini | 0a958cb | 2020-01-16 16:38:56 +0000 | [diff] [blame] | 432 | framework::dataset::make("InputQuantizationInfo", { QuantizationInfo(1.f / 255.f, 0), QuantizationInfo(2.f / 255.f, 0) })), |
| 433 | framework::dataset::make("OutputQuantizationInfo", { QuantizationInfo(3.f / 255.f, 0), QuantizationInfo(4.f / 255.f, 0) })), |
Gunes Bayir | c6137d2 | 2023-10-09 20:47:16 +0100 | [diff] [blame] | 434 | framework::dataset::make("AddBias", { true }))) |
Michele Di Giorgio | 9fef38a | 2018-07-06 18:06:58 +0100 | [diff] [blame] | 435 | { |
| 436 | // Validate output |
| 437 | validate(CLAccessor(_target), _reference, tolerance_qasymm8, tolerance_num); |
| 438 | } |
Michalis Spyrou | 064add6 | 2018-11-01 18:14:27 +0000 | [diff] [blame] | 439 | TEST_SUITE_END() // W1x1 |
Michele Di Giorgio | 9fef38a | 2018-07-06 18:06:58 +0100 | [diff] [blame] | 440 | |
Viet-Hoa Do | 019a7d9 | 2023-06-27 16:33:57 +0100 | [diff] [blame] | 441 | TEST_SUITE(W5x1) |
| 442 | FIXTURE_DATA_TEST_CASE(Run, CLDeconvolutionLayerQuantizedFixture5x1<uint8_t>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(combine(data5x1, framework::dataset::make("DataType", |
| 443 | DataType::QASYMM8)), |
| 444 | data_layouts_dataset), |
| 445 | framework::dataset::make("InputQuantizationInfo", { QuantizationInfo(1.f / 255.f, 10), QuantizationInfo(2.f / 255.f, 5) })), |
| 446 | framework::dataset::make("OutputQuantizationInfo", { QuantizationInfo(3.f / 255.f, 5), QuantizationInfo(4.f / 255.f, 10) })), |
Gunes Bayir | c6137d2 | 2023-10-09 20:47:16 +0100 | [diff] [blame] | 447 | framework::dataset::make("AddBias", { true }))) |
Viet-Hoa Do | 019a7d9 | 2023-06-27 16:33:57 +0100 | [diff] [blame] | 448 | { |
| 449 | // Validate output |
| 450 | validate(CLAccessor(_target), _reference, tolerance_qasymm8, tolerance_num); |
| 451 | } |
| 452 | TEST_SUITE_END() // W5x1 |
| 453 | |
Michalis Spyrou | 064add6 | 2018-11-01 18:14:27 +0000 | [diff] [blame] | 454 | TEST_SUITE_END() // QASYMM8 |
Sheri Zhang | a14817a | 2020-02-26 10:30:15 +0000 | [diff] [blame] | 455 | |
| 456 | TEST_SUITE(QASYMM8_SIGNED) |
| 457 | |
| 458 | // QASYMM8_SIGNED: zero-point in range [-128, 127] |
| 459 | // QASYMM8 : zero-point in range [0 , 255] |
| 460 | |
| 461 | TEST_SUITE(W4x4) |
| 462 | FIXTURE_DATA_TEST_CASE(Run, CLDeconvolutionLayerQuantizedFixture4x4<int8_t>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(combine(data4x4, framework::dataset::make("DataType", |
| 463 | DataType::QASYMM8_SIGNED)), |
| 464 | data_layouts_dataset), |
| 465 | framework::dataset::make("InputQuantizationInfo", { QuantizationInfo(1.f / 255.f, 10), QuantizationInfo(2.f / 255.f, 5) })), |
| 466 | framework::dataset::make("OutputQuantizationInfo", { QuantizationInfo(3.f / 255.f, 5), QuantizationInfo(4.f / 255.f, 10) })), |
Gunes Bayir | c6137d2 | 2023-10-09 20:47:16 +0100 | [diff] [blame] | 467 | framework::dataset::make("AddBias", { true }))) |
Sheri Zhang | a14817a | 2020-02-26 10:30:15 +0000 | [diff] [blame] | 468 | { |
| 469 | // Validate output |
| 470 | validate(CLAccessor(_target), _reference, tolerance_qasymm8, tolerance_num); |
| 471 | } |
| 472 | TEST_SUITE_END() // W4x4 |
| 473 | |
| 474 | TEST_SUITE(W3x3) |
| 475 | // DirectDeconvolution |
| 476 | FIXTURE_DATA_TEST_CASE(RunSmall, CLDeconvolutionLayerQuantizedFixture3x3<int8_t>, framework::DatasetMode::PRECOMMIT, combine(combine(combine(combine(combine(data3x3_precommit, |
| 477 | framework::dataset::make("DataType", |
| 478 | DataType::QASYMM8_SIGNED)), |
| 479 | data_layouts_dataset), |
| 480 | framework::dataset::make("InputQuantizationInfo", { QuantizationInfo(1.f / 255.f, 10), QuantizationInfo(2.f / 255.f, 4) })), |
| 481 | framework::dataset::make("OutputQuantizationInfo", { QuantizationInfo(3.f / 255.f, 10), QuantizationInfo(4.f / 255.f, 5) })), |
| 482 | add_bias_dataset)) |
| 483 | { |
| 484 | // Validate output |
| 485 | validate(CLAccessor(_target), _reference, tolerance_qasymm8, tolerance_num); |
| 486 | } |
| 487 | |
| 488 | FIXTURE_DATA_TEST_CASE(RunLarge, CLDeconvolutionLayerQuantizedFixture3x3<int8_t>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(combine(data3x3, |
Gunes Bayir | c6137d2 | 2023-10-09 20:47:16 +0100 | [diff] [blame] | 489 | framework::dataset::make("DataType", DataType::QASYMM8_SIGNED)), |
| 490 | framework::dataset::make("DataLayout", { DataLayout::NHWC })), |
Sheri Zhang | a14817a | 2020-02-26 10:30:15 +0000 | [diff] [blame] | 491 | framework::dataset::make("InputQuantizationInfo", { QuantizationInfo(1.f / 255.f, -10), QuantizationInfo(2.f / 255.f, 127) })), |
| 492 | framework::dataset::make("OutputQuantizationInfo", { QuantizationInfo(3.f / 255.f, 64), QuantizationInfo(4.f / 255.f, -128) })), |
Gunes Bayir | c6137d2 | 2023-10-09 20:47:16 +0100 | [diff] [blame] | 493 | framework::dataset::make("AddBias", { true }))) |
Sheri Zhang | a14817a | 2020-02-26 10:30:15 +0000 | [diff] [blame] | 494 | { |
| 495 | // Validate output |
| 496 | validate(CLAccessor(_target), _reference, tolerance_qasymm8, tolerance_num); |
| 497 | } |
| 498 | TEST_SUITE_END() // W3x3 |
| 499 | |
| 500 | TEST_SUITE(W2x2) // GEMMDeconvolution |
| 501 | FIXTURE_DATA_TEST_CASE(RunSmall, CLDeconvolutionLayerQuantizedFixture2x2<int8_t>, framework::DatasetMode::PRECOMMIT, combine(combine(combine(combine(combine(data2x2_precommit, |
| 502 | framework::dataset::make("DataType", DataType::QASYMM8_SIGNED)), |
| 503 | data_layouts_dataset), |
| 504 | framework::dataset::make("InputQuantizationInfo", { QuantizationInfo(1.f / 255.f, 127), QuantizationInfo(2.f / 255.f, -128) })), |
| 505 | framework::dataset::make("OutputQuantizationInfo", { QuantizationInfo(3.f / 255.f, -10), QuantizationInfo(4.f / 255.f, 64) })), |
| 506 | add_bias_dataset)) |
| 507 | { |
| 508 | // Validate output |
| 509 | validate(CLAccessor(_target), _reference, tolerance_qasymm8, tolerance_num); |
| 510 | } |
| 511 | TEST_SUITE_END() // W2x2 |
| 512 | |
| 513 | TEST_SUITE(W1x1) // DirectDeconvolution and GEMMDeconvolution |
Freddie Liardet | e92b045 | 2021-04-22 14:55:17 +0100 | [diff] [blame] | 514 | FIXTURE_DATA_TEST_CASE(Run, CLDeconvolutionLayerQuantizedFixture1x1<int8_t>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(combine(data1x1, |
| 515 | framework::dataset::make("DataType", DataType::QASYMM8_SIGNED)), |
Sheri Zhang | a14817a | 2020-02-26 10:30:15 +0000 | [diff] [blame] | 516 | data_layouts_dataset), |
| 517 | framework::dataset::make("InputQuantizationInfo", { QuantizationInfo(1.f / 255.f, 0), QuantizationInfo(2.f / 255.f, 0) })), |
| 518 | framework::dataset::make("OutputQuantizationInfo", { QuantizationInfo(3.f / 255.f, 0), QuantizationInfo(4.f / 255.f, 0) })), |
Gunes Bayir | c6137d2 | 2023-10-09 20:47:16 +0100 | [diff] [blame] | 519 | framework::dataset::make("AddBias", { true }))) |
Sheri Zhang | a14817a | 2020-02-26 10:30:15 +0000 | [diff] [blame] | 520 | { |
| 521 | // Validate output |
| 522 | validate(CLAccessor(_target), _reference, tolerance_qasymm8, tolerance_num); |
| 523 | } |
| 524 | TEST_SUITE_END() // W1x1 |
| 525 | |
Viet-Hoa Do | 019a7d9 | 2023-06-27 16:33:57 +0100 | [diff] [blame] | 526 | TEST_SUITE(W5x1) |
| 527 | FIXTURE_DATA_TEST_CASE(Run, CLDeconvolutionLayerQuantizedFixture5x1<int8_t>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(combine(data5x1, framework::dataset::make("DataType", |
| 528 | DataType::QASYMM8_SIGNED)), |
| 529 | data_layouts_dataset), |
| 530 | framework::dataset::make("InputQuantizationInfo", { QuantizationInfo(1.f / 255.f, 10), QuantizationInfo(2.f / 255.f, 5) })), |
| 531 | framework::dataset::make("OutputQuantizationInfo", { QuantizationInfo(3.f / 255.f, 5), QuantizationInfo(4.f / 255.f, 10) })), |
Gunes Bayir | c6137d2 | 2023-10-09 20:47:16 +0100 | [diff] [blame] | 532 | framework::dataset::make("AddBias", { true }))) |
Viet-Hoa Do | 019a7d9 | 2023-06-27 16:33:57 +0100 | [diff] [blame] | 533 | { |
| 534 | // Validate output |
| 535 | validate(CLAccessor(_target), _reference, tolerance_qasymm8, tolerance_num); |
| 536 | } |
| 537 | TEST_SUITE_END() // W5x1 |
| 538 | |
Sheri Zhang | a14817a | 2020-02-26 10:30:15 +0000 | [diff] [blame] | 539 | TEST_SUITE_END() // QASYMM8_SIGNED |
| 540 | |
Freddie Liardet | e92b045 | 2021-04-22 14:55:17 +0100 | [diff] [blame] | 541 | const auto input_qinfo_dataset = framework::dataset::make("InputQuantizationInfo", { QuantizationInfo(1.f / 255.f, 10) }); |
| 542 | const auto output_qinfo_dataset = framework::dataset::make("OutputQuantizationInfo", { QuantizationInfo(3.f / 255.f, 0) }); |
| 543 | const auto input_signed_qinfo_dataset = framework::dataset::make("InputQuantizationInfo", { QuantizationInfo(1.f / 255.f, -10) }); |
| 544 | const auto output_signed_qinfo_dataset = framework::dataset::make("OutputQuantizationInfo", { QuantizationInfo(3.f / 255.f, 10) }); |
| 545 | |
| 546 | TEST_SUITE(QSYMM8_PER_CHANNEL) |
| 547 | |
| 548 | TEST_SUITE(W4x4) |
Gunes Bayir | 5945070 | 2022-12-12 09:29:06 +0000 | [diff] [blame] | 549 | FIXTURE_DATA_TEST_CASE(RunSmall, CLDeconvolutionLayerQuantizedPerChannelFixture4x4<uint8_t>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(combine(combine(data4x4, |
Freddie Liardet | e92b045 | 2021-04-22 14:55:17 +0100 | [diff] [blame] | 550 | framework::dataset::make("DataType", DataType::QASYMM8)), |
| 551 | data_layouts_dataset), |
| 552 | input_qinfo_dataset), |
| 553 | output_qinfo_dataset), |
Gunes Bayir | c6137d2 | 2023-10-09 20:47:16 +0100 | [diff] [blame] | 554 | framework::dataset::make("AddBias", { true })), |
Freddie Liardet | e92b045 | 2021-04-22 14:55:17 +0100 | [diff] [blame] | 555 | framework::dataset::make("WeightsDataType", { DataType::QSYMM8_PER_CHANNEL }))) |
| 556 | { |
| 557 | // Validate output |
| 558 | validate(CLAccessor(_target), _reference, tolerance_qasymm8, tolerance_num); |
| 559 | } |
Gunes Bayir | 5945070 | 2022-12-12 09:29:06 +0000 | [diff] [blame] | 560 | FIXTURE_DATA_TEST_CASE(RunSmallSigned, CLDeconvolutionLayerQuantizedPerChannelFixture4x4<int8_t>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(combine(combine(data4x4, |
Freddie Liardet | e92b045 | 2021-04-22 14:55:17 +0100 | [diff] [blame] | 561 | framework::dataset::make("DataType", DataType::QASYMM8_SIGNED)), |
| 562 | data_layouts_dataset), |
| 563 | input_signed_qinfo_dataset), |
| 564 | output_signed_qinfo_dataset), |
Gunes Bayir | c6137d2 | 2023-10-09 20:47:16 +0100 | [diff] [blame] | 565 | framework::dataset::make("AddBias", { true })), |
Freddie Liardet | e92b045 | 2021-04-22 14:55:17 +0100 | [diff] [blame] | 566 | framework::dataset::make("WeightsDataType", { DataType::QSYMM8_PER_CHANNEL }))) |
| 567 | { |
| 568 | // Validate output |
| 569 | validate(CLAccessor(_target), _reference, tolerance_qasymm8, tolerance_num); |
| 570 | } |
| 571 | TEST_SUITE_END() // W4x4 |
| 572 | |
| 573 | TEST_SUITE(W3x3) |
Gunes Bayir | 5945070 | 2022-12-12 09:29:06 +0000 | [diff] [blame] | 574 | FIXTURE_DATA_TEST_CASE(RunSmall, CLDeconvolutionLayerQuantizedPerChannelFixture3x3<uint8_t>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(combine(combine(data3x3, |
Freddie Liardet | e92b045 | 2021-04-22 14:55:17 +0100 | [diff] [blame] | 575 | framework::dataset::make("DataType", DataType::QASYMM8)), |
| 576 | data_layouts_dataset), |
| 577 | input_qinfo_dataset), |
| 578 | output_qinfo_dataset), |
Gunes Bayir | c6137d2 | 2023-10-09 20:47:16 +0100 | [diff] [blame] | 579 | framework::dataset::make("AddBias", { true })), |
Freddie Liardet | e92b045 | 2021-04-22 14:55:17 +0100 | [diff] [blame] | 580 | framework::dataset::make("WeightsDataType", { DataType::QSYMM8_PER_CHANNEL }))) |
| 581 | { |
| 582 | // Validate output |
| 583 | validate(CLAccessor(_target), _reference, tolerance_qasymm8, tolerance_num); |
| 584 | } |
Gunes Bayir | 5945070 | 2022-12-12 09:29:06 +0000 | [diff] [blame] | 585 | FIXTURE_DATA_TEST_CASE(RunSmallSigned, CLDeconvolutionLayerQuantizedPerChannelFixture3x3<int8_t>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(combine(combine(data3x3, |
Freddie Liardet | e92b045 | 2021-04-22 14:55:17 +0100 | [diff] [blame] | 586 | framework::dataset::make("DataType", DataType::QASYMM8_SIGNED)), |
| 587 | data_layouts_dataset), |
| 588 | input_signed_qinfo_dataset), |
| 589 | output_signed_qinfo_dataset), |
Gunes Bayir | c6137d2 | 2023-10-09 20:47:16 +0100 | [diff] [blame] | 590 | framework::dataset::make("AddBias", { true })), |
Freddie Liardet | e92b045 | 2021-04-22 14:55:17 +0100 | [diff] [blame] | 591 | framework::dataset::make("WeightsDataType", { DataType::QSYMM8_PER_CHANNEL }))) |
| 592 | { |
| 593 | // Validate output |
| 594 | validate(CLAccessor(_target), _reference, tolerance_qasymm8, tolerance_num); |
| 595 | } |
Gunes Bayir | 5945070 | 2022-12-12 09:29:06 +0000 | [diff] [blame] | 596 | |
| 597 | FIXTURE_DATA_TEST_CASE(RunSmallSignedPrecommit, CLDeconvolutionLayerQuantizedPerChannelFixture2x2<int8_t>, framework::DatasetMode::PRECOMMIT, |
| 598 | combine(combine(combine(combine(combine(combine(data3x3_precommit, |
| 599 | framework::dataset::make("DataType", DataType::QASYMM8_SIGNED)), |
| 600 | data_layouts_dataset), |
| 601 | input_signed_qinfo_dataset), |
| 602 | output_signed_qinfo_dataset), |
| 603 | add_bias_dataset), |
| 604 | framework::dataset::make("WeightsDataType", { DataType::QSYMM8_PER_CHANNEL }))) |
| 605 | { |
| 606 | // Validate output |
| 607 | validate(CLAccessor(_target), _reference, tolerance_qasymm8, tolerance_num); |
| 608 | } |
Freddie Liardet | e92b045 | 2021-04-22 14:55:17 +0100 | [diff] [blame] | 609 | TEST_SUITE_END() // W3x3 |
| 610 | |
Gunes Bayir | 5945070 | 2022-12-12 09:29:06 +0000 | [diff] [blame] | 611 | FIXTURE_DATA_TEST_CASE(RunSmall, CLDeconvolutionLayerQuantizedPerChannelFixture2x2<uint8_t>, framework::DatasetMode::PRECOMMIT, combine(combine(combine(combine(combine(combine(data3x3_precommit, |
Freddie Liardet | e92b045 | 2021-04-22 14:55:17 +0100 | [diff] [blame] | 612 | framework::dataset::make("DataType", DataType::QASYMM8)), |
| 613 | data_layouts_dataset), |
| 614 | input_qinfo_dataset), |
| 615 | output_qinfo_dataset), |
| 616 | add_bias_dataset), |
| 617 | framework::dataset::make("WeightsDataType", { DataType::QSYMM8_PER_CHANNEL }))) |
| 618 | { |
| 619 | // Validate output |
| 620 | validate(CLAccessor(_target), _reference, tolerance_qasymm8, tolerance_num); |
| 621 | } |
Gunes Bayir | 5945070 | 2022-12-12 09:29:06 +0000 | [diff] [blame] | 622 | |
| 623 | TEST_SUITE(W2x2) |
| 624 | FIXTURE_DATA_TEST_CASE(RunSmall, CLDeconvolutionLayerQuantizedPerChannelFixture2x2<uint8_t>, framework::DatasetMode::PRECOMMIT, combine(combine(combine(combine(combine(combine(data2x2_precommit, |
| 625 | framework::dataset::make("DataType", DataType::QASYMM8)), |
| 626 | data_layouts_dataset), |
| 627 | input_qinfo_dataset), |
| 628 | output_qinfo_dataset), |
| 629 | add_bias_dataset), |
| 630 | framework::dataset::make("WeightsDataType", { DataType::QSYMM8_PER_CHANNEL }))) |
| 631 | { |
| 632 | // Validate output |
| 633 | validate(CLAccessor(_target), _reference, tolerance_qasymm8, tolerance_num); |
| 634 | } |
| 635 | FIXTURE_DATA_TEST_CASE(RunSmallSigned, CLDeconvolutionLayerQuantizedPerChannelFixture2x2<int8_t>, framework::DatasetMode::PRECOMMIT, combine(combine(combine(combine(combine(combine(data2x2_precommit, |
Freddie Liardet | e92b045 | 2021-04-22 14:55:17 +0100 | [diff] [blame] | 636 | framework::dataset::make("DataType", DataType::QASYMM8_SIGNED)), |
| 637 | data_layouts_dataset), |
| 638 | input_signed_qinfo_dataset), |
| 639 | output_signed_qinfo_dataset), |
| 640 | add_bias_dataset), |
| 641 | framework::dataset::make("WeightsDataType", { DataType::QSYMM8_PER_CHANNEL }))) |
| 642 | { |
| 643 | // Validate output |
| 644 | validate(CLAccessor(_target), _reference, tolerance_qasymm8, tolerance_num); |
| 645 | } |
| 646 | TEST_SUITE_END() // W2x2 |
| 647 | |
| 648 | TEST_SUITE(W1x1) |
Gunes Bayir | 5945070 | 2022-12-12 09:29:06 +0000 | [diff] [blame] | 649 | FIXTURE_DATA_TEST_CASE(RunSmall, CLDeconvolutionLayerQuantizedPerChannelFixture1x1<uint8_t>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(combine(combine(data1x1, |
Freddie Liardet | e92b045 | 2021-04-22 14:55:17 +0100 | [diff] [blame] | 650 | framework::dataset::make("DataType", DataType::QASYMM8)), |
| 651 | data_layouts_dataset), |
| 652 | input_qinfo_dataset), |
| 653 | output_qinfo_dataset), |
Gunes Bayir | c6137d2 | 2023-10-09 20:47:16 +0100 | [diff] [blame] | 654 | framework::dataset::make("AddBias", { false })), |
Freddie Liardet | e92b045 | 2021-04-22 14:55:17 +0100 | [diff] [blame] | 655 | framework::dataset::make("WeightsDataType", { DataType::QSYMM8_PER_CHANNEL }))) |
| 656 | { |
| 657 | // Validate output |
| 658 | validate(CLAccessor(_target), _reference, tolerance_qasymm8, tolerance_num); |
| 659 | } |
Gunes Bayir | 5945070 | 2022-12-12 09:29:06 +0000 | [diff] [blame] | 660 | FIXTURE_DATA_TEST_CASE(RunSmallSigned, CLDeconvolutionLayerQuantizedPerChannelFixture1x1<int8_t>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(combine(combine(data1x1, |
Freddie Liardet | e92b045 | 2021-04-22 14:55:17 +0100 | [diff] [blame] | 661 | framework::dataset::make("DataType", DataType::QASYMM8_SIGNED)), |
| 662 | data_layouts_dataset), |
| 663 | input_signed_qinfo_dataset), |
| 664 | output_signed_qinfo_dataset), |
Gunes Bayir | c6137d2 | 2023-10-09 20:47:16 +0100 | [diff] [blame] | 665 | framework::dataset::make("AddBias", { true })), |
Freddie Liardet | e92b045 | 2021-04-22 14:55:17 +0100 | [diff] [blame] | 666 | framework::dataset::make("WeightsDataType", { DataType::QSYMM8_PER_CHANNEL }))) |
| 667 | { |
| 668 | // Validate output |
| 669 | validate(CLAccessor(_target), _reference, tolerance_qasymm8, tolerance_num); |
| 670 | } |
| 671 | TEST_SUITE_END() // W1x1 |
| 672 | |
Viet-Hoa Do | 019a7d9 | 2023-06-27 16:33:57 +0100 | [diff] [blame] | 673 | TEST_SUITE(W5x1) |
| 674 | FIXTURE_DATA_TEST_CASE(RunSmall, CLDeconvolutionLayerQuantizedPerChannelFixture5x1<uint8_t>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(combine(combine(data5x1, |
| 675 | framework::dataset::make("DataType", DataType::QASYMM8)), |
| 676 | data_layouts_dataset), |
| 677 | input_qinfo_dataset), |
| 678 | output_qinfo_dataset), |
Gunes Bayir | c6137d2 | 2023-10-09 20:47:16 +0100 | [diff] [blame] | 679 | framework::dataset::make("AddBias", { true })), |
Viet-Hoa Do | 019a7d9 | 2023-06-27 16:33:57 +0100 | [diff] [blame] | 680 | framework::dataset::make("WeightsDataType", { DataType::QSYMM8_PER_CHANNEL }))) |
| 681 | { |
| 682 | // Validate output |
| 683 | validate(CLAccessor(_target), _reference, tolerance_qasymm8, tolerance_num); |
| 684 | } |
| 685 | FIXTURE_DATA_TEST_CASE(RunSmallSigned, CLDeconvolutionLayerQuantizedPerChannelFixture5x1<int8_t>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(combine(combine(data5x1, |
| 686 | framework::dataset::make("DataType", DataType::QASYMM8_SIGNED)), |
| 687 | data_layouts_dataset), |
| 688 | input_signed_qinfo_dataset), |
| 689 | output_signed_qinfo_dataset), |
Gunes Bayir | c6137d2 | 2023-10-09 20:47:16 +0100 | [diff] [blame] | 690 | framework::dataset::make("AddBias", { false })), |
Viet-Hoa Do | 019a7d9 | 2023-06-27 16:33:57 +0100 | [diff] [blame] | 691 | framework::dataset::make("WeightsDataType", { DataType::QSYMM8_PER_CHANNEL }))) |
| 692 | { |
| 693 | // Validate output |
| 694 | validate(CLAccessor(_target), _reference, tolerance_qasymm8, tolerance_num); |
| 695 | } |
| 696 | TEST_SUITE_END() // W5x1 |
| 697 | |
Freddie Liardet | e92b045 | 2021-04-22 14:55:17 +0100 | [diff] [blame] | 698 | TEST_SUITE_END() // QSYMM8_PER_CHANNEL |
| 699 | |
Michalis Spyrou | 064add6 | 2018-11-01 18:14:27 +0000 | [diff] [blame] | 700 | TEST_SUITE_END() // Quantized |
Michele Di Giorgio | 9fef38a | 2018-07-06 18:06:58 +0100 | [diff] [blame] | 701 | |
Michalis Spyrou | 064add6 | 2018-11-01 18:14:27 +0000 | [diff] [blame] | 702 | TEST_SUITE_END() // DeconvolutionLayer |
| 703 | TEST_SUITE_END() // CL |
Michalis Spyrou | 780db4e | 2017-11-23 09:49:51 +0000 | [diff] [blame] | 704 | } // namespace validation |
| 705 | } // namespace test |
| 706 | } // namespace arm_compute |