Giorgio Arena | 04a8f8c | 2017-11-23 11:45:24 +0000 | [diff] [blame] | 1 | /* |
Gian Marco Iodice | 211a55d | 2022-08-31 11:47:08 +0100 | [diff] [blame] | 2 | * Copyright (c) 2017-2022 Arm Limited. |
Giorgio Arena | 04a8f8c | 2017-11-23 11:45:24 +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, |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
Giorgio Arena | 04a8f8c | 2017-11-23 11:45:24 +0000 | [diff] [blame] | 22 | * SOFTWARE. |
| 23 | */ |
| 24 | #include "arm_compute/core/Types.h" |
| 25 | #include "arm_compute/runtime/CL/CLTensor.h" |
| 26 | #include "arm_compute/runtime/CL/CLTensorAllocator.h" |
| 27 | #include "arm_compute/runtime/CL/functions/CLDepthwiseConvolutionLayer.h" |
| 28 | #include "tests/CL/CLAccessor.h" |
| 29 | #include "tests/PaddingCalculator.h" |
| 30 | #include "tests/datasets/DepthwiseConvolutionLayerDataset.h" |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 31 | #include "tests/datasets/DilatedDepthwiseConvolutionLayerDataset.h" |
Giorgio Arena | 04a8f8c | 2017-11-23 11:45:24 +0000 | [diff] [blame] | 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/DepthwiseConvolutionLayerFixture.h" |
| 37 | |
| 38 | namespace arm_compute |
| 39 | { |
| 40 | namespace test |
| 41 | { |
| 42 | namespace validation |
| 43 | { |
| 44 | namespace |
| 45 | { |
Georgios Pinitas | 009fede | 2018-10-26 12:54:21 +0100 | [diff] [blame] | 46 | RelativeTolerance<half_float::half> tolerance_f16(half_float::half(0.01)); /**< Tolerance value for comparing reference's output against implementation's output for DataType::F16 */ |
| 47 | constexpr RelativeTolerance<float> tolerance_f32(0.01f); /**< Tolerance value for comparing reference's output against implementation's output for DataType::F32 */ |
Georgios Pinitas | 83e3e75 | 2018-11-07 18:33:08 +0000 | [diff] [blame] | 48 | constexpr AbsoluteTolerance<uint8_t> tolerance_qasymm8(0); /**< Tolerance value for comparing reference's output against implementation's output for DataType::QASYMM8 */ |
Georgios Pinitas | 009fede | 2018-10-26 12:54:21 +0100 | [diff] [blame] | 49 | constexpr float tolerance_num = 0.05f; /**< Tolerance number */ |
Giorgio Arena | 7657224 | 2018-04-04 17:44:26 +0100 | [diff] [blame] | 50 | |
Gian Marco Iodice | 211a55d | 2022-08-31 11:47:08 +0100 | [diff] [blame] | 51 | const auto depth_multipliers = framework::dataset::make("DepthMultiplier", { 1, 4 }); |
Matthew Jackson | 6c2eac1 | 2019-07-23 10:43:10 +0100 | [diff] [blame] | 52 | const auto large_depth_multipliers = framework::dataset::make("DepthMultiplier", { 1, 2, 5, 8 }); |
Manuel Bottini | a788c2f | 2019-04-08 13:18:00 +0100 | [diff] [blame] | 53 | |
| 54 | //Activation Functions |
| 55 | const auto ActivationFunctionsDataset = framework::dataset::make("ActivationInfo", |
| 56 | { |
Gian Marco Iodice | c63b722 | 2021-06-30 08:39:44 +0000 | [diff] [blame] | 57 | ActivationLayerInfo(), |
Michele Di Giorgio | 17b7102 | 2020-11-16 13:10:07 +0000 | [diff] [blame] | 58 | ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::BOUNDED_RELU, 6.f, 0.f) |
Manuel Bottini | a788c2f | 2019-04-08 13:18:00 +0100 | [diff] [blame] | 59 | }); |
Giorgio Arena | 04a8f8c | 2017-11-23 11:45:24 +0000 | [diff] [blame] | 60 | } // namespace |
| 61 | |
| 62 | TEST_SUITE(CL) |
| 63 | TEST_SUITE(DepthwiseConvolutionLayer) |
| 64 | |
Giorgio Arena | ad0c738 | 2018-04-23 16:16:21 +0100 | [diff] [blame] | 65 | // *INDENT-OFF* |
| 66 | // clang-format off |
Manuel Bottini | 387259a | 2020-05-21 17:14:36 +0100 | [diff] [blame] | 67 | DATA_TEST_CASE(Validate, framework::DatasetMode::ALL, zip(zip(zip(zip(zip(zip(zip( |
Vidhya Sudhan Loganathan | 7485d5a | 2018-07-04 09:34:00 +0100 | [diff] [blame] | 68 | framework::dataset::make("InputInfo", { TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), // Mismatching data type input/weights |
| 69 | TensorInfo(TensorShape(27U, 13U, 3U), 1, DataType::F32), // Mismatching input feature maps |
| 70 | TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), // Mismatching depth multiplier |
| 71 | TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), // Invalid biases size |
| 72 | TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), // Invalid biases dimensions |
| 73 | TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), // Invalid output size |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 74 | TensorInfo(TensorShape(27U, 13U, 8U), 1, DataType::F32), // patch size bigger than input width |
| 75 | TensorInfo(TensorShape(27U, 13U, 8U), 1, DataType::F32), // dilation < 1 |
Vidhya Sudhan Loganathan | 7485d5a | 2018-07-04 09:34:00 +0100 | [diff] [blame] | 76 | TensorInfo(TensorShape(27U, 13U, 8U), 1, DataType::F32), |
| 77 | TensorInfo(TensorShape(32U, 13U, 8U), 1, DataType::QASYMM8), |
Giorgio Arena | ad0c738 | 2018-04-23 16:16:21 +0100 | [diff] [blame] | 78 | }), |
Vidhya Sudhan Loganathan | 7485d5a | 2018-07-04 09:34:00 +0100 | [diff] [blame] | 79 | framework::dataset::make("WeightsInfo", { TensorInfo(TensorShape(3U, 3U, 2U), 1, DataType::F16), |
| 80 | TensorInfo(TensorShape(3U, 3U, 2U), 1, DataType::F32), |
| 81 | TensorInfo(TensorShape(3U, 3U, 2U), 1, DataType::F32), |
| 82 | TensorInfo(TensorShape(3U, 3U, 2U), 1, DataType::F32), |
| 83 | TensorInfo(TensorShape(3U, 3U, 2U), 1, DataType::F32), |
| 84 | TensorInfo(TensorShape(3U, 3U, 2U), 1, DataType::F32), |
| 85 | TensorInfo(TensorShape(3U, 3U, 16U), 1, DataType::F32), |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 86 | TensorInfo(TensorShape(3U, 3U, 16U), 1, DataType::F32), |
| 87 | TensorInfo(TensorShape(3U, 3U, 16U), 1, DataType::F32), |
Vidhya Sudhan Loganathan | 7485d5a | 2018-07-04 09:34:00 +0100 | [diff] [blame] | 88 | TensorInfo(TensorShape(3U, 3U, 24U), 1, DataType::QASYMM8), |
Giorgio Arena | ad0c738 | 2018-04-23 16:16:21 +0100 | [diff] [blame] | 89 | })), |
Vidhya Sudhan Loganathan | 7485d5a | 2018-07-04 09:34:00 +0100 | [diff] [blame] | 90 | framework::dataset::make("BiasesInfo", { TensorInfo(TensorShape(2U), 1, DataType::F32), |
| 91 | TensorInfo(TensorShape(2U), 1, DataType::F32), |
| 92 | TensorInfo(TensorShape(2U), 1, DataType::F32), |
| 93 | TensorInfo(TensorShape(4U), 1, DataType::F32), |
| 94 | TensorInfo(TensorShape(2U, 2U), 1, DataType::F32), |
| 95 | TensorInfo(TensorShape(2U), 1, DataType::F32), |
| 96 | TensorInfo(TensorShape(16U), 1, DataType::F32), |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 97 | TensorInfo(TensorShape(16U), 1, DataType::F32), |
| 98 | TensorInfo(TensorShape(16U), 1, DataType::F32), |
Vidhya Sudhan Loganathan | 7485d5a | 2018-07-04 09:34:00 +0100 | [diff] [blame] | 99 | TensorInfo(TensorShape(24U), 1, DataType::S32), |
Giorgio Arena | ad0c738 | 2018-04-23 16:16:21 +0100 | [diff] [blame] | 100 | })), |
Vidhya Sudhan Loganathan | 7485d5a | 2018-07-04 09:34:00 +0100 | [diff] [blame] | 101 | framework::dataset::make("OutputInfo", { TensorInfo(TensorShape(25U, 11U, 2U), 1, DataType::F32), |
| 102 | TensorInfo(TensorShape(25U, 11U, 2U), 1, DataType::F32), |
| 103 | TensorInfo(TensorShape(25U, 11U, 2U), 1, DataType::F32), |
| 104 | TensorInfo(TensorShape(25U, 11U, 2U), 1, DataType::F32), |
| 105 | TensorInfo(TensorShape(25U, 11U, 2U), 1, DataType::F32), |
| 106 | TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), |
| 107 | TensorInfo(TensorShape(25U, 11U, 16U), 1, DataType::F32), |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 108 | TensorInfo(TensorShape(25U, 11U, 16U), 1, DataType::F32), |
| 109 | TensorInfo(TensorShape(25U, 11U, 16U), 1, DataType::F32), |
Vidhya Sudhan Loganathan | 7485d5a | 2018-07-04 09:34:00 +0100 | [diff] [blame] | 110 | TensorInfo(TensorShape(32U, 11U, 24U), 1, DataType::QASYMM8), |
Giorgio Arena | ad0c738 | 2018-04-23 16:16:21 +0100 | [diff] [blame] | 111 | })), |
| 112 | framework::dataset::make("ConvInfo", { PadStrideInfo(1, 1, 0, 0), |
| 113 | PadStrideInfo(1, 1, 0, 0), |
| 114 | PadStrideInfo(1, 1, 0, 0), |
| 115 | PadStrideInfo(1, 1, 0, 0), |
| 116 | PadStrideInfo(1, 1, 0, 0), |
| 117 | PadStrideInfo(1, 1, 0, 0), |
| 118 | PadStrideInfo(1, 1, 0, 0), |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 119 | PadStrideInfo(1, 1, 0, 0), |
| 120 | PadStrideInfo(1, 1, 0, 0), |
Giorgio Arena | ad0c738 | 2018-04-23 16:16:21 +0100 | [diff] [blame] | 121 | PadStrideInfo(1, 1, 1, 0), |
| 122 | })), |
| 123 | framework::dataset::make("DepthMultiplier", { 1, |
| 124 | 1, |
| 125 | 3, |
| 126 | 1, |
| 127 | 1, |
| 128 | 1, |
| 129 | 2, |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 130 | 2, |
| 131 | 2, |
Giorgio Arena | ad0c738 | 2018-04-23 16:16:21 +0100 | [diff] [blame] | 132 | 3, |
| 133 | })), |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 134 | framework::dataset::make("Dilation", { Size2D(1U, 1U), |
| 135 | Size2D(1U, 1U), |
| 136 | Size2D(1U, 1U), |
| 137 | Size2D(1U, 1U), |
| 138 | Size2D(1U, 1U), |
| 139 | Size2D(1U, 1U), |
| 140 | Size2D(20U, 1U), |
| 141 | Size2D(0U, 1U), |
| 142 | Size2D(1U, 1U), |
| 143 | Size2D(1U, 1U), |
| 144 | })), |
| 145 | framework::dataset::make("Expected", { false, false, false, false, false, false, false, false, true, true })), |
| 146 | input_info, weights_info, biases_info, output_info, conv_info, depth_multiplier, dilation, expected) |
Giorgio Arena | ad0c738 | 2018-04-23 16:16:21 +0100 | [diff] [blame] | 147 | { |
Michele Di Giorgio | 601ba3f | 2019-08-22 16:20:04 +0100 | [diff] [blame] | 148 | bool is_valid = bool(CLDepthwiseConvolutionLayer::validate(&input_info.clone()->set_is_resizable(true), &weights_info.clone()->set_is_resizable(true), &biases_info.clone()->set_is_resizable(true), &output_info.clone()->set_is_resizable(true), conv_info, depth_multiplier,ActivationLayerInfo(), dilation)); |
Giorgio Arena | ad0c738 | 2018-04-23 16:16:21 +0100 | [diff] [blame] | 149 | ARM_COMPUTE_EXPECT(is_valid == expected, framework::LogLevel::ERRORS); |
| 150 | } |
| 151 | // clang-format on |
| 152 | // *INDENT-ON* |
| 153 | |
Giorgio Arena | 04a8f8c | 2017-11-23 11:45:24 +0000 | [diff] [blame] | 154 | template <typename T> |
| 155 | using CLDepthwiseConvolutionLayerFixture = DepthwiseConvolutionLayerValidationFixture<CLTensor, CLAccessor, CLDepthwiseConvolutionLayer, T>; |
Manuel Bottini | ca62c6f | 2021-03-23 11:50:34 +0000 | [diff] [blame] | 156 | template <typename T> |
| 157 | using CLDepthwiseConvolutionLayerMixedDataLayoutFixture = DepthwiseConvolutionLayerValidationFixture<CLTensor, CLAccessor, CLDepthwiseConvolutionLayer, T, true>; |
SiCongLi | bc4e311 | 2021-06-29 13:18:30 +0100 | [diff] [blame] | 158 | template <typename T> |
| 159 | using CLDepthwiseConvolutionLayerInPlaceFixture = DepthwiseConvolutionLayerValidationFixture<CLTensor, CLAccessor, CLDepthwiseConvolutionLayer, T, false, true>; |
Giorgio Arena | 04a8f8c | 2017-11-23 11:45:24 +0000 | [diff] [blame] | 160 | |
Giorgio Arena | 04a8f8c | 2017-11-23 11:45:24 +0000 | [diff] [blame] | 161 | TEST_SUITE(Float) |
Michele Di Giorgio | d24af8a | 2018-05-08 17:23:52 +0100 | [diff] [blame] | 162 | TEST_SUITE(FP16) |
Michele Di Giorgio | 933fe86 | 2018-02-19 15:42:12 +0000 | [diff] [blame] | 163 | TEST_SUITE(W3x3) |
Giorgio Arena | e6bb3c6 | 2018-08-23 11:19:11 +0100 | [diff] [blame] | 164 | TEST_SUITE(NCHW) |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 165 | FIXTURE_DATA_TEST_CASE_NEW(RunSmall, CLDepthwiseConvolutionLayerFixture<half>, framework::DatasetMode::ALL, |
| 166 | combine(combine(combine(combine(framework::dataset::concat(datasets::SmallDepthwiseConvolutionLayerDataset3x3(), |
| 167 | datasets::SmallDepthwiseConvolutionLayerDataset3x3NCHW()), |
| 168 | depth_multipliers), |
| 169 | framework::dataset::make("DataType", |
| 170 | DataType::F16)), |
| 171 | framework::dataset::make("DataLayout", DataLayout::NCHW)), |
| 172 | ActivationFunctionsDataset)) |
Michele Di Giorgio | 933fe86 | 2018-02-19 15:42:12 +0000 | [diff] [blame] | 173 | { |
| 174 | validate(CLAccessor(_target), _reference, tolerance_f16); |
| 175 | } |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 176 | FIXTURE_DATA_TEST_CASE_NEW(RunLarge, CLDepthwiseConvolutionLayerFixture<half>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(datasets::LargeDepthwiseConvolutionLayerDataset3x3(), |
| 177 | large_depth_multipliers), |
| 178 | framework::dataset::make("DataType", |
| 179 | DataType::F16)), |
| 180 | framework::dataset::make("DataLayout", DataLayout::NCHW)), |
| 181 | ActivationFunctionsDataset)) |
Michele Di Giorgio | 933fe86 | 2018-02-19 15:42:12 +0000 | [diff] [blame] | 182 | { |
| 183 | validate(CLAccessor(_target), _reference, tolerance_f16); |
| 184 | } |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 185 | TEST_SUITE(Dilation) |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 186 | FIXTURE_DATA_TEST_CASE_NEW(RunSmall, CLDepthwiseConvolutionLayerFixture<half>, framework::DatasetMode::ALL, combine(combine(combine(combine(datasets::SmallDepthwiseDilatedConvolutionLayerDataset3x3(), |
| 187 | depth_multipliers), |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 188 | framework::dataset::make("DataType", |
| 189 | DataType::F16)), |
Manuel Bottini | a788c2f | 2019-04-08 13:18:00 +0100 | [diff] [blame] | 190 | framework::dataset::make("DataLayout", { DataLayout::NCHW })), |
| 191 | ActivationFunctionsDataset)) |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 192 | { |
| 193 | validate(CLAccessor(_target), _reference, tolerance_f16); |
| 194 | } |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 195 | FIXTURE_DATA_TEST_CASE_NEW(RunLarge, CLDepthwiseConvolutionLayerFixture<half>, framework::DatasetMode::NIGHTLY, |
| 196 | combine(combine(combine(combine(datasets::LargeDepthwiseDilatedConvolutionLayerDataset3x3(), |
| 197 | large_depth_multipliers), |
| 198 | framework::dataset::make("DataType", |
| 199 | DataType::F16)), |
| 200 | framework::dataset::make("DataLayout", { DataLayout::NCHW })), |
| 201 | ActivationFunctionsDataset)) |
| 202 | { |
| 203 | validate(CLAccessor(_target), _reference, tolerance_f16); |
| 204 | } |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 205 | TEST_SUITE_END() // Dilation |
| 206 | TEST_SUITE_END() // NCHW |
Michele Di Giorgio | d24af8a | 2018-05-08 17:23:52 +0100 | [diff] [blame] | 207 | |
Giorgio Arena | e6bb3c6 | 2018-08-23 11:19:11 +0100 | [diff] [blame] | 208 | TEST_SUITE(NHWC) |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 209 | FIXTURE_DATA_TEST_CASE_NEW(RunSmall, CLDepthwiseConvolutionLayerFixture<half>, framework::DatasetMode::ALL, |
| 210 | combine(combine(combine(combine(datasets::SmallDepthwiseConvolutionLayerDataset3x3(), |
| 211 | depth_multipliers), |
| 212 | framework::dataset::make("DataType", |
| 213 | DataType::F16)), |
| 214 | framework::dataset::make("DataLayout", DataLayout::NHWC)), |
| 215 | ActivationFunctionsDataset)) |
Giorgio Arena | e6bb3c6 | 2018-08-23 11:19:11 +0100 | [diff] [blame] | 216 | { |
| 217 | validate(CLAccessor(_target), _reference, tolerance_f16); |
| 218 | } |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 219 | FIXTURE_DATA_TEST_CASE_NEW(RunLarge, CLDepthwiseConvolutionLayerFixture<half>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(datasets::LargeDepthwiseConvolutionLayerDataset3x3(), |
| 220 | large_depth_multipliers), |
| 221 | framework::dataset::make("DataType", |
| 222 | DataType::F16)), |
| 223 | framework::dataset::make("DataLayout", DataLayout::NHWC)), |
| 224 | ActivationFunctionsDataset)) |
Giorgio Arena | e6bb3c6 | 2018-08-23 11:19:11 +0100 | [diff] [blame] | 225 | { |
| 226 | validate(CLAccessor(_target), _reference, tolerance_f16); |
| 227 | } |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 228 | TEST_SUITE(Dilation) |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 229 | FIXTURE_DATA_TEST_CASE_NEW(RunSmall, CLDepthwiseConvolutionLayerFixture<half>, framework::DatasetMode::ALL, combine(combine(combine(combine(datasets::SmallDepthwiseDilatedConvolutionLayerDataset3x3(), |
| 230 | depth_multipliers), |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 231 | framework::dataset::make("DataType", |
| 232 | DataType::F16)), |
Manuel Bottini | a788c2f | 2019-04-08 13:18:00 +0100 | [diff] [blame] | 233 | framework::dataset::make("DataLayout", { DataLayout::NHWC })), |
| 234 | ActivationFunctionsDataset)) |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 235 | { |
| 236 | validate(CLAccessor(_target), _reference, tolerance_f16); |
| 237 | } |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 238 | FIXTURE_DATA_TEST_CASE_NEW(RunLarge, CLDepthwiseConvolutionLayerFixture<half>, framework::DatasetMode::NIGHTLY, |
| 239 | combine(combine(combine(combine(datasets::LargeDepthwiseDilatedConvolutionLayerDataset3x3(), |
| 240 | large_depth_multipliers), |
| 241 | framework::dataset::make("DataType", |
| 242 | DataType::F16)), |
| 243 | framework::dataset::make("DataLayout", { DataLayout::NHWC })), |
| 244 | ActivationFunctionsDataset)) |
| 245 | { |
| 246 | validate(CLAccessor(_target), _reference, tolerance_f16); |
| 247 | } |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 248 | TEST_SUITE_END() // Dilation |
| 249 | TEST_SUITE_END() // NHWC |
| 250 | TEST_SUITE_END() // W3x3 |
Giorgio Arena | e6bb3c6 | 2018-08-23 11:19:11 +0100 | [diff] [blame] | 251 | |
Michele Di Giorgio | d24af8a | 2018-05-08 17:23:52 +0100 | [diff] [blame] | 252 | TEST_SUITE(Generic) |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 253 | FIXTURE_DATA_TEST_CASE_NEW(RunSmall, CLDepthwiseConvolutionLayerFixture<half>, framework::DatasetMode::ALL, combine(combine(combine(combine(datasets::SmallDepthwiseConvolutionLayerDataset(), |
| 254 | depth_multipliers), |
Michele Di Giorgio | d24af8a | 2018-05-08 17:23:52 +0100 | [diff] [blame] | 255 | framework::dataset::make("DataType", |
| 256 | DataType::F16)), |
Manuel Bottini | a788c2f | 2019-04-08 13:18:00 +0100 | [diff] [blame] | 257 | framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })), |
| 258 | ActivationFunctionsDataset)) |
Michele Di Giorgio | d24af8a | 2018-05-08 17:23:52 +0100 | [diff] [blame] | 259 | { |
| 260 | validate(CLAccessor(_target), _reference, tolerance_f16, tolerance_num); |
| 261 | } |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 262 | FIXTURE_DATA_TEST_CASE_NEW(RunLarge, CLDepthwiseConvolutionLayerFixture<half>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(datasets::LargeDepthwiseConvolutionLayerDataset(), |
| 263 | large_depth_multipliers), |
| 264 | framework::dataset::make("DataType", |
| 265 | DataType::F16)), |
| 266 | framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })), |
| 267 | ActivationFunctionsDataset)) |
| 268 | { |
| 269 | validate(CLAccessor(_target), _reference, tolerance_f16, tolerance_num); |
| 270 | } |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 271 | |
| 272 | TEST_SUITE(Dilation) |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 273 | FIXTURE_DATA_TEST_CASE_NEW(RunSmall, CLDepthwiseConvolutionLayerFixture<half>, framework::DatasetMode::ALL, combine(combine(combine(combine(datasets::SmallDepthwiseDilatedConvolutionLayerDataset(), |
| 274 | depth_multipliers), |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 275 | framework::dataset::make("DataType", |
| 276 | DataType::F16)), |
Manuel Bottini | a788c2f | 2019-04-08 13:18:00 +0100 | [diff] [blame] | 277 | framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })), |
| 278 | ActivationFunctionsDataset)) |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 279 | { |
| 280 | validate(CLAccessor(_target), _reference, tolerance_f16, tolerance_num); |
| 281 | } |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 282 | FIXTURE_DATA_TEST_CASE_NEW(RunLarge, CLDepthwiseConvolutionLayerFixture<half>, framework::DatasetMode::NIGHTLY, |
| 283 | combine(combine(combine(combine(datasets::LargeDepthwiseDilatedConvolutionLayerDataset(), |
| 284 | large_depth_multipliers), |
| 285 | framework::dataset::make("DataType", |
| 286 | DataType::F16)), |
| 287 | framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })), |
| 288 | ActivationFunctionsDataset)) |
| 289 | { |
| 290 | validate(CLAccessor(_target), _reference, tolerance_f16, tolerance_num); |
| 291 | } |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 292 | TEST_SUITE_END() // Dilation |
| 293 | TEST_SUITE_END() // Generic |
SiCongLi | bc4e311 | 2021-06-29 13:18:30 +0100 | [diff] [blame] | 294 | |
| 295 | TEST_SUITE(InPlace) |
| 296 | FIXTURE_DATA_TEST_CASE_NEW(RunSmall, CLDepthwiseConvolutionLayerInPlaceFixture<half>, framework::DatasetMode::ALL, |
| 297 | combine(combine(combine(combine(datasets::SmallInPlaceDepthwiseConvolutionLayerDataset(), |
| 298 | framework::dataset::make("DepthMultiplier", { 1 })), |
| 299 | framework::dataset::make("DataType", |
| 300 | DataType::F16)), |
| 301 | framework::dataset::make("DataLayout", { DataLayout::NHWC })), |
| 302 | ActivationFunctionsDataset)) |
| 303 | { |
| 304 | validate(CLAccessor(_src), _reference, tolerance_f16, tolerance_num); |
| 305 | } |
| 306 | TEST_SUITE_END() // InPlace |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 307 | TEST_SUITE_END() // FP16 |
Michele Di Giorgio | 933fe86 | 2018-02-19 15:42:12 +0000 | [diff] [blame] | 308 | |
Giorgio Arena | 04a8f8c | 2017-11-23 11:45:24 +0000 | [diff] [blame] | 309 | TEST_SUITE(FP32) |
| 310 | TEST_SUITE(W3x3) |
Giorgio Arena | d051e97 | 2018-06-20 11:46:42 +0100 | [diff] [blame] | 311 | TEST_SUITE(NCHW) |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 312 | FIXTURE_DATA_TEST_CASE_NEW(RunSmall, CLDepthwiseConvolutionLayerFixture<float>, framework::DatasetMode::ALL, |
| 313 | combine(combine(combine(combine(framework::dataset::concat(datasets::SmallDepthwiseConvolutionLayerDataset3x3(), |
| 314 | datasets::SmallDepthwiseConvolutionLayerDataset3x3NCHW()), |
| 315 | depth_multipliers), |
| 316 | framework::dataset::make("DataType", |
| 317 | DataType::F32)), |
| 318 | framework::dataset::make("DataLayout", DataLayout::NCHW)), |
| 319 | ActivationFunctionsDataset)) |
Giorgio Arena | 04a8f8c | 2017-11-23 11:45:24 +0000 | [diff] [blame] | 320 | { |
| 321 | validate(CLAccessor(_target), _reference, tolerance_f32); |
| 322 | } |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 323 | FIXTURE_DATA_TEST_CASE_NEW(RunLarge, CLDepthwiseConvolutionLayerFixture<float>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(datasets::LargeDepthwiseConvolutionLayerDataset3x3(), |
| 324 | large_depth_multipliers), |
| 325 | framework::dataset::make("DataType", |
| 326 | DataType::F32)), |
| 327 | framework::dataset::make("DataLayout", DataLayout::NCHW)), |
| 328 | ActivationFunctionsDataset)) |
Giorgio Arena | 04a8f8c | 2017-11-23 11:45:24 +0000 | [diff] [blame] | 329 | { |
| 330 | validate(CLAccessor(_target), _reference, tolerance_f32); |
| 331 | } |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 332 | TEST_SUITE(Dilation) |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 333 | FIXTURE_DATA_TEST_CASE_NEW(RunSmall, CLDepthwiseConvolutionLayerFixture<float>, framework::DatasetMode::ALL, |
| 334 | combine(combine(combine(combine(datasets::SmallDepthwiseDilatedConvolutionLayerDataset3x3(), depth_multipliers), |
| 335 | framework::dataset::make("DataType", |
| 336 | DataType::F32)), |
| 337 | framework::dataset::make("DataLayout", DataLayout::NCHW)), |
| 338 | ActivationFunctionsDataset)) |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 339 | { |
| 340 | validate(CLAccessor(_target), _reference, tolerance_f32); |
| 341 | } |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 342 | FIXTURE_DATA_TEST_CASE_NEW(RunLarge, CLDepthwiseConvolutionLayerFixture<float>, framework::DatasetMode::NIGHTLY, |
| 343 | combine(combine(combine(combine(datasets::LargeDepthwiseDilatedConvolutionLayerDataset3x3(), |
| 344 | large_depth_multipliers), |
| 345 | framework::dataset::make("DataType", |
| 346 | DataType::F32)), |
| 347 | framework::dataset::make("DataLayout", DataLayout::NCHW)), |
| 348 | ActivationFunctionsDataset)) |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 349 | { |
| 350 | validate(CLAccessor(_target), _reference, tolerance_f32); |
| 351 | } |
| 352 | |
| 353 | TEST_SUITE_END() // Dilation |
| 354 | TEST_SUITE_END() // NCHW |
Giorgio Arena | d051e97 | 2018-06-20 11:46:42 +0100 | [diff] [blame] | 355 | TEST_SUITE(NHWC) |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 356 | FIXTURE_DATA_TEST_CASE_NEW(RunSmall, CLDepthwiseConvolutionLayerFixture<float>, framework::DatasetMode::ALL, |
| 357 | combine(combine(combine(combine(datasets::SmallDepthwiseConvolutionLayerDataset3x3(), |
| 358 | depth_multipliers), |
| 359 | framework::dataset::make("DataType", |
| 360 | DataType::F32)), |
| 361 | framework::dataset::make("DataLayout", DataLayout::NHWC)), |
| 362 | ActivationFunctionsDataset)) |
Giorgio Arena | d051e97 | 2018-06-20 11:46:42 +0100 | [diff] [blame] | 363 | { |
| 364 | validate(CLAccessor(_target), _reference, tolerance_f32); |
| 365 | } |
Manuel Bottini | ca62c6f | 2021-03-23 11:50:34 +0000 | [diff] [blame] | 366 | FIXTURE_DATA_TEST_CASE_NEW(RunMixedDataLayout, CLDepthwiseConvolutionLayerMixedDataLayoutFixture<float>, framework::DatasetMode::PRECOMMIT, |
| 367 | combine(combine(combine(combine(datasets::SmallDepthwiseConvolutionLayerDataset3x3(), |
| 368 | framework::dataset::make("DepthMultiplier", { 2 })), |
| 369 | framework::dataset::make("DataType", |
| 370 | DataType::F32)), |
| 371 | framework::dataset::make("DataLayout", DataLayout::NHWC)), |
SiCongLi | bc4e311 | 2021-06-29 13:18:30 +0100 | [diff] [blame] | 372 | framework::dataset::make("ActivationInfo", ActivationLayerInfo()))) |
Manuel Bottini | ca62c6f | 2021-03-23 11:50:34 +0000 | [diff] [blame] | 373 | { |
| 374 | validate(CLAccessor(_target), _reference, tolerance_f32); |
| 375 | } |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 376 | FIXTURE_DATA_TEST_CASE_NEW(RunLarge, CLDepthwiseConvolutionLayerFixture<float>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(datasets::LargeDepthwiseConvolutionLayerDataset3x3(), |
| 377 | large_depth_multipliers), |
| 378 | framework::dataset::make("DataType", |
| 379 | DataType::F32)), |
| 380 | framework::dataset::make("DataLayout", DataLayout::NHWC)), |
| 381 | ActivationFunctionsDataset)) |
Giorgio Arena | d051e97 | 2018-06-20 11:46:42 +0100 | [diff] [blame] | 382 | { |
| 383 | validate(CLAccessor(_target), _reference, tolerance_f32); |
| 384 | } |
Gian Marco Iodice | 5e28181 | 2021-07-06 13:19:41 +0100 | [diff] [blame] | 385 | |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 386 | TEST_SUITE(Dilation) |
| 387 | |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 388 | FIXTURE_DATA_TEST_CASE_NEW(RunSmall, CLDepthwiseConvolutionLayerFixture<float>, framework::DatasetMode::ALL, |
| 389 | combine(combine(combine(combine(datasets::SmallDepthwiseDilatedConvolutionLayerDataset3x3(), |
| 390 | depth_multipliers), |
| 391 | framework::dataset::make("DataType", |
| 392 | DataType::F32)), |
| 393 | framework::dataset::make("DataLayout", DataLayout::NHWC)), |
| 394 | ActivationFunctionsDataset)) |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 395 | { |
| 396 | validate(CLAccessor(_target), _reference, tolerance_f32); |
| 397 | } |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 398 | FIXTURE_DATA_TEST_CASE_NEW(RunLarge, CLDepthwiseConvolutionLayerFixture<float>, framework::DatasetMode::NIGHTLY, |
| 399 | combine(combine(combine(combine(datasets::LargeDepthwiseDilatedConvolutionLayerDataset3x3(), |
| 400 | large_depth_multipliers), |
| 401 | framework::dataset::make("DataType", |
| 402 | DataType::F32)), |
| 403 | framework::dataset::make("DataLayout", DataLayout::NHWC)), |
| 404 | ActivationFunctionsDataset)) |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 405 | { |
| 406 | validate(CLAccessor(_target), _reference, tolerance_f32); |
| 407 | } |
| 408 | TEST_SUITE_END() // Dilation |
| 409 | TEST_SUITE_END() // NHWC |
| 410 | TEST_SUITE_END() // W3x3 |
Michele Di Giorgio | d24af8a | 2018-05-08 17:23:52 +0100 | [diff] [blame] | 411 | |
| 412 | TEST_SUITE(Generic) |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 413 | FIXTURE_DATA_TEST_CASE_NEW(RunSmall, CLDepthwiseConvolutionLayerFixture<float>, framework::DatasetMode::ALL, combine(combine(combine(combine(datasets::SmallDepthwiseConvolutionLayerDataset(), |
| 414 | depth_multipliers), |
Michele Di Giorgio | d24af8a | 2018-05-08 17:23:52 +0100 | [diff] [blame] | 415 | framework::dataset::make("DataType", |
| 416 | DataType::F32)), |
Manuel Bottini | a788c2f | 2019-04-08 13:18:00 +0100 | [diff] [blame] | 417 | framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })), |
| 418 | ActivationFunctionsDataset)) |
Michele Di Giorgio | d24af8a | 2018-05-08 17:23:52 +0100 | [diff] [blame] | 419 | { |
| 420 | validate(CLAccessor(_target), _reference, tolerance_f32); |
| 421 | } |
Gian Marco Iodice | 5e28181 | 2021-07-06 13:19:41 +0100 | [diff] [blame] | 422 | |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 423 | FIXTURE_DATA_TEST_CASE_NEW(RunLarge, CLDepthwiseConvolutionLayerFixture<float>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(datasets::LargeDepthwiseConvolutionLayerDataset(), |
| 424 | large_depth_multipliers), |
| 425 | framework::dataset::make("DataType", |
| 426 | DataType::F32)), |
| 427 | framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })), |
| 428 | ActivationFunctionsDataset)) |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 429 | { |
| 430 | validate(CLAccessor(_target), _reference, tolerance_f32); |
| 431 | } |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 432 | |
Gian Marco Iodice | 5e28181 | 2021-07-06 13:19:41 +0100 | [diff] [blame] | 433 | FIXTURE_DATA_TEST_CASE_NEW(RunLargeKernelSize, CLDepthwiseConvolutionLayerFixture<float>, framework::DatasetMode::ALL, |
| 434 | combine(combine(combine(combine(datasets::LargeKernelSizeDepthwiseConvolutionLayerNHWCDataset(), |
| 435 | framework::dataset::make("DepthMultiplier", { 1 })), |
| 436 | framework::dataset::make("DataType", |
| 437 | DataType::F32)), |
| 438 | framework::dataset::make("DataLayout", { DataLayout::NHWC })), |
| 439 | ActivationFunctionsDataset)) |
| 440 | { |
| 441 | validate(CLAccessor(_target), _reference, tolerance_f32); |
| 442 | } |
| 443 | |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 444 | TEST_SUITE(Dilation) |
| 445 | FIXTURE_DATA_TEST_CASE_NEW(RunSmall, CLDepthwiseConvolutionLayerFixture<float>, framework::DatasetMode::ALL, combine(combine(combine(combine(datasets::SmallDepthwiseDilatedConvolutionLayerDataset(), |
| 446 | depth_multipliers), |
| 447 | framework::dataset::make("DataType", |
| 448 | DataType::F32)), |
| 449 | framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })), |
| 450 | ActivationFunctionsDataset)) |
| 451 | { |
| 452 | validate(CLAccessor(_target), _reference, tolerance_f32); |
| 453 | } |
| 454 | FIXTURE_DATA_TEST_CASE_NEW(RunLarge, CLDepthwiseConvolutionLayerFixture<float>, framework::DatasetMode::NIGHTLY, |
| 455 | combine(combine(combine(combine(datasets::LargeDepthwiseDilatedConvolutionLayerDataset3x3(), |
| 456 | large_depth_multipliers), |
| 457 | framework::dataset::make("DataType", |
| 458 | DataType::F32)), |
| 459 | framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })), |
| 460 | ActivationFunctionsDataset)) |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 461 | { |
| 462 | validate(CLAccessor(_target), _reference, tolerance_f32); |
| 463 | } |
| 464 | TEST_SUITE_END() // Dilation |
| 465 | TEST_SUITE_END() // Generic |
SiCongLi | bc4e311 | 2021-06-29 13:18:30 +0100 | [diff] [blame] | 466 | |
| 467 | TEST_SUITE(InPlace) |
| 468 | FIXTURE_DATA_TEST_CASE_NEW(RunSmall, CLDepthwiseConvolutionLayerInPlaceFixture<float>, framework::DatasetMode::ALL, |
| 469 | combine(combine(combine(combine(datasets::SmallInPlaceDepthwiseConvolutionLayerDataset(), |
| 470 | framework::dataset::make("DepthMultiplier", { 1 })), |
| 471 | framework::dataset::make("DataType", |
| 472 | DataType::F32)), |
| 473 | framework::dataset::make("DataLayout", { DataLayout::NHWC })), |
| 474 | ActivationFunctionsDataset)) |
| 475 | { |
| 476 | validate(CLAccessor(_src), _reference, tolerance_f32); |
| 477 | } |
| 478 | TEST_SUITE_END() // InPlace |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 479 | TEST_SUITE_END() // FP32 |
| 480 | TEST_SUITE_END() // Float |
Giorgio Arena | 04a8f8c | 2017-11-23 11:45:24 +0000 | [diff] [blame] | 481 | |
| 482 | template <typename T> |
Georgios Pinitas | de5a1cc | 2018-02-02 12:52:07 +0000 | [diff] [blame] | 483 | using CLDepthwiseConvolutionLayerQuantizedFixture = DepthwiseConvolutionLayerValidationQuantizedFixture<CLTensor, CLAccessor, CLDepthwiseConvolutionLayer, T>; |
Michele Di Giorgio | df4cf57 | 2019-10-09 15:32:39 +0100 | [diff] [blame] | 484 | template <typename T> |
Manuel Bottini | ca62c6f | 2021-03-23 11:50:34 +0000 | [diff] [blame] | 485 | using CLDepthwiseConvolutionLayerQuantizedMixedDataLayoutFixture = DepthwiseConvolutionLayerValidationQuantizedFixture<CLTensor, CLAccessor, CLDepthwiseConvolutionLayer, T, true>; |
| 486 | template <typename T> |
Michele Di Giorgio | df4cf57 | 2019-10-09 15:32:39 +0100 | [diff] [blame] | 487 | using CLDepthwiseConvolutionLayerQuantizedPerChannelFixture = DepthwiseConvolutionLayerValidationQuantizedPerChannelFixture<CLTensor, CLAccessor, CLDepthwiseConvolutionLayer, T, int8_t>; |
Giorgio Arena | 04a8f8c | 2017-11-23 11:45:24 +0000 | [diff] [blame] | 488 | |
| 489 | TEST_SUITE(Quantized) |
| 490 | TEST_SUITE(QASYMM8) |
Georgios Pinitas | de5a1cc | 2018-02-02 12:52:07 +0000 | [diff] [blame] | 491 | TEST_SUITE(Generic) |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 492 | FIXTURE_DATA_TEST_CASE_NEW(RunSmall, CLDepthwiseConvolutionLayerQuantizedFixture<uint8_t>, framework::DatasetMode::PRECOMMIT, |
| 493 | combine(combine(combine(combine(combine(combine(datasets::SmallDepthwiseConvolutionLayerDataset(), |
| 494 | depth_multipliers), |
| 495 | framework::dataset::make("DataType", DataType::QASYMM8)), |
Gian Marco Iodice | 8155c02 | 2021-04-16 15:08:59 +0100 | [diff] [blame] | 496 | framework::dataset::make("SrcQuantizationInfo", { QuantizationInfo(0.5f, 128), QuantizationInfo(2.2f, 10) })), |
| 497 | framework::dataset::make("DstQuantizationInfo", { QuantizationInfo(1.f, 128) })), |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 498 | framework::dataset::make("DataLayout", { DataLayout::NHWC })), // NCHW is tested with int8 |
| 499 | ActivationFunctionsDataset)) |
Georgios Pinitas | de5a1cc | 2018-02-02 12:52:07 +0000 | [diff] [blame] | 500 | { |
| 501 | validate(CLAccessor(_target), _reference, tolerance_qasymm8); |
| 502 | } |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 503 | FIXTURE_DATA_TEST_CASE_NEW(RunLarge, CLDepthwiseConvolutionLayerQuantizedFixture<uint8_t>, framework::DatasetMode::NIGHTLY, |
| 504 | combine(combine(combine(combine(combine(combine(datasets::LargeDepthwiseConvolutionLayerDataset(), |
| 505 | large_depth_multipliers), |
| 506 | framework::dataset::make("DataType", DataType::QASYMM8)), |
| 507 | framework::dataset::make("SrcQuantizationInfo", { QuantizationInfo(0.5f, 10), QuantizationInfo(2.2f, 10) })), |
| 508 | framework::dataset::make("DstQuantizationInfo", { QuantizationInfo(0.7f, 2) })), |
| 509 | framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })), |
| 510 | ActivationFunctionsDataset)) |
Georgios Pinitas | de5a1cc | 2018-02-02 12:52:07 +0000 | [diff] [blame] | 511 | { |
| 512 | validate(CLAccessor(_target), _reference, tolerance_qasymm8); |
| 513 | } |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 514 | TEST_SUITE(Dilation) |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 515 | FIXTURE_DATA_TEST_CASE_NEW(RunSmall, CLDepthwiseConvolutionLayerQuantizedFixture<uint8_t>, framework::DatasetMode::PRECOMMIT, |
| 516 | combine(combine(combine(combine(combine(combine(datasets::SmallDepthwiseDilatedConvolutionLayerDataset(), |
| 517 | depth_multipliers), |
| 518 | framework::dataset::make("DataType", DataType::QASYMM8)), |
| 519 | framework::dataset::make("SrcQuantizationInfo", { QuantizationInfo(0.5f, 10), QuantizationInfo(2.2f, 10) })), |
| 520 | framework::dataset::make("DstQuantizationInfo", { QuantizationInfo(0.8, 1) })), |
| 521 | framework::dataset::make("DataLayout", { DataLayout::NHWC })), // NCHW is tested with int8 |
| 522 | ActivationFunctionsDataset)) |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 523 | { |
| 524 | validate(CLAccessor(_target), _reference, tolerance_qasymm8); |
| 525 | } |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 526 | FIXTURE_DATA_TEST_CASE_NEW(RunLarge, CLDepthwiseConvolutionLayerQuantizedFixture<uint8_t>, framework::DatasetMode::NIGHTLY, |
| 527 | combine(combine(combine(combine(combine(combine(datasets::LargeDepthwiseDilatedConvolutionLayerDataset(), |
| 528 | large_depth_multipliers), |
| 529 | framework::dataset::make("DataType", DataType::QASYMM8)), |
| 530 | framework::dataset::make("SrcQuantizationInfo", { QuantizationInfo(0.5f, 10), QuantizationInfo(1.3f, 10) })), |
| 531 | framework::dataset::make("DstQuantizationInfo", { QuantizationInfo(0.9f, 11) })), |
| 532 | framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })), |
| 533 | ActivationFunctionsDataset)) |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 534 | { |
| 535 | validate(CLAccessor(_target), _reference, tolerance_qasymm8); |
| 536 | } |
| 537 | TEST_SUITE_END() // Dilation |
| 538 | TEST_SUITE_END() // Generic |
Giorgio Arena | 04a8f8c | 2017-11-23 11:45:24 +0000 | [diff] [blame] | 539 | TEST_SUITE(W3x3) |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 540 | FIXTURE_DATA_TEST_CASE_NEW(RunSmall, CLDepthwiseConvolutionLayerQuantizedFixture<uint8_t>, framework::DatasetMode::PRECOMMIT, |
| 541 | combine(combine(combine(combine(combine(combine(datasets::SmallDepthwiseConvolutionLayerDataset3x3(), |
| 542 | depth_multipliers), |
| 543 | framework::dataset::make("DataType", DataType::QASYMM8)), |
| 544 | framework::dataset::make("SrcQuantizationInfo", { QuantizationInfo(0.3f, 10), QuantizationInfo(2.2f, 10) })), |
| 545 | framework::dataset::make("DstQuantizationInfo", { QuantizationInfo(0.5f, 10) })), |
| 546 | framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })), |
| 547 | ActivationFunctionsDataset)) |
Giorgio Arena | 04a8f8c | 2017-11-23 11:45:24 +0000 | [diff] [blame] | 548 | { |
| 549 | validate(CLAccessor(_target), _reference, tolerance_qasymm8); |
| 550 | } |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 551 | FIXTURE_DATA_TEST_CASE_NEW(RunLarge, CLDepthwiseConvolutionLayerQuantizedFixture<uint8_t>, framework::DatasetMode::NIGHTLY, |
| 552 | combine(combine(combine(combine(combine(combine(datasets::LargeDepthwiseConvolutionLayerDataset3x3(), |
| 553 | large_depth_multipliers), |
| 554 | framework::dataset::make("DataType", DataType::QASYMM8)), |
| 555 | framework::dataset::make("SrcQuantizationInfo", { QuantizationInfo(0.5f, 10), QuantizationInfo(2.2f, 10) })), |
| 556 | framework::dataset::make("DstQuantizationInfo", { QuantizationInfo(0.5f, 10) })), |
| 557 | framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })), |
| 558 | ActivationFunctionsDataset)) |
Giorgio Arena | 04a8f8c | 2017-11-23 11:45:24 +0000 | [diff] [blame] | 559 | { |
| 560 | validate(CLAccessor(_target), _reference, tolerance_qasymm8); |
| 561 | } |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 562 | TEST_SUITE(Dilation) |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 563 | FIXTURE_DATA_TEST_CASE_NEW(RunSmall, CLDepthwiseConvolutionLayerQuantizedFixture<uint8_t>, framework::DatasetMode::PRECOMMIT, |
| 564 | combine(combine(combine(combine(combine(combine(datasets::SmallDepthwiseDilatedConvolutionLayerDataset3x3(), |
| 565 | depth_multipliers), |
| 566 | framework::dataset::make("DataType", DataType::QASYMM8)), |
| 567 | framework::dataset::make("SrcQuantizationInfo", { QuantizationInfo(0.5f, 10), QuantizationInfo(2.2f, 10) })), |
| 568 | framework::dataset::make("DstQuantizationInfo", { QuantizationInfo(0.5f, 10) })), |
| 569 | framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })), |
| 570 | ActivationFunctionsDataset)) |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 571 | { |
| 572 | validate(CLAccessor(_target), _reference, tolerance_qasymm8); |
| 573 | } |
Manuel Bottini | ca62c6f | 2021-03-23 11:50:34 +0000 | [diff] [blame] | 574 | FIXTURE_DATA_TEST_CASE_NEW(RunMixedDataLayout, CLDepthwiseConvolutionLayerQuantizedMixedDataLayoutFixture<uint8_t>, framework::DatasetMode::PRECOMMIT, |
| 575 | combine(combine(combine(combine(combine(combine(datasets::SmallDepthwiseDilatedConvolutionLayerDataset3x3(), |
| 576 | framework::dataset::make("DepthMultiplier", { 2 })), |
| 577 | framework::dataset::make("DataType", DataType::QASYMM8)), |
| 578 | framework::dataset::make("SrcQuantizationInfo", { QuantizationInfo(0.5f, 10), QuantizationInfo(2.2f, 10) })), |
| 579 | framework::dataset::make("DstQuantizationInfo", { QuantizationInfo(0.5f, 10) })), |
| 580 | framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })), |
| 581 | framework::dataset::make("ActivationInfo", ActivationLayerInfo()))) |
| 582 | { |
| 583 | validate(CLAccessor(_target), _reference, tolerance_qasymm8); |
| 584 | } |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 585 | FIXTURE_DATA_TEST_CASE_NEW(RunLarge, CLDepthwiseConvolutionLayerQuantizedFixture<uint8_t>, framework::DatasetMode::NIGHTLY, |
| 586 | combine(combine(combine(combine(combine(combine(datasets::LargeDepthwiseDilatedConvolutionLayerDataset3x3(), |
| 587 | large_depth_multipliers), |
| 588 | framework::dataset::make("DataType", DataType::QASYMM8)), |
| 589 | framework::dataset::make("SrcQuantizationInfo", { QuantizationInfo(0.5f, 10), QuantizationInfo(2.2f, 10) })), |
| 590 | framework::dataset::make("DstQuantizationInfo", { QuantizationInfo(0.5f, 10) })), |
| 591 | framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })), |
| 592 | ActivationFunctionsDataset)) |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 593 | { |
| 594 | validate(CLAccessor(_target), _reference, tolerance_qasymm8); |
| 595 | } |
| 596 | TEST_SUITE_END() // Dilation |
| 597 | TEST_SUITE_END() // W3x3 |
| 598 | TEST_SUITE_END() // QASYMM8 |
Michele Di Giorgio | df4cf57 | 2019-10-09 15:32:39 +0100 | [diff] [blame] | 599 | |
Michele Di Giorgio | 4cd4cde | 2020-01-06 14:07:44 +0000 | [diff] [blame] | 600 | TEST_SUITE(QASYMM8_SIGNED) |
| 601 | TEST_SUITE(Generic) |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 602 | FIXTURE_DATA_TEST_CASE_NEW(RunSmall, CLDepthwiseConvolutionLayerQuantizedFixture<int8_t>, framework::DatasetMode::PRECOMMIT, |
| 603 | combine(combine(combine(combine(combine(combine(datasets::SmallDepthwiseConvolutionLayerDataset(), |
| 604 | depth_multipliers), |
| 605 | framework::dataset::make("DataType", DataType::QASYMM8_SIGNED)), |
| 606 | framework::dataset::make("SrcQuantizationInfo", { QuantizationInfo(0.3f, 10), QuantizationInfo(2.2f, 10) })), |
| 607 | framework::dataset::make("DstQuantizationInfo", { QuantizationInfo(0.5f, 4) })), |
| 608 | framework::dataset::make("DataLayout", { DataLayout::NCHW })), |
| 609 | ActivationFunctionsDataset)) |
Michele Di Giorgio | 4cd4cde | 2020-01-06 14:07:44 +0000 | [diff] [blame] | 610 | { |
| 611 | validate(CLAccessor(_target), _reference, tolerance_qasymm8); |
| 612 | } |
Manuel Bottini | ca62c6f | 2021-03-23 11:50:34 +0000 | [diff] [blame] | 613 | FIXTURE_DATA_TEST_CASE_NEW(RunMixedDataLayout, CLDepthwiseConvolutionLayerQuantizedMixedDataLayoutFixture<int8_t>, framework::DatasetMode::PRECOMMIT, |
| 614 | combine(combine(combine(combine(combine(combine(datasets::SmallDepthwiseConvolutionLayerDataset(), |
| 615 | framework::dataset::make("DepthMultiplier", { 2 })), |
| 616 | framework::dataset::make("DataType", DataType::QASYMM8_SIGNED)), |
| 617 | framework::dataset::make("SrcQuantizationInfo", { QuantizationInfo(0.3f, 10), QuantizationInfo(2.2f, 10) })), |
| 618 | framework::dataset::make("DstQuantizationInfo", { QuantizationInfo(0.5f, 4) })), |
| 619 | framework::dataset::make("DataLayout", { DataLayout::NCHW })), |
| 620 | framework::dataset::make("ActivationInfo", ActivationLayerInfo()))) |
| 621 | { |
| 622 | validate(CLAccessor(_target), _reference, tolerance_qasymm8); |
| 623 | } |
Michele Di Giorgio | 4cd4cde | 2020-01-06 14:07:44 +0000 | [diff] [blame] | 624 | TEST_SUITE(Dilation) |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 625 | FIXTURE_DATA_TEST_CASE_NEW(RunSmall, CLDepthwiseConvolutionLayerQuantizedFixture<int8_t>, framework::DatasetMode::PRECOMMIT, |
| 626 | combine(combine(combine(combine(combine(combine(datasets::SmallDepthwiseDilatedConvolutionLayerDataset(), |
| 627 | depth_multipliers), |
| 628 | framework::dataset::make("DataType", DataType::QASYMM8_SIGNED)), |
| 629 | framework::dataset::make("SrcQuantizationInfo", { QuantizationInfo(0.5f, 10), QuantizationInfo(2.2f, 10) })), |
| 630 | framework::dataset::make("DstQuantizationInfo", { QuantizationInfo(0.8, 1) })), |
| 631 | framework::dataset::make("DataLayout", { DataLayout::NCHW })), |
| 632 | ActivationFunctionsDataset)) |
Michele Di Giorgio | 4cd4cde | 2020-01-06 14:07:44 +0000 | [diff] [blame] | 633 | { |
| 634 | validate(CLAccessor(_target), _reference, tolerance_qasymm8); |
| 635 | } |
| 636 | TEST_SUITE_END() // Dilation |
| 637 | TEST_SUITE_END() // Generic |
| 638 | TEST_SUITE_END() // QASYMM8_SIGNED |
| 639 | |
Michele Di Giorgio | df4cf57 | 2019-10-09 15:32:39 +0100 | [diff] [blame] | 640 | TEST_SUITE(QSYMM8_PER_CHANNEL) |
| 641 | TEST_SUITE(Generic) |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 642 | FIXTURE_DATA_TEST_CASE_NEW(RunSmall, CLDepthwiseConvolutionLayerQuantizedPerChannelFixture<uint8_t>, framework::DatasetMode::PRECOMMIT, |
| 643 | combine(combine(combine(combine(combine(combine(combine(datasets::SmallDepthwiseConvolutionLayerDataset(), |
| 644 | depth_multipliers), |
| 645 | framework::dataset::make("SrcDataType", DataType::QASYMM8)), |
| 646 | framework::dataset::make("WeightsDataType", DataType::QSYMM8_PER_CHANNEL)), |
| 647 | framework::dataset::make("SrcQuantizationInfo", { QuantizationInfo(0.3f, 10) })), |
| 648 | framework::dataset::make("DstQuantizationInfo", { QuantizationInfo(0.5f, 4) })), |
| 649 | framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })), |
| 650 | ActivationFunctionsDataset)) |
Michele Di Giorgio | df4cf57 | 2019-10-09 15:32:39 +0100 | [diff] [blame] | 651 | { |
| 652 | validate(CLAccessor(_target), _reference, tolerance_qasymm8); |
| 653 | } |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 654 | FIXTURE_DATA_TEST_CASE_NEW(RunLarge, CLDepthwiseConvolutionLayerQuantizedPerChannelFixture<uint8_t>, framework::DatasetMode::NIGHTLY, |
| 655 | combine(combine(combine(combine(combine(combine(combine(datasets::LargeDepthwiseConvolutionLayerDataset(), |
| 656 | large_depth_multipliers), |
| 657 | framework::dataset::make("SrcDataType", DataType::QASYMM8)), |
| 658 | framework::dataset::make("WeightsDataType", DataType::QSYMM8_PER_CHANNEL)), |
| 659 | framework::dataset::make("SrcQuantizationInfo", { QuantizationInfo(0.5f, 10) })), |
| 660 | framework::dataset::make("DstQuantizationInfo", { QuantizationInfo(0.7f, 2) })), |
| 661 | framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })), |
| 662 | ActivationFunctionsDataset)) |
Michele Di Giorgio | df4cf57 | 2019-10-09 15:32:39 +0100 | [diff] [blame] | 663 | { |
| 664 | validate(CLAccessor(_target), _reference, tolerance_qasymm8); |
| 665 | } |
| 666 | TEST_SUITE(Dilation) |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 667 | FIXTURE_DATA_TEST_CASE_NEW(RunSmall, CLDepthwiseConvolutionLayerQuantizedPerChannelFixture<uint8_t>, framework::DatasetMode::PRECOMMIT, |
| 668 | combine(combine(combine(combine(combine(combine(combine(datasets::SmallDepthwiseDilatedConvolutionLayerDataset(), |
| 669 | depth_multipliers), |
| 670 | framework::dataset::make("SrcDataType", DataType::QASYMM8)), |
| 671 | framework::dataset::make("WeightsDataType", DataType::QSYMM8_PER_CHANNEL)), |
| 672 | framework::dataset::make("SrcQuantizationInfo", { QuantizationInfo(0.5f, 10) })), |
| 673 | framework::dataset::make("DstQuantizationInfo", { QuantizationInfo(0.8, 1) })), |
| 674 | framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })), |
| 675 | ActivationFunctionsDataset)) |
Michele Di Giorgio | df4cf57 | 2019-10-09 15:32:39 +0100 | [diff] [blame] | 676 | { |
| 677 | validate(CLAccessor(_target), _reference, tolerance_qasymm8); |
| 678 | } |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 679 | FIXTURE_DATA_TEST_CASE_NEW(RunLarge, CLDepthwiseConvolutionLayerQuantizedPerChannelFixture<uint8_t>, framework::DatasetMode::NIGHTLY, |
| 680 | combine(combine(combine(combine(combine(combine(combine(datasets::LargeDepthwiseDilatedConvolutionLayerDataset(), |
| 681 | large_depth_multipliers), |
| 682 | framework::dataset::make("SrcDataType", DataType::QASYMM8)), |
| 683 | framework::dataset::make("WeightsDataType", DataType::QSYMM8_PER_CHANNEL)), |
| 684 | framework::dataset::make("SrcQuantizationInfo", { QuantizationInfo(0.5f, 10) })), |
| 685 | framework::dataset::make("DstQuantizationInfo", { QuantizationInfo(0.9f, 11) })), |
| 686 | framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })), |
| 687 | ActivationFunctionsDataset)) |
Michele Di Giorgio | df4cf57 | 2019-10-09 15:32:39 +0100 | [diff] [blame] | 688 | { |
| 689 | validate(CLAccessor(_target), _reference, tolerance_qasymm8); |
| 690 | } |
| 691 | TEST_SUITE_END() // Dilation |
| 692 | TEST_SUITE_END() // Generic |
| 693 | TEST_SUITE(W3x3) |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 694 | FIXTURE_DATA_TEST_CASE_NEW(RunSmall, CLDepthwiseConvolutionLayerQuantizedPerChannelFixture<uint8_t>, framework::DatasetMode::PRECOMMIT, |
| 695 | combine(combine(combine(combine(combine(combine(combine(datasets::SmallDepthwiseConvolutionLayerDataset3x3(), |
| 696 | depth_multipliers), |
| 697 | framework::dataset::make("SrcDataType", DataType::QASYMM8)), |
| 698 | framework::dataset::make("WeightsDataType", DataType::QSYMM8_PER_CHANNEL)), |
| 699 | framework::dataset::make("SrcQuantizationInfo", { QuantizationInfo(0.3f, 10) })), |
| 700 | framework::dataset::make("DstQuantizationInfo", { QuantizationInfo(0.5f, 4) })), |
| 701 | framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })), |
| 702 | ActivationFunctionsDataset)) |
Michele Di Giorgio | df4cf57 | 2019-10-09 15:32:39 +0100 | [diff] [blame] | 703 | { |
| 704 | validate(CLAccessor(_target), _reference, tolerance_qasymm8); |
| 705 | } |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 706 | FIXTURE_DATA_TEST_CASE_NEW(RunLarge, CLDepthwiseConvolutionLayerQuantizedPerChannelFixture<uint8_t>, framework::DatasetMode::NIGHTLY, |
| 707 | combine(combine(combine(combine(combine(combine(combine(datasets::LargeDepthwiseConvolutionLayerDataset3x3(), |
| 708 | large_depth_multipliers), |
| 709 | framework::dataset::make("SrcDataType", DataType::QASYMM8)), |
| 710 | framework::dataset::make("WeightsDataType", DataType::QSYMM8_PER_CHANNEL)), |
| 711 | framework::dataset::make("SrcQuantizationInfo", { QuantizationInfo(0.5f, 10) })), |
| 712 | framework::dataset::make("DstQuantizationInfo", { QuantizationInfo(0.5f, 10) })), |
| 713 | framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })), |
| 714 | ActivationFunctionsDataset)) |
Michele Di Giorgio | df4cf57 | 2019-10-09 15:32:39 +0100 | [diff] [blame] | 715 | { |
| 716 | validate(CLAccessor(_target), _reference, tolerance_qasymm8); |
| 717 | } |
| 718 | TEST_SUITE(Dilation) |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 719 | FIXTURE_DATA_TEST_CASE_NEW(RunSmall, CLDepthwiseConvolutionLayerQuantizedPerChannelFixture<uint8_t>, framework::DatasetMode::PRECOMMIT, |
| 720 | combine(combine(combine(combine(combine(combine(combine(datasets::SmallDepthwiseDilatedConvolutionLayerDataset3x3(), |
| 721 | depth_multipliers), |
| 722 | framework::dataset::make("SrcDataType", DataType::QASYMM8)), |
| 723 | framework::dataset::make("WeightsDataType", DataType::QSYMM8_PER_CHANNEL)), |
| 724 | framework::dataset::make("SrcQuantizationInfo", { QuantizationInfo(0.5f, 10) })), |
| 725 | framework::dataset::make("DstQuantizationInfo", { QuantizationInfo(0.5f, 10) })), |
| 726 | framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })), |
| 727 | ActivationFunctionsDataset)) |
Michele Di Giorgio | df4cf57 | 2019-10-09 15:32:39 +0100 | [diff] [blame] | 728 | { |
| 729 | validate(CLAccessor(_target), _reference, tolerance_qasymm8); |
| 730 | } |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 731 | FIXTURE_DATA_TEST_CASE_NEW(RunLarge, CLDepthwiseConvolutionLayerQuantizedPerChannelFixture<uint8_t>, framework::DatasetMode::NIGHTLY, |
| 732 | combine(combine(combine(combine(combine(combine(combine(datasets::LargeDepthwiseDilatedConvolutionLayerDataset3x3(), |
| 733 | large_depth_multipliers), |
| 734 | framework::dataset::make("SrcDataType", DataType::QASYMM8)), |
| 735 | framework::dataset::make("WeightsDataType", DataType::QSYMM8_PER_CHANNEL)), |
| 736 | framework::dataset::make("SrcQuantizationInfo", { QuantizationInfo(0.5f, 10) })), |
| 737 | framework::dataset::make("DstQuantizationInfo", { QuantizationInfo(0.5f, 10) })), |
| 738 | framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })), |
| 739 | ActivationFunctionsDataset)) |
Michele Di Giorgio | df4cf57 | 2019-10-09 15:32:39 +0100 | [diff] [blame] | 740 | { |
| 741 | validate(CLAccessor(_target), _reference, tolerance_qasymm8); |
| 742 | } |
| 743 | TEST_SUITE_END() // Dilation |
| 744 | TEST_SUITE_END() // W3x3 |
| 745 | TEST_SUITE_END() // QSYMM8_PER_CHANNEL |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 746 | TEST_SUITE_END() // Quantized |
Giorgio Arena | 04a8f8c | 2017-11-23 11:45:24 +0000 | [diff] [blame] | 747 | |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 748 | TEST_SUITE_END() // DepthwiseConvolutionLayer |
| 749 | TEST_SUITE_END() // CL |
Giorgio Arena | 04a8f8c | 2017-11-23 11:45:24 +0000 | [diff] [blame] | 750 | } // namespace validation |
| 751 | } // namespace test |
| 752 | } // namespace arm_compute |