Michalis Spyrou | 7362f0d | 2017-10-18 17:58:22 +0100 | [diff] [blame] | 1 | /* |
Omar Al Khatib | 0cba93f | 2024-02-01 14:42:37 +0000 | [diff] [blame^] | 2 | * Copyright (c) 2017-2024 Arm Limited. |
Michalis Spyrou | 7362f0d | 2017-10-18 17:58:22 +0100 | [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, |
Michalis Spyrou | aeebe4a | 2019-01-09 14:21:03 +0000 | [diff] [blame] | 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
Michalis Spyrou | 7362f0d | 2017-10-18 17:58:22 +0100 | [diff] [blame] | 22 | * SOFTWARE. |
| 23 | */ |
| 24 | #include "arm_compute/core/Types.h" |
Giorgio Arena | 7657224 | 2018-04-04 17:44:26 +0100 | [diff] [blame] | 25 | #include "arm_compute/core/utils/misc/ShapeCalculator.h" |
Giorgio Arena | 04a8f8c | 2017-11-23 11:45:24 +0000 | [diff] [blame] | 26 | #include "arm_compute/runtime/NEON/functions/NEDepthwiseConvolutionLayer.h" |
Michalis Spyrou | 7362f0d | 2017-10-18 17:58:22 +0100 | [diff] [blame] | 27 | #include "arm_compute/runtime/Tensor.h" |
| 28 | #include "arm_compute/runtime/TensorAllocator.h" |
| 29 | #include "tests/NEON/Accessor.h" |
| 30 | #include "tests/PaddingCalculator.h" |
Giorgio Arena | 04a8f8c | 2017-11-23 11:45:24 +0000 | [diff] [blame] | 31 | #include "tests/datasets/DepthwiseConvolutionLayerDataset.h" |
Usama Arif | 881f2de | 2019-04-12 10:29:17 +0100 | [diff] [blame] | 32 | #include "tests/datasets/DilatedDepthwiseConvolutionLayerDataset.h" |
Michalis Spyrou | 7362f0d | 2017-10-18 17:58:22 +0100 | [diff] [blame] | 33 | #include "tests/framework/Asserts.h" |
| 34 | #include "tests/framework/Macros.h" |
| 35 | #include "tests/framework/datasets/Datasets.h" |
| 36 | #include "tests/validation/Validation.h" |
Giorgio Arena | 04a8f8c | 2017-11-23 11:45:24 +0000 | [diff] [blame] | 37 | #include "tests/validation/fixtures/DepthwiseConvolutionLayerFixture.h" |
Michalis Spyrou | 7362f0d | 2017-10-18 17:58:22 +0100 | [diff] [blame] | 38 | |
| 39 | namespace arm_compute |
| 40 | { |
| 41 | namespace test |
| 42 | { |
| 43 | namespace validation |
| 44 | { |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 45 | using framework::dataset::make; |
Giorgio Arena | 7657224 | 2018-04-04 17:44:26 +0100 | [diff] [blame] | 46 | using namespace arm_compute::misc::shape_calculator; |
| 47 | |
Michalis Spyrou | 7362f0d | 2017-10-18 17:58:22 +0100 | [diff] [blame] | 48 | namespace |
| 49 | { |
Omar Al Khatib | 0cba93f | 2024-02-01 14:42:37 +0000 | [diff] [blame^] | 50 | constexpr RelativeTolerance<float> tolerance_f32(0.01f); /**< Tolerance value for comparing reference's output against implementation's output for DataType::F32 */ |
| 51 | constexpr AbsoluteTolerance<uint8_t> tolerance_qasymm8(1); /**< Tolerance value for comparing reference's output against implementation's output for DataType::QASYMM8 */ |
| 52 | constexpr AbsoluteTolerance<int8_t> tolerance_qasymm8_signed(1); /**< Tolerance value for comparing reference's output against implementation's output for DataType::QASYMM8_SIGNED */ |
Georgios Pinitas | 8cffcd6 | 2018-11-16 17:11:50 +0000 | [diff] [blame] | 53 | #ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC |
Manuel Bottini | e5df1d5 | 2021-04-29 12:06:33 +0100 | [diff] [blame] | 54 | RelativeTolerance<half_float::half> tolerance_f16(half_float::half(0.02)); /**< Tolerance value for comparing reference's output against implementation's output for DataType::F16 */ |
Georgios Pinitas | 8cffcd6 | 2018-11-16 17:11:50 +0000 | [diff] [blame] | 55 | constexpr float tolerance_num = 0.05f; /**< Tolerance number */ |
Michalis Spyrou | aeebe4a | 2019-01-09 14:21:03 +0000 | [diff] [blame] | 56 | #endif // __ARM_FEATURE_FP16_VECTOR_ARITHMETIC |
Giorgio Arena | 7657224 | 2018-04-04 17:44:26 +0100 | [diff] [blame] | 57 | |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 58 | const auto depth_multipliers = make("DepthMultiplier", { 1, 2, 8 }); |
| 59 | const auto large_depth_multipliers = make("DepthMultiplier", { 5, 32 }); |
Manuel Bottini | a788c2f | 2019-04-08 13:18:00 +0100 | [diff] [blame] | 60 | |
Omar Al Khatib | 0cba93f | 2024-02-01 14:42:37 +0000 | [diff] [blame^] | 61 | // Activation Functions |
| 62 | const auto NoActivation = make("ActivationInfo", ActivationLayerInfo()); |
| 63 | |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 64 | const auto ActivationFunctionsDataset = make("ActivationInfo", |
Manuel Bottini | a788c2f | 2019-04-08 13:18:00 +0100 | [diff] [blame] | 65 | { |
| 66 | ActivationLayerInfo(), |
| 67 | ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU) |
| 68 | }); |
Michele Di Giorgio | f29d1b7 | 2019-10-29 10:58:13 +0000 | [diff] [blame] | 69 | |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 70 | const auto ActivationFunctionsDatasetNightly = make("ActivationInfo", |
| 71 | { |
| 72 | ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::BOUNDED_RELU, 0.5f), |
| 73 | ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::LU_BOUNDED_RELU, 0.5f, -0.5f), |
| 74 | ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::LEAKY_RELU, 0.1f), |
| 75 | ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::SOFT_RELU), |
| 76 | ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::ELU), |
| 77 | ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::ABS), |
| 78 | ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::LOGISTIC), |
| 79 | ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::TANH), |
| 80 | ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::SQUARE), |
| 81 | ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::SWISH), |
| 82 | ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::HARD_SWISH), |
| 83 | ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::LINEAR, 2.f, 1.f), |
| 84 | #ifdef __aarch64__ |
| 85 | ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::GELU), |
| 86 | #endif // __aarch64__ |
| 87 | }); |
| 88 | |
Omar Al Khatib | 0cba93f | 2024-02-01 14:42:37 +0000 | [diff] [blame^] | 89 | const auto ActivationFunctionsQuantizedSmallDataset = make("ActivationInfo", |
| 90 | { |
| 91 | ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU) |
| 92 | }); |
| 93 | |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 94 | const auto ActivationFunctionsQuantizedDataset = make("ActivationInfo", |
| 95 | { |
| 96 | ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::BOUNDED_RELU, 0.5f), |
| 97 | ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::LU_BOUNDED_RELU, 0.5f, -0.5f), |
| 98 | }); |
| 99 | |
Omar Al Khatib | 0cba93f | 2024-02-01 14:42:37 +0000 | [diff] [blame^] | 100 | // This is only used when there is fused activation |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 101 | const auto input_qinfo_dataset = make("InputQInfo", |
Michele Di Giorgio | f29d1b7 | 2019-10-29 10:58:13 +0000 | [diff] [blame] | 102 | { |
| 103 | QuantizationInfo(0.3f, 10), |
| 104 | QuantizationInfo(2.2f, 10), |
| 105 | }); |
Omar Al Khatib | 0cba93f | 2024-02-01 14:42:37 +0000 | [diff] [blame^] | 106 | |
| 107 | const auto IgnoredQuantizationInfo = make("IgnoredQuantizationInfo", QuantizationInfo()); |
| 108 | |
Michalis Spyrou | 7362f0d | 2017-10-18 17:58:22 +0100 | [diff] [blame] | 109 | } // namespace |
| 110 | |
| 111 | TEST_SUITE(NEON) |
Manuel Bottini | a788c2f | 2019-04-08 13:18:00 +0100 | [diff] [blame] | 112 | TEST_SUITE(DepthwiseConvolutionLayer) |
Michalis Spyrou | 7362f0d | 2017-10-18 17:58:22 +0100 | [diff] [blame] | 113 | |
Abe Mbise | 7784c83 | 2018-05-31 16:48:41 +0100 | [diff] [blame] | 114 | // *INDENT-OFF* |
| 115 | // clang-format off |
Usama Arif | 881f2de | 2019-04-12 10:29:17 +0100 | [diff] [blame] | 116 | DATA_TEST_CASE(Validate3x3, framework::DatasetMode::ALL, zip(zip(zip(zip(zip(zip(zip( |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 117 | make("InputInfo", { TensorInfo(TensorShape(32U, 18U, 2U), 1, DataType::F32), // Mismatching data type input/weights |
Abe Mbise | 7784c83 | 2018-05-31 16:48:41 +0100 | [diff] [blame] | 118 | TensorInfo(TensorShape(32U, 18U, 3U), 1, DataType::F32), // Mismatching input feature maps |
| 119 | TensorInfo(TensorShape(32U, 18U, 2U), 1, DataType::F32), // Unsupported weights dimensions |
| 120 | TensorInfo(TensorShape(32U, 18U, 2U), 1, DataType::F32), // Mismatching depth multiplier |
Giorgio Arena | 66cbafb | 2018-08-23 14:51:00 +0100 | [diff] [blame] | 121 | TensorInfo(TensorShape(32U, 18U, 2U), 1, DataType::QASYMM8), // Invalid stride |
Abe Mbise | 7784c83 | 2018-05-31 16:48:41 +0100 | [diff] [blame] | 122 | TensorInfo(TensorShape(32U, 18U, 2U), 1, DataType::F32), // Invalid biases size |
| 123 | TensorInfo(TensorShape(32U, 18U, 2U), 1, DataType::F32), // Invalid biases dimensions |
| 124 | TensorInfo(TensorShape(32U, 18U, 2U), 1, DataType::F32), // Invalid output size |
Usama Arif | 881f2de | 2019-04-12 10:29:17 +0100 | [diff] [blame] | 125 | TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), // patch size bigger than input width |
| 126 | TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), // dilation < 1 |
Giorgio Arena | 66cbafb | 2018-08-23 14:51:00 +0100 | [diff] [blame] | 127 | TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), |
Abe Mbise | 7784c83 | 2018-05-31 16:48:41 +0100 | [diff] [blame] | 128 | }), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 129 | make("WeightsInfo", { TensorInfo(TensorShape(3U, 3U, 2U, 2U), 1, DataType::F16), |
Giorgio Arena | 66cbafb | 2018-08-23 14:51:00 +0100 | [diff] [blame] | 130 | TensorInfo(TensorShape(3U, 3U, 2U, 2U), 1, DataType::F32), |
| 131 | TensorInfo(TensorShape(5U, 5U, 2U, 2U), 1, DataType::F32), |
| 132 | TensorInfo(TensorShape(3U, 3U, 2U, 2U), 1, DataType::F32), |
| 133 | TensorInfo(TensorShape(3U, 3U, 2U, 2U), 1, DataType::QASYMM8), |
| 134 | TensorInfo(TensorShape(3U, 3U, 2U, 2U), 1, DataType::F32), |
| 135 | TensorInfo(TensorShape(3U, 3U, 2U, 2U), 1, DataType::F32), |
| 136 | TensorInfo(TensorShape(3U, 3U, 2U, 2U), 1, DataType::F32), |
| 137 | TensorInfo(TensorShape(3U, 3U, 2U, 2U), 1, DataType::F32), |
Usama Arif | 881f2de | 2019-04-12 10:29:17 +0100 | [diff] [blame] | 138 | TensorInfo(TensorShape(3U, 3U, 2U, 2U), 1, DataType::F32), |
| 139 | TensorInfo(TensorShape(3U, 3U, 2U, 2U), 1, DataType::F32), |
Abe Mbise | 7784c83 | 2018-05-31 16:48:41 +0100 | [diff] [blame] | 140 | })), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 141 | make("BiasesInfo", { TensorInfo(TensorShape(2U), 1, DataType::F32), |
Abe Mbise | 7784c83 | 2018-05-31 16:48:41 +0100 | [diff] [blame] | 142 | TensorInfo(TensorShape(2U), 1, DataType::F32), |
| 143 | TensorInfo(TensorShape(2U), 1, DataType::F32), |
| 144 | TensorInfo(TensorShape(2U), 1, DataType::F32), |
Giorgio Arena | 66cbafb | 2018-08-23 14:51:00 +0100 | [diff] [blame] | 145 | TensorInfo(TensorShape(2U), 1, DataType::S32), |
Abe Mbise | 7784c83 | 2018-05-31 16:48:41 +0100 | [diff] [blame] | 146 | TensorInfo(TensorShape(4U), 1, DataType::F32), |
| 147 | TensorInfo(TensorShape(2U, 2U), 1, DataType::F32), |
| 148 | TensorInfo(TensorShape(2U), 1, DataType::F32), |
| 149 | TensorInfo(TensorShape(2U), 1, DataType::F32), |
Usama Arif | 881f2de | 2019-04-12 10:29:17 +0100 | [diff] [blame] | 150 | TensorInfo(TensorShape(2U), 1, DataType::F32), |
| 151 | TensorInfo(TensorShape(2U), 1, DataType::F32), |
Abe Mbise | 7784c83 | 2018-05-31 16:48:41 +0100 | [diff] [blame] | 152 | })), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 153 | make("OutputInfo", { TensorInfo(TensorShape(30U, 16U, 2U), 1, DataType::F32), |
Abe Mbise | 7784c83 | 2018-05-31 16:48:41 +0100 | [diff] [blame] | 154 | TensorInfo(TensorShape(30U, 16U, 2U), 1, DataType::F32), |
| 155 | TensorInfo(TensorShape(30U, 16U, 2U), 1, DataType::F32), |
| 156 | TensorInfo(TensorShape(30U, 16U, 2U), 1, DataType::F32), |
Giorgio Arena | 66cbafb | 2018-08-23 14:51:00 +0100 | [diff] [blame] | 157 | TensorInfo(TensorShape(30U, 16U, 2U), 1, DataType::QASYMM8), |
Abe Mbise | 7784c83 | 2018-05-31 16:48:41 +0100 | [diff] [blame] | 158 | TensorInfo(TensorShape(30U, 16U, 2U), 1, DataType::F32), |
| 159 | TensorInfo(TensorShape(30U, 16U, 2U), 1, DataType::F32), |
| 160 | TensorInfo(TensorShape(32U, 18U, 2U), 1, DataType::F32), |
| 161 | TensorInfo(TensorShape(25U, 11U, 2U), 1, DataType::F32), |
Usama Arif | 881f2de | 2019-04-12 10:29:17 +0100 | [diff] [blame] | 162 | TensorInfo(TensorShape(25U, 11U, 2U), 1, DataType::F32), |
| 163 | TensorInfo(TensorShape(25U, 11U, 2U), 1, DataType::F32), |
Abe Mbise | 7784c83 | 2018-05-31 16:48:41 +0100 | [diff] [blame] | 164 | })), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 165 | make("ConvInfo", { PadStrideInfo(1, 1, 0, 0), |
Abe Mbise | 7784c83 | 2018-05-31 16:48:41 +0100 | [diff] [blame] | 166 | PadStrideInfo(1, 1, 0, 0), |
| 167 | PadStrideInfo(1, 1, 0, 0), |
| 168 | PadStrideInfo(1, 1, 0, 0), |
| 169 | PadStrideInfo(4, 1, 0, 0), |
| 170 | PadStrideInfo(1, 1, 0, 0), |
| 171 | PadStrideInfo(1, 1, 0, 0), |
| 172 | PadStrideInfo(1, 1, 0, 0), |
| 173 | PadStrideInfo(1, 1, 0, 0), |
Usama Arif | 881f2de | 2019-04-12 10:29:17 +0100 | [diff] [blame] | 174 | PadStrideInfo(1, 1, 0, 0), |
| 175 | PadStrideInfo(1, 1, 0, 0), |
Abe Mbise | 7784c83 | 2018-05-31 16:48:41 +0100 | [diff] [blame] | 176 | })), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 177 | make("DepthMultiplier", { 1, |
Abe Mbise | 7784c83 | 2018-05-31 16:48:41 +0100 | [diff] [blame] | 178 | 1, |
| 179 | 1, |
| 180 | 3, |
| 181 | 1, |
| 182 | 1, |
| 183 | 1, |
| 184 | 1, |
| 185 | 1, |
Usama Arif | 881f2de | 2019-04-12 10:29:17 +0100 | [diff] [blame] | 186 | 1, |
| 187 | 1, |
Abe Mbise | 7784c83 | 2018-05-31 16:48:41 +0100 | [diff] [blame] | 188 | })), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 189 | make("Dilation", { Size2D(1U, 1U), |
Usama Arif | 881f2de | 2019-04-12 10:29:17 +0100 | [diff] [blame] | 190 | Size2D(1U, 1U), |
| 191 | Size2D(1U, 1U), |
| 192 | Size2D(1U, 1U), |
| 193 | Size2D(1U, 1U), |
| 194 | Size2D(1U, 1U), |
| 195 | Size2D(1U, 1U), |
| 196 | Size2D(1U, 1U), |
| 197 | Size2D(25U, 1U), |
| 198 | Size2D(0U, 1U), |
| 199 | Size2D(1U, 1U), |
| 200 | })), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 201 | make("Expected", { false, false, false, false, false, false, false, false, false, false, true })), |
Usama Arif | 881f2de | 2019-04-12 10:29:17 +0100 | [diff] [blame] | 202 | input_info, weights_info, biases_info, output_info, conv_info, depth_multiplier,dilation, expected) |
Michalis Spyrou | 7362f0d | 2017-10-18 17:58:22 +0100 | [diff] [blame] | 203 | { |
Manuel Bottini | 05069f0 | 2019-09-26 17:18:26 +0100 | [diff] [blame] | 204 | bool is_valid = bool(NEDepthwiseConvolutionLayer::validate(&input_info.clone()->set_is_resizable(false), |
Usama Arif | 881f2de | 2019-04-12 10:29:17 +0100 | [diff] [blame] | 205 | &weights_info.clone()->set_is_resizable(false), &biases_info.clone()->set_is_resizable(false), &output_info.clone()->set_is_resizable(false), conv_info, depth_multiplier, ActivationLayerInfo(), dilation)); |
Abe Mbise | 7784c83 | 2018-05-31 16:48:41 +0100 | [diff] [blame] | 206 | ARM_COMPUTE_EXPECT(is_valid == expected, framework::LogLevel::ERRORS); |
Michalis Spyrou | 7362f0d | 2017-10-18 17:58:22 +0100 | [diff] [blame] | 207 | } |
| 208 | |
Usama Arif | 881f2de | 2019-04-12 10:29:17 +0100 | [diff] [blame] | 209 | DATA_TEST_CASE(ValidateGeneric, framework::DatasetMode::ALL, zip(zip(zip(zip(zip(zip(zip( |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 210 | make("InputInfo", { TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), // Mismatching data type input/weights |
Giorgio Arena | d93e263 | 2019-10-15 11:09:33 +0100 | [diff] [blame] | 211 | TensorInfo(TensorShape(27U, 13U, 3U), 1, DataType::F32), // Mismatching input feature maps |
| 212 | TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), // Mismatching depth multiplier |
| 213 | TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), // Invalid biases size |
| 214 | TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), // Invalid biases dimensions |
| 215 | TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), // Invalid output size |
| 216 | TensorInfo(TensorShape(27U, 13U, 8U), 1, DataType::F32), // Patch size bigger than input width |
| 217 | TensorInfo(TensorShape(27U, 13U, 8U), 1, DataType::F32), // Dilation < 1 |
Abe Mbise | 7784c83 | 2018-05-31 16:48:41 +0100 | [diff] [blame] | 218 | }), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 219 | make("WeightsInfo", { TensorInfo(TensorShape(3U, 3U, 2U), 1, DataType::F16), |
Abe Mbise | 7784c83 | 2018-05-31 16:48:41 +0100 | [diff] [blame] | 220 | TensorInfo(TensorShape(3U, 3U, 2U), 1, DataType::F32), |
| 221 | TensorInfo(TensorShape(3U, 3U, 2U), 1, DataType::F32), |
| 222 | TensorInfo(TensorShape(3U, 3U, 2U), 1, DataType::F32), |
| 223 | TensorInfo(TensorShape(3U, 3U, 2U), 1, DataType::F32), |
| 224 | TensorInfo(TensorShape(3U, 3U, 2U), 1, DataType::F32), |
| 225 | TensorInfo(TensorShape(3U, 3U, 16U), 1, DataType::F32), |
Usama Arif | 881f2de | 2019-04-12 10:29:17 +0100 | [diff] [blame] | 226 | TensorInfo(TensorShape(3U, 3U, 16U), 1, DataType::F32), |
Abe Mbise | 7784c83 | 2018-05-31 16:48:41 +0100 | [diff] [blame] | 227 | })), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 228 | make("BiasesInfo", { TensorInfo(TensorShape(2U), 1, DataType::F32), |
Abe Mbise | 7784c83 | 2018-05-31 16:48:41 +0100 | [diff] [blame] | 229 | TensorInfo(TensorShape(2U), 1, DataType::F32), |
| 230 | TensorInfo(TensorShape(2U), 1, DataType::F32), |
| 231 | TensorInfo(TensorShape(4U), 1, DataType::F32), |
| 232 | TensorInfo(TensorShape(2U, 2U), 1, DataType::F32), |
| 233 | TensorInfo(TensorShape(2U), 1, DataType::F32), |
| 234 | TensorInfo(TensorShape(16U), 1, DataType::F32), |
Usama Arif | 881f2de | 2019-04-12 10:29:17 +0100 | [diff] [blame] | 235 | TensorInfo(TensorShape(16U), 1, DataType::F32), |
Abe Mbise | 7784c83 | 2018-05-31 16:48:41 +0100 | [diff] [blame] | 236 | })), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 237 | make("OutputInfo", { TensorInfo(TensorShape(25U, 11U, 2U), 1, DataType::F32), |
Abe Mbise | 7784c83 | 2018-05-31 16:48:41 +0100 | [diff] [blame] | 238 | TensorInfo(TensorShape(25U, 11U, 2U), 1, DataType::F32), |
| 239 | TensorInfo(TensorShape(25U, 11U, 2U), 1, DataType::F32), |
| 240 | TensorInfo(TensorShape(25U, 11U, 2U), 1, DataType::F32), |
| 241 | TensorInfo(TensorShape(25U, 11U, 2U), 1, DataType::F32), |
| 242 | TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), |
| 243 | TensorInfo(TensorShape(25U, 11U, 16U), 1, DataType::F32), |
Usama Arif | 881f2de | 2019-04-12 10:29:17 +0100 | [diff] [blame] | 244 | TensorInfo(TensorShape(25U, 11U, 16U), 1, DataType::F32), |
Abe Mbise | 7784c83 | 2018-05-31 16:48:41 +0100 | [diff] [blame] | 245 | })), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 246 | make("ConvInfo", { PadStrideInfo(1, 1, 0, 0), |
Abe Mbise | 7784c83 | 2018-05-31 16:48:41 +0100 | [diff] [blame] | 247 | PadStrideInfo(1, 1, 0, 0), |
| 248 | PadStrideInfo(1, 1, 0, 0), |
| 249 | PadStrideInfo(1, 1, 0, 0), |
| 250 | PadStrideInfo(1, 1, 0, 0), |
| 251 | PadStrideInfo(1, 1, 0, 0), |
| 252 | PadStrideInfo(1, 1, 0, 0), |
Usama Arif | 881f2de | 2019-04-12 10:29:17 +0100 | [diff] [blame] | 253 | PadStrideInfo(1, 1, 0, 0), |
Abe Mbise | 7784c83 | 2018-05-31 16:48:41 +0100 | [diff] [blame] | 254 | })), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 255 | make("DepthMultiplier", { 1, |
Abe Mbise | 7784c83 | 2018-05-31 16:48:41 +0100 | [diff] [blame] | 256 | 1, |
| 257 | 3, |
| 258 | 1, |
| 259 | 1, |
| 260 | 1, |
| 261 | 2, |
Usama Arif | 881f2de | 2019-04-12 10:29:17 +0100 | [diff] [blame] | 262 | 2, |
Abe Mbise | 7784c83 | 2018-05-31 16:48:41 +0100 | [diff] [blame] | 263 | })), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 264 | make("Dilation", { Size2D(1U, 1U), |
Usama Arif | 881f2de | 2019-04-12 10:29:17 +0100 | [diff] [blame] | 265 | Size2D(1U, 1U), |
| 266 | Size2D(1U, 1U), |
| 267 | Size2D(1U, 1U), |
| 268 | Size2D(1U, 1U), |
| 269 | Size2D(1U, 1U), |
| 270 | Size2D(25U, 1U), |
| 271 | Size2D(0U, 1U), |
Usama Arif | 881f2de | 2019-04-12 10:29:17 +0100 | [diff] [blame] | 272 | })), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 273 | make("Expected", { false, false, false, false, false, false, false, false})), |
Usama Arif | 881f2de | 2019-04-12 10:29:17 +0100 | [diff] [blame] | 274 | input_info, weights_info, biases_info, output_info, conv_info, depth_multiplier,dilation, expected) |
Abe Mbise | 7784c83 | 2018-05-31 16:48:41 +0100 | [diff] [blame] | 275 | { |
Usama Arif | 881f2de | 2019-04-12 10:29:17 +0100 | [diff] [blame] | 276 | bool is_valid = bool(NEDepthwiseConvolutionLayer::validate(&input_info.clone()->set_is_resizable(false), &weights_info.clone()->set_is_resizable(false), &biases_info.clone()->set_is_resizable(false), &output_info.clone()->set_is_resizable(false), conv_info, depth_multiplier, ActivationLayerInfo(), dilation)); |
Abe Mbise | 7784c83 | 2018-05-31 16:48:41 +0100 | [diff] [blame] | 277 | ARM_COMPUTE_EXPECT(is_valid == expected, framework::LogLevel::ERRORS); |
| 278 | } |
| 279 | // clang-format on |
| 280 | // *INDENT-ON* |
Manuel Bottini | 05069f0 | 2019-09-26 17:18:26 +0100 | [diff] [blame] | 281 | template <typename T> |
| 282 | using NEDepthwiseConvolutionLayerFixture = DepthwiseConvolutionLayerValidationFixture<Tensor, Accessor, NEDepthwiseConvolutionLayer, T>; |
Manuel Bottini | ca62c6f | 2021-03-23 11:50:34 +0000 | [diff] [blame] | 283 | template <typename T> |
| 284 | using NEDepthwiseConvolutionLayerMixedDataLayoutFixture = DepthwiseConvolutionLayerValidationFixture<Tensor, Accessor, NEDepthwiseConvolutionLayer, T, true>; |
Milos Puzovic | a7077e9 | 2022-10-28 16:49:15 +0100 | [diff] [blame] | 285 | template <typename T> |
| 286 | using NEDepthwiseConvolutionLayerVariableWeightsFixture = DepthwiseConvolutionLayerValidationFixture<Tensor, Accessor, NEDepthwiseConvolutionLayer, T, false, false, true>; |
Abe Mbise | 7784c83 | 2018-05-31 16:48:41 +0100 | [diff] [blame] | 287 | |
Dmitry Savenko | d7295b7 | 2017-11-20 22:00:08 +0700 | [diff] [blame] | 288 | TEST_SUITE(Float) |
Michalis Spyrou | 7362f0d | 2017-10-18 17:58:22 +0100 | [diff] [blame] | 289 | TEST_SUITE(F32) |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 290 | |
| 291 | FIXTURE_DATA_TEST_CASE_NEW(RunActivations, NEDepthwiseConvolutionLayerFixture<float>, framework::DatasetMode::NIGHTLY, |
| 292 | combine( |
| 293 | make("In", TensorShape(33U, 27U, 11U, 3U)), |
| 294 | make("Weights", Size2D(3U, 4U)), |
| 295 | make("Info", PadStrideInfo(1, 2, 0, 1)), |
| 296 | make("Dilation", Size2D(2U, 2U)), |
| 297 | make("DepthMultiplier", { 5 }), |
| 298 | make("DataType", DataType::F32), |
| 299 | make("DataLayout", { DataLayout::NHWC, DataLayout::NCHW }), |
| 300 | ActivationFunctionsDatasetNightly)) |
| 301 | { |
| 302 | validate(Accessor(_target), _reference, tolerance_f32); |
| 303 | } |
| 304 | |
Michalis Spyrou | b7b3153 | 2017-11-23 12:10:21 +0000 | [diff] [blame] | 305 | TEST_SUITE(Generic) |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 306 | FIXTURE_DATA_TEST_CASE_NEW(RunSmall, NEDepthwiseConvolutionLayerFixture<float>, framework::DatasetMode::PRECOMMIT, combine(combine(combine(combine(datasets::SmallDepthwiseConvolutionLayerDataset(), |
| 307 | depth_multipliers), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 308 | make("DataType", DataType::F32)), |
| 309 | make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })), |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 310 | ActivationFunctionsDataset)) |
Michalis Spyrou | b7b3153 | 2017-11-23 12:10:21 +0000 | [diff] [blame] | 311 | { |
| 312 | validate(Accessor(_target), _reference, tolerance_f32); |
| 313 | } |
Manuel Bottini | ca62c6f | 2021-03-23 11:50:34 +0000 | [diff] [blame] | 314 | FIXTURE_DATA_TEST_CASE_NEW(RunMixedDataLayout, NEDepthwiseConvolutionLayerMixedDataLayoutFixture<float>, framework::DatasetMode::PRECOMMIT, combine(combine(combine(combine(datasets::SmallDepthwiseConvolutionLayerDataset(), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 315 | make("DepthMultiplier", { 2 })), |
| 316 | make("DataType", DataType::F32)), |
| 317 | make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })), |
| 318 | make("ActivationInfo", ActivationLayerInfo()))) |
Manuel Bottini | ca62c6f | 2021-03-23 11:50:34 +0000 | [diff] [blame] | 319 | { |
| 320 | validate(Accessor(_target), _reference, tolerance_f32); |
| 321 | } |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 322 | FIXTURE_DATA_TEST_CASE_NEW(RunLarge, NEDepthwiseConvolutionLayerFixture<float>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(datasets::LargeDepthwiseConvolutionLayerDataset(), |
| 323 | large_depth_multipliers), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 324 | make("DataType", DataType::F32)), |
| 325 | make("DataLayout", { DataLayout::NHWC })), |
| 326 | make("ActivationInfo", { ActivationLayerInfo() }))) |
Michalis Spyrou | b7b3153 | 2017-11-23 12:10:21 +0000 | [diff] [blame] | 327 | { |
| 328 | validate(Accessor(_target), _reference, tolerance_f32); |
| 329 | } |
Usama Arif | 881f2de | 2019-04-12 10:29:17 +0100 | [diff] [blame] | 330 | TEST_SUITE(Dilation) |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 331 | FIXTURE_DATA_TEST_CASE_NEW(RunSmall, NEDepthwiseConvolutionLayerFixture<float>, framework::DatasetMode::PRECOMMIT, |
| 332 | combine(combine(combine(combine(datasets::SmallDepthwiseDilatedConvolutionLayerDataset(), |
| 333 | depth_multipliers), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 334 | make("DataType", |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 335 | DataType::F32)), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 336 | make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })), |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 337 | ActivationFunctionsDataset)) |
Usama Arif | 881f2de | 2019-04-12 10:29:17 +0100 | [diff] [blame] | 338 | { |
| 339 | validate(Accessor(_target), _reference, tolerance_f32); |
| 340 | } |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 341 | FIXTURE_DATA_TEST_CASE_NEW(RunLarge, NEDepthwiseConvolutionLayerFixture<float>, framework::DatasetMode::NIGHTLY, |
| 342 | combine(combine(combine(combine(datasets::LargeDepthwiseDilatedConvolutionLayerDataset(), |
| 343 | large_depth_multipliers), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 344 | make("DataType", |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 345 | DataType::F32)), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 346 | make("DataLayout", { DataLayout::NHWC })), |
| 347 | make("ActivationInfo", { ActivationLayerInfo() }))) |
Usama Arif | 881f2de | 2019-04-12 10:29:17 +0100 | [diff] [blame] | 348 | { |
| 349 | validate(Accessor(_target), _reference, tolerance_f32); |
| 350 | } |
| 351 | TEST_SUITE_END() // Dilation |
Georgios Pinitas | 20c246a | 2018-09-12 16:45:53 +0100 | [diff] [blame] | 352 | TEST_SUITE_END() // Generic |
Michalis Spyrou | b7b3153 | 2017-11-23 12:10:21 +0000 | [diff] [blame] | 353 | |
Georgios Pinitas | 4c75851 | 2019-07-10 19:49:11 +0100 | [diff] [blame] | 354 | TEST_SUITE(W3x3) |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 355 | FIXTURE_DATA_TEST_CASE_NEW(RunSmall, NEDepthwiseConvolutionLayerFixture<float>, framework::DatasetMode::PRECOMMIT, combine(combine(combine(combine(datasets::SmallDepthwiseConvolutionLayerDataset3x3(), |
| 356 | depth_multipliers), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 357 | make("DataType", |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 358 | DataType::F32)), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 359 | make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })), |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 360 | ActivationFunctionsDataset)) |
Michalis Spyrou | 7362f0d | 2017-10-18 17:58:22 +0100 | [diff] [blame] | 361 | { |
| 362 | validate(Accessor(_target), _reference, tolerance_f32); |
| 363 | } |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 364 | FIXTURE_DATA_TEST_CASE_NEW(RunLarge, NEDepthwiseConvolutionLayerFixture<float>, framework::DatasetMode::NIGHTLY, |
| 365 | combine(combine(combine(combine(datasets::LargeDepthwiseConvolutionLayerDataset3x3(), |
| 366 | large_depth_multipliers), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 367 | make("DataType", |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 368 | DataType::F32)), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 369 | make("DataLayout", { DataLayout::NHWC })), |
| 370 | make("ActivationInfo", { ActivationLayerInfo() }))) |
Michalis Spyrou | 7362f0d | 2017-10-18 17:58:22 +0100 | [diff] [blame] | 371 | { |
| 372 | validate(Accessor(_target), _reference, tolerance_f32); |
| 373 | } |
Usama Arif | 881f2de | 2019-04-12 10:29:17 +0100 | [diff] [blame] | 374 | TEST_SUITE(Dilation) |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 375 | FIXTURE_DATA_TEST_CASE_NEW(RunSmall, NEDepthwiseConvolutionLayerFixture<float>, framework::DatasetMode::PRECOMMIT, |
| 376 | combine(combine(combine(combine(datasets::SmallDepthwiseDilatedConvolutionLayerDataset3x3(), |
| 377 | depth_multipliers), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 378 | make("DataType", |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 379 | DataType::F32)), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 380 | make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })), |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 381 | ActivationFunctionsDataset)) |
Usama Arif | 881f2de | 2019-04-12 10:29:17 +0100 | [diff] [blame] | 382 | { |
| 383 | validate(Accessor(_target), _reference, tolerance_f32); |
| 384 | } |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 385 | FIXTURE_DATA_TEST_CASE_NEW(RunLarge, NEDepthwiseConvolutionLayerFixture<float>, framework::DatasetMode::NIGHTLY, |
| 386 | combine(combine(combine(combine(datasets::LargeDepthwiseDilatedConvolutionLayerDataset3x3(), |
| 387 | large_depth_multipliers), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 388 | make("DataType", |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 389 | DataType::F32)), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 390 | make("DataLayout", { DataLayout::NHWC })), |
| 391 | make("ActivationInfo", { ActivationLayerInfo() }))) |
Usama Arif | 881f2de | 2019-04-12 10:29:17 +0100 | [diff] [blame] | 392 | { |
| 393 | validate(Accessor(_target), _reference, tolerance_f32); |
| 394 | } |
| 395 | |
| 396 | TEST_SUITE_END() // Dilation |
Georgios Pinitas | 4c75851 | 2019-07-10 19:49:11 +0100 | [diff] [blame] | 397 | TEST_SUITE_END() // W3x3 |
Usama Arif | 881f2de | 2019-04-12 10:29:17 +0100 | [diff] [blame] | 398 | |
Georgios Pinitas | 4c75851 | 2019-07-10 19:49:11 +0100 | [diff] [blame] | 399 | TEST_SUITE(Optimized) |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 400 | FIXTURE_DATA_TEST_CASE_NEW(RunSmall3x3, NEDepthwiseConvolutionLayerFixture<float>, framework::DatasetMode::PRECOMMIT, |
| 401 | combine(combine(combine(combine(datasets::SmallOptimizedDepthwiseConvolutionLayerDataset3x3(), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 402 | make("DepthMultiplier", 1)), |
| 403 | make("DataType", |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 404 | DataType::F32)), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 405 | make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })), |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 406 | ActivationFunctionsDataset)) |
Michalis Spyrou | aeebe4a | 2019-01-09 14:21:03 +0000 | [diff] [blame] | 407 | { |
| 408 | validate(Accessor(_target), _reference, tolerance_f32); |
| 409 | } |
Milos Puzovic | a7077e9 | 2022-10-28 16:49:15 +0100 | [diff] [blame] | 410 | FIXTURE_DATA_TEST_CASE_NEW(RunVariableWeightsSmall3x3, NEDepthwiseConvolutionLayerVariableWeightsFixture<float>, framework::DatasetMode::PRECOMMIT, |
| 411 | combine(combine(combine(combine(datasets::SmallOptimizedDepthwiseConvolutionLayerDataset3x3(), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 412 | make("DepthMultiplier", 1)), |
| 413 | make("DataType", |
Milos Puzovic | a7077e9 | 2022-10-28 16:49:15 +0100 | [diff] [blame] | 414 | DataType::F32)), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 415 | make("DataLayout", { DataLayout::NHWC })), |
Milos Puzovic | a7077e9 | 2022-10-28 16:49:15 +0100 | [diff] [blame] | 416 | ActivationFunctionsDataset)) |
| 417 | { |
| 418 | validate(Accessor(_target), _reference, tolerance_f32); |
| 419 | } |
Manuel Bottini | ca62c6f | 2021-03-23 11:50:34 +0000 | [diff] [blame] | 420 | FIXTURE_DATA_TEST_CASE_NEW(RunMixedDataLayout3x3, NEDepthwiseConvolutionLayerMixedDataLayoutFixture<float>, framework::DatasetMode::PRECOMMIT, |
| 421 | combine(combine(combine(combine(datasets::SmallOptimizedDepthwiseConvolutionLayerDataset3x3(), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 422 | make("DepthMultiplier", 1)), |
| 423 | make("DataType", DataType::F32)), |
| 424 | make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })), |
| 425 | make("ActivationInfo", ActivationLayerInfo()))) |
Manuel Bottini | ca62c6f | 2021-03-23 11:50:34 +0000 | [diff] [blame] | 426 | { |
| 427 | validate(Accessor(_target), _reference, tolerance_f32); |
| 428 | } |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 429 | FIXTURE_DATA_TEST_CASE_NEW(RunSmall5x5, NEDepthwiseConvolutionLayerFixture<float>, framework::DatasetMode::PRECOMMIT, |
| 430 | combine(combine(combine(combine(datasets::SmallOptimizedDepthwiseConvolutionLayerDataset5x5(), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 431 | make("DepthMultiplier", 1)), |
| 432 | make("DataType", |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 433 | DataType::F32)), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 434 | make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })), |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 435 | ActivationFunctionsDataset)) |
Georgios Pinitas | 4c75851 | 2019-07-10 19:49:11 +0100 | [diff] [blame] | 436 | { |
| 437 | validate(Accessor(_target), _reference, tolerance_f32); |
| 438 | } |
Milos Puzovic | a7077e9 | 2022-10-28 16:49:15 +0100 | [diff] [blame] | 439 | FIXTURE_DATA_TEST_CASE_NEW(RunVariableWeightsSmall5x5, NEDepthwiseConvolutionLayerVariableWeightsFixture<float>, framework::DatasetMode::PRECOMMIT, |
| 440 | combine(combine(combine(combine(datasets::SmallOptimizedDepthwiseConvolutionLayerDataset5x5(), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 441 | make("DepthMultiplier", 1)), |
| 442 | make("DataType", |
Milos Puzovic | a7077e9 | 2022-10-28 16:49:15 +0100 | [diff] [blame] | 443 | DataType::F32)), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 444 | make("DataLayout", { DataLayout::NHWC })), |
Milos Puzovic | a7077e9 | 2022-10-28 16:49:15 +0100 | [diff] [blame] | 445 | ActivationFunctionsDataset)) |
| 446 | { |
| 447 | validate(Accessor(_target), _reference, tolerance_f32); |
| 448 | } |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 449 | FIXTURE_DATA_TEST_CASE_NEW(RunLarge3x3, NEDepthwiseConvolutionLayerFixture<float>, framework::DatasetMode::NIGHTLY, |
| 450 | combine(combine(combine(combine(datasets::LargeOptimizedDepthwiseConvolutionLayerDataset3x3(), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 451 | make("DepthMultiplier", 1)), |
| 452 | make("DataType", |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 453 | DataType::F32)), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 454 | make("DataLayout", { DataLayout::NHWC })), |
| 455 | make("ActivationInfo", { ActivationLayerInfo() }))) |
Georgios Pinitas | 4074c99 | 2018-01-30 18:13:46 +0000 | [diff] [blame] | 456 | { |
| 457 | validate(Accessor(_target), _reference, tolerance_f32); |
| 458 | } |
Milos Puzovic | a7077e9 | 2022-10-28 16:49:15 +0100 | [diff] [blame] | 459 | FIXTURE_DATA_TEST_CASE_NEW(RunVariableWeightsLarge3x3, NEDepthwiseConvolutionLayerVariableWeightsFixture<float>, framework::DatasetMode::NIGHTLY, |
| 460 | combine(combine(combine(combine(datasets::LargeOptimizedDepthwiseConvolutionLayerDataset3x3(), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 461 | make("DepthMultiplier", 1)), |
| 462 | make("DataType", |
Milos Puzovic | a7077e9 | 2022-10-28 16:49:15 +0100 | [diff] [blame] | 463 | DataType::F32)), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 464 | make("DataLayout", { DataLayout::NHWC })), |
| 465 | make("ActivationInfo", { ActivationLayerInfo() }))) |
Milos Puzovic | a7077e9 | 2022-10-28 16:49:15 +0100 | [diff] [blame] | 466 | { |
| 467 | validate(Accessor(_target), _reference, tolerance_f32); |
| 468 | } |
Georgios Pinitas | 4c75851 | 2019-07-10 19:49:11 +0100 | [diff] [blame] | 469 | TEST_SUITE_END() // Optimized |
Georgios Pinitas | 20c246a | 2018-09-12 16:45:53 +0100 | [diff] [blame] | 470 | TEST_SUITE_END() // F32 |
Pablo Tello | 941cd70 | 2017-12-12 14:35:00 +0000 | [diff] [blame] | 471 | |
Georgios Pinitas | 20c246a | 2018-09-12 16:45:53 +0100 | [diff] [blame] | 472 | #ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC |
| 473 | TEST_SUITE(F16) |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 474 | |
| 475 | FIXTURE_DATA_TEST_CASE_NEW(RunActivations, NEDepthwiseConvolutionLayerFixture<half>, framework::DatasetMode::NIGHTLY, |
| 476 | combine( |
| 477 | make("In", TensorShape(33U, 27U, 11U, 3U)), |
| 478 | make("Weights", Size2D(3U, 4U)), |
| 479 | make("Info", PadStrideInfo(1, 2, 0, 1)), |
| 480 | make("Dilation", Size2D(2U, 2U)), |
| 481 | make("DepthMultiplier", { 5 }), |
| 482 | make("DataType", DataType::F16), |
| 483 | make("DataLayout", { DataLayout::NHWC, DataLayout::NCHW }), |
| 484 | ActivationFunctionsDatasetNightly)) |
| 485 | { |
| 486 | validate(Accessor(_target), _reference, tolerance_f16, tolerance_num); |
| 487 | } |
| 488 | |
Georgios Pinitas | 8cffcd6 | 2018-11-16 17:11:50 +0000 | [diff] [blame] | 489 | TEST_SUITE(Generic) |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 490 | FIXTURE_DATA_TEST_CASE_NEW(RunSmall, NEDepthwiseConvolutionLayerFixture<half>, framework::DatasetMode::PRECOMMIT, combine(combine(combine(combine(datasets::SmallDepthwiseConvolutionLayerDataset(), |
| 491 | depth_multipliers), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 492 | make("DataType", |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 493 | DataType::F16)), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 494 | make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })), |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 495 | ActivationFunctionsDataset)) |
Georgios Pinitas | 8cffcd6 | 2018-11-16 17:11:50 +0000 | [diff] [blame] | 496 | { |
| 497 | validate(Accessor(_target), _reference, tolerance_f16, tolerance_num); |
| 498 | } |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 499 | FIXTURE_DATA_TEST_CASE_NEW(RunLarge, NEDepthwiseConvolutionLayerFixture<half>, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(datasets::LargeDepthwiseConvolutionLayerDataset(), |
| 500 | large_depth_multipliers), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 501 | make("DataType", |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 502 | DataType::F16)), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 503 | make("DataLayout", { DataLayout::NHWC })), |
| 504 | make("ActivationInfo", { ActivationLayerInfo() }))) |
Georgios Pinitas | 8cffcd6 | 2018-11-16 17:11:50 +0000 | [diff] [blame] | 505 | { |
| 506 | validate(Accessor(_target), _reference, tolerance_f16, tolerance_num); |
| 507 | } |
Usama Arif | 881f2de | 2019-04-12 10:29:17 +0100 | [diff] [blame] | 508 | |
| 509 | TEST_SUITE(Dilation) |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 510 | FIXTURE_DATA_TEST_CASE_NEW(RunSmall, NEDepthwiseConvolutionLayerFixture<half>, framework::DatasetMode::PRECOMMIT, |
| 511 | combine(combine(combine(combine(datasets::SmallDepthwiseDilatedConvolutionLayerDataset(), |
| 512 | depth_multipliers), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 513 | make("DataType", DataType::F16)), |
| 514 | make("DataLayout", { DataLayout::NHWC })), |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 515 | ActivationFunctionsDataset)) |
Usama Arif | 881f2de | 2019-04-12 10:29:17 +0100 | [diff] [blame] | 516 | { |
| 517 | validate(Accessor(_target), _reference, tolerance_f16, tolerance_num); |
| 518 | } |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 519 | FIXTURE_DATA_TEST_CASE_NEW(RunLarge, NEDepthwiseConvolutionLayerFixture<half>, framework::DatasetMode::NIGHTLY, |
| 520 | combine(combine(combine(combine(datasets::LargeDepthwiseDilatedConvolutionLayerDataset(), |
| 521 | large_depth_multipliers), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 522 | make("DataType", DataType::F16)), |
| 523 | make("DataLayout", { DataLayout::NHWC })), |
| 524 | make("ActivationInfo", { ActivationLayerInfo() }))) |
Usama Arif | 881f2de | 2019-04-12 10:29:17 +0100 | [diff] [blame] | 525 | { |
| 526 | validate(Accessor(_target), _reference, tolerance_f16, tolerance_num); |
| 527 | } |
| 528 | TEST_SUITE_END() // Dilation |
| 529 | |
Georgios Pinitas | 8cffcd6 | 2018-11-16 17:11:50 +0000 | [diff] [blame] | 530 | TEST_SUITE_END() // Generic |
Georgios Pinitas | 20c246a | 2018-09-12 16:45:53 +0100 | [diff] [blame] | 531 | template <typename T> |
Manuel Bottini | 05069f0 | 2019-09-26 17:18:26 +0100 | [diff] [blame] | 532 | using NEDepthwiseConvolutionLayerFixture = DepthwiseConvolutionLayerValidationFixture<Tensor, Accessor, NEDepthwiseConvolutionLayer, T>; |
Georgios Pinitas | 4c75851 | 2019-07-10 19:49:11 +0100 | [diff] [blame] | 533 | TEST_SUITE(W3x3) |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 534 | FIXTURE_DATA_TEST_CASE_NEW(RunSmall, NEDepthwiseConvolutionLayerFixture<half>, framework::DatasetMode::PRECOMMIT, combine(combine(combine(combine(datasets::SmallDepthwiseConvolutionLayerDataset3x3(), |
| 535 | depth_multipliers), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 536 | make("DataType", |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 537 | DataType::F16)), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 538 | make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })), |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 539 | ActivationFunctionsDataset)) |
Georgios Pinitas | 20c246a | 2018-09-12 16:45:53 +0100 | [diff] [blame] | 540 | { |
| 541 | validate(Accessor(_target), _reference, tolerance_f16); |
| 542 | } |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 543 | FIXTURE_DATA_TEST_CASE_NEW(RunLarge, NEDepthwiseConvolutionLayerFixture<half>, framework::DatasetMode::NIGHTLY, |
| 544 | combine(combine(combine(combine(datasets::LargeDepthwiseConvolutionLayerDataset3x3(), |
| 545 | large_depth_multipliers), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 546 | make("DataType", |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 547 | DataType::F16)), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 548 | make("DataLayout", { DataLayout::NHWC })), |
| 549 | make("ActivationInfo", { ActivationLayerInfo() }))) |
Georgios Pinitas | 20c246a | 2018-09-12 16:45:53 +0100 | [diff] [blame] | 550 | { |
| 551 | validate(Accessor(_target), _reference, tolerance_f16); |
| 552 | } |
Usama Arif | 881f2de | 2019-04-12 10:29:17 +0100 | [diff] [blame] | 553 | |
| 554 | TEST_SUITE(Dilation) |
| 555 | |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 556 | FIXTURE_DATA_TEST_CASE_NEW(RunSmall, NEDepthwiseConvolutionLayerFixture<half>, framework::DatasetMode::PRECOMMIT, |
| 557 | combine(combine(combine(combine(datasets::SmallDepthwiseDilatedConvolutionLayerDataset3x3(), |
| 558 | depth_multipliers), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 559 | make("DataType", |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 560 | DataType::F16)), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 561 | make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })), |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 562 | ActivationFunctionsDataset)) |
Usama Arif | 881f2de | 2019-04-12 10:29:17 +0100 | [diff] [blame] | 563 | { |
| 564 | validate(Accessor(_target), _reference, tolerance_f16); |
| 565 | } |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 566 | FIXTURE_DATA_TEST_CASE_NEW(RunLarge, NEDepthwiseConvolutionLayerFixture<half>, framework::DatasetMode::NIGHTLY, |
| 567 | combine(combine(combine(combine(datasets::LargeDepthwiseDilatedConvolutionLayerDataset3x3(), |
| 568 | large_depth_multipliers), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 569 | make("DataType", |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 570 | DataType::F16)), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 571 | make("DataLayout", { DataLayout::NHWC })), |
| 572 | make("ActivationInfo", { ActivationLayerInfo() }))) |
Usama Arif | 881f2de | 2019-04-12 10:29:17 +0100 | [diff] [blame] | 573 | { |
| 574 | validate(Accessor(_target), _reference, tolerance_f16); |
| 575 | } |
| 576 | |
| 577 | TEST_SUITE_END() // Dilation |
Georgios Pinitas | 4c75851 | 2019-07-10 19:49:11 +0100 | [diff] [blame] | 578 | TEST_SUITE_END() // W3x3 |
Usama Arif | 881f2de | 2019-04-12 10:29:17 +0100 | [diff] [blame] | 579 | |
Georgios Pinitas | 4c75851 | 2019-07-10 19:49:11 +0100 | [diff] [blame] | 580 | TEST_SUITE(Optimized) |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 581 | FIXTURE_DATA_TEST_CASE_NEW(RunSmallW3x3, NEDepthwiseConvolutionLayerFixture<half>, framework::DatasetMode::PRECOMMIT, |
| 582 | combine(combine(combine(combine(datasets::SmallOptimizedDepthwiseConvolutionLayerDataset3x3(), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 583 | make("DepthMultiplier", 1)), |
| 584 | make("DataType", |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 585 | DataType::F16)), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 586 | make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })), |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 587 | ActivationFunctionsDataset)) |
Michalis Spyrou | aeebe4a | 2019-01-09 14:21:03 +0000 | [diff] [blame] | 588 | { |
| 589 | validate(Accessor(_target), _reference, tolerance_f16); |
| 590 | } |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 591 | FIXTURE_DATA_TEST_CASE_NEW(RunSmallW5x5, NEDepthwiseConvolutionLayerFixture<half>, framework::DatasetMode::PRECOMMIT, |
| 592 | combine(combine(combine(combine(datasets::SmallOptimizedDepthwiseConvolutionLayerDataset5x5(), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 593 | make("DepthMultiplier", 1)), |
| 594 | make("DataType", |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 595 | DataType::F16)), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 596 | make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })), |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 597 | ActivationFunctionsDataset)) |
Georgios Pinitas | 4c75851 | 2019-07-10 19:49:11 +0100 | [diff] [blame] | 598 | { |
| 599 | validate(Accessor(_target), _reference, tolerance_f16); |
| 600 | } |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 601 | FIXTURE_DATA_TEST_CASE_NEW(RunLargeW3x3, NEDepthwiseConvolutionLayerFixture<half>, framework::DatasetMode::NIGHTLY, |
| 602 | combine(combine(combine(combine(datasets::LargeOptimizedDepthwiseConvolutionLayerDataset3x3(), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 603 | make("DepthMultiplier", 1)), |
| 604 | make("DataType", |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 605 | DataType::F16)), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 606 | make("DataLayout", { DataLayout::NHWC })), |
| 607 | make("ActivationInfo", { ActivationLayerInfo() }))) |
Georgios Pinitas | 20c246a | 2018-09-12 16:45:53 +0100 | [diff] [blame] | 608 | { |
| 609 | validate(Accessor(_target), _reference, tolerance_f16); |
| 610 | } |
Georgios Pinitas | 4c75851 | 2019-07-10 19:49:11 +0100 | [diff] [blame] | 611 | TEST_SUITE_END() // Optimized |
Georgios Pinitas | 20c246a | 2018-09-12 16:45:53 +0100 | [diff] [blame] | 612 | TEST_SUITE_END() // FP16 |
| 613 | #endif // __ARM_FEATURE_FP16_VECTOR_ARITHMETIC |
| 614 | |
| 615 | TEST_SUITE_END() // Float |
Michalis Spyrou | 7362f0d | 2017-10-18 17:58:22 +0100 | [diff] [blame] | 616 | |
Georgios Pinitas | f72f936 | 2018-01-12 16:29:45 +0000 | [diff] [blame] | 617 | template <typename T> |
Giorgio Arena | d93e263 | 2019-10-15 11:09:33 +0100 | [diff] [blame] | 618 | using NEDepthwiseConvolutionLayerQuantizedFixture = DepthwiseConvolutionLayerValidationQuantizedFixture<Tensor, Accessor, NEDepthwiseConvolutionLayer, T>; |
Manuel Bottini | ca62c6f | 2021-03-23 11:50:34 +0000 | [diff] [blame] | 619 | template <typename T> |
| 620 | using NEDepthwiseConvolutionLayerQuantizedMixedDataLayoutFixture = DepthwiseConvolutionLayerValidationQuantizedFixture<Tensor, Accessor, NEDepthwiseConvolutionLayer, T, true>; |
Giorgio Arena | d93e263 | 2019-10-15 11:09:33 +0100 | [diff] [blame] | 621 | using NEDepthwiseConvolutionLayerQuantizedSymmetricPerChannelFixture = DepthwiseConvolutionLayerValidationQuantizedPerChannelFixture<Tensor, Accessor, NEDepthwiseConvolutionLayer, uint8_t, int8_t>; |
Georgios Pinitas | f72f936 | 2018-01-12 16:29:45 +0000 | [diff] [blame] | 622 | |
| 623 | TEST_SUITE(Quantized) |
| 624 | TEST_SUITE(QASYMM8) |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 625 | |
| 626 | FIXTURE_DATA_TEST_CASE_NEW(RunActivations, NEDepthwiseConvolutionLayerQuantizedFixture<uint8_t>, framework::DatasetMode::NIGHTLY, |
| 627 | combine( |
| 628 | make("In", TensorShape(33U, 27U, 11U, 3U)), |
| 629 | make("Weights", Size2D(3U, 4U)), |
| 630 | make("Info", PadStrideInfo(1, 2, 0, 1)), |
| 631 | make("Dilation", Size2D(2U, 2U)), |
| 632 | make("DepthMultiplier", { 5 }), |
| 633 | make("DataType", DataType::QASYMM8), |
| 634 | make("SrcQuantizationInfo", { QuantizationInfo(0.3f, 10) }), |
| 635 | make("DstQuantizationInfo", { QuantizationInfo(0.05f, 4) }), |
| 636 | make("DataLayout", { DataLayout::NHWC, DataLayout::NCHW }), |
| 637 | ActivationFunctionsQuantizedDataset)) |
| 638 | { |
| 639 | validate(Accessor(_target), _reference, tolerance_qasymm8); |
| 640 | } |
| 641 | |
Georgios Pinitas | d05dce4 | 2018-01-22 16:29:17 +0000 | [diff] [blame] | 642 | TEST_SUITE(Generic) |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 643 | FIXTURE_DATA_TEST_CASE_NEW(RunSmall, NEDepthwiseConvolutionLayerQuantizedFixture<uint8_t>, framework::DatasetMode::PRECOMMIT, |
Omar Al Khatib | 0cba93f | 2024-02-01 14:42:37 +0000 | [diff] [blame^] | 644 | combine(datasets::SmallDepthwiseConvolutionLayerDataset(), |
| 645 | depth_multipliers, |
| 646 | make("DataType", DataType::QASYMM8), |
| 647 | IgnoredQuantizationInfo, |
| 648 | IgnoredQuantizationInfo, |
| 649 | make("DataLayout", { DataLayout::NHWC }), |
| 650 | NoActivation)) |
| 651 | { |
| 652 | validate(Accessor(_target), _reference, tolerance_qasymm8); |
| 653 | } |
| 654 | FIXTURE_DATA_TEST_CASE_NEW(RunSmallWithActivation, NEDepthwiseConvolutionLayerQuantizedFixture<uint8_t>, framework::DatasetMode::PRECOMMIT, |
| 655 | combine(datasets::SmallDepthwiseConvolutionLayerDataset(), |
| 656 | depth_multipliers, |
| 657 | make("DataType", DataType::QASYMM8), |
| 658 | input_qinfo_dataset, |
| 659 | make("DstQuantizationInfo", { QuantizationInfo(0.5f, 4) }), |
| 660 | make("DataLayout", { DataLayout::NHWC }), |
| 661 | ActivationFunctionsQuantizedSmallDataset)) |
Georgios Pinitas | f72f936 | 2018-01-12 16:29:45 +0000 | [diff] [blame] | 662 | { |
| 663 | validate(Accessor(_target), _reference, tolerance_qasymm8); |
| 664 | } |
Manuel Bottini | ca62c6f | 2021-03-23 11:50:34 +0000 | [diff] [blame] | 665 | FIXTURE_DATA_TEST_CASE_NEW(RunMixedDataLayout, NEDepthwiseConvolutionLayerQuantizedMixedDataLayoutFixture<uint8_t>, framework::DatasetMode::PRECOMMIT, |
Omar Al Khatib | 0cba93f | 2024-02-01 14:42:37 +0000 | [diff] [blame^] | 666 | combine(datasets::SmallDepthwiseConvolutionLayerDataset(), |
| 667 | make("DepthMultiplier", { 2 }), |
| 668 | make("DataType", DataType::QASYMM8), |
| 669 | IgnoredQuantizationInfo, |
| 670 | IgnoredQuantizationInfo, |
| 671 | make("DataLayout", { DataLayout::NHWC }), |
| 672 | NoActivation)) |
Manuel Bottini | ca62c6f | 2021-03-23 11:50:34 +0000 | [diff] [blame] | 673 | { |
| 674 | validate(Accessor(_target), _reference, tolerance_qasymm8); |
| 675 | } |
Usama Arif | 881f2de | 2019-04-12 10:29:17 +0100 | [diff] [blame] | 676 | TEST_SUITE(Dilation) |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 677 | FIXTURE_DATA_TEST_CASE_NEW(RunSmall, NEDepthwiseConvolutionLayerQuantizedFixture<uint8_t>, framework::DatasetMode::PRECOMMIT, |
Omar Al Khatib | 0cba93f | 2024-02-01 14:42:37 +0000 | [diff] [blame^] | 678 | combine(datasets::SmallDepthwiseDilatedConvolutionLayerDataset(), |
| 679 | depth_multipliers, |
| 680 | make("DataType", DataType::QASYMM8), |
| 681 | IgnoredQuantizationInfo, |
| 682 | IgnoredQuantizationInfo, |
| 683 | make("DataLayout", { DataLayout::NHWC }), |
| 684 | NoActivation)) |
| 685 | { |
| 686 | validate(Accessor(_target), _reference, tolerance_qasymm8); |
| 687 | } |
| 688 | FIXTURE_DATA_TEST_CASE_NEW(RunSmallWithActivation, NEDepthwiseConvolutionLayerQuantizedFixture<uint8_t>, framework::DatasetMode::PRECOMMIT, |
| 689 | combine(datasets::SmallDepthwiseDilatedConvolutionLayerDataset(), |
| 690 | depth_multipliers, |
| 691 | make("DataType", DataType::QASYMM8), |
| 692 | input_qinfo_dataset, |
| 693 | make("DstQuantizationInfo", { QuantizationInfo(0.8f, 1) }), |
| 694 | make("DataLayout", { DataLayout::NHWC }), |
| 695 | ActivationFunctionsDataset)) |
Usama Arif | 881f2de | 2019-04-12 10:29:17 +0100 | [diff] [blame] | 696 | { |
| 697 | validate(Accessor(_target), _reference, tolerance_qasymm8); |
| 698 | } |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 699 | FIXTURE_DATA_TEST_CASE_NEW(RunLarge, NEDepthwiseConvolutionLayerQuantizedFixture<uint8_t>, framework::DatasetMode::NIGHTLY, |
Omar Al Khatib | 0cba93f | 2024-02-01 14:42:37 +0000 | [diff] [blame^] | 700 | combine(datasets::LargeDepthwiseDilatedConvolutionLayerDataset(), |
| 701 | large_depth_multipliers, |
| 702 | make("DataType", DataType::QASYMM8), |
| 703 | IgnoredQuantizationInfo, |
| 704 | IgnoredQuantizationInfo, |
| 705 | make("DataLayout", { DataLayout::NHWC }), |
| 706 | NoActivation)) |
Usama Arif | 881f2de | 2019-04-12 10:29:17 +0100 | [diff] [blame] | 707 | { |
| 708 | validate(Accessor(_target), _reference, tolerance_qasymm8); |
| 709 | } |
Georgios Pinitas | 4c75851 | 2019-07-10 19:49:11 +0100 | [diff] [blame] | 710 | TEST_SUITE_END() // Dilation |
Michalis Spyrou | aeebe4a | 2019-01-09 14:21:03 +0000 | [diff] [blame] | 711 | TEST_SUITE_END() // Generic |
Giorgio Arena | 7657224 | 2018-04-04 17:44:26 +0100 | [diff] [blame] | 712 | TEST_SUITE(W3x3) |
Manuel Bottini | ca62c6f | 2021-03-23 11:50:34 +0000 | [diff] [blame] | 713 | FIXTURE_DATA_TEST_CASE_NEW(RunSmall, NEDepthwiseConvolutionLayerQuantizedFixture<uint8_t>, framework::DatasetMode::PRECOMMIT, |
Omar Al Khatib | 0cba93f | 2024-02-01 14:42:37 +0000 | [diff] [blame^] | 714 | combine(datasets::SmallDepthwiseConvolutionLayerDataset3x3(), depth_multipliers, |
| 715 | make("DataType", DataType::QASYMM8), |
| 716 | IgnoredQuantizationInfo, |
| 717 | IgnoredQuantizationInfo, |
| 718 | make("DataLayout", { DataLayout::NHWC }), |
| 719 | NoActivation)) |
| 720 | { |
| 721 | validate(Accessor(_target), _reference, tolerance_qasymm8); |
| 722 | } |
| 723 | FIXTURE_DATA_TEST_CASE_NEW(RunSmallWithActivation, NEDepthwiseConvolutionLayerQuantizedFixture<uint8_t>, framework::DatasetMode::PRECOMMIT, |
| 724 | combine(datasets::SmallDepthwiseConvolutionLayerDataset3x3(), depth_multipliers, |
| 725 | make("DataType", DataType::QASYMM8), |
| 726 | input_qinfo_dataset, |
| 727 | make("DstQuantizationInfo", { QuantizationInfo(0.5f, 10) }), |
| 728 | make("DataLayout", { DataLayout::NHWC }), |
| 729 | ActivationFunctionsQuantizedSmallDataset)) |
Giorgio Arena | 7657224 | 2018-04-04 17:44:26 +0100 | [diff] [blame] | 730 | { |
| 731 | validate(Accessor(_target), _reference, tolerance_qasymm8); |
| 732 | } |
Manuel Bottini | ca62c6f | 2021-03-23 11:50:34 +0000 | [diff] [blame] | 733 | FIXTURE_DATA_TEST_CASE_NEW(RunLarge, NEDepthwiseConvolutionLayerQuantizedFixture<uint8_t>, framework::DatasetMode::NIGHTLY, |
Omar Al Khatib | 0cba93f | 2024-02-01 14:42:37 +0000 | [diff] [blame^] | 734 | combine(datasets::LargeDepthwiseConvolutionLayerDataset3x3(), |
| 735 | large_depth_multipliers, |
| 736 | make("DataType", DataType::QASYMM8), |
| 737 | IgnoredQuantizationInfo, |
| 738 | IgnoredQuantizationInfo, |
| 739 | make("DataLayout", { DataLayout::NHWC }), |
| 740 | NoActivation)) |
Georgios Pinitas | f72f936 | 2018-01-12 16:29:45 +0000 | [diff] [blame] | 741 | { |
| 742 | validate(Accessor(_target), _reference, tolerance_qasymm8); |
| 743 | } |
Usama Arif | 881f2de | 2019-04-12 10:29:17 +0100 | [diff] [blame] | 744 | |
| 745 | TEST_SUITE(Dilation) |
Manuel Bottini | ca62c6f | 2021-03-23 11:50:34 +0000 | [diff] [blame] | 746 | FIXTURE_DATA_TEST_CASE_NEW(RunSmall, NEDepthwiseConvolutionLayerQuantizedFixture<uint8_t>, framework::DatasetMode::PRECOMMIT, |
Omar Al Khatib | 0cba93f | 2024-02-01 14:42:37 +0000 | [diff] [blame^] | 747 | combine(datasets::SmallDepthwiseDilatedConvolutionLayerDataset3x3(), depth_multipliers, |
| 748 | make("DataType", DataType::QASYMM8), |
| 749 | IgnoredQuantizationInfo, |
| 750 | IgnoredQuantizationInfo, |
| 751 | make("DataLayout", { DataLayout::NHWC }), |
| 752 | NoActivation)) |
| 753 | { |
| 754 | validate(Accessor(_target), _reference, tolerance_qasymm8); |
| 755 | } |
| 756 | FIXTURE_DATA_TEST_CASE_NEW(RunSmallWithActivation, NEDepthwiseConvolutionLayerQuantizedFixture<uint8_t>, framework::DatasetMode::PRECOMMIT, |
| 757 | combine(datasets::SmallDepthwiseDilatedConvolutionLayerDataset3x3(), depth_multipliers, |
| 758 | make("DataType", DataType::QASYMM8), |
| 759 | input_qinfo_dataset, |
| 760 | make("DstQuantizationInfo", { QuantizationInfo(0.7f, 10) }), |
| 761 | make("DataLayout", { DataLayout::NHWC }), |
| 762 | ActivationFunctionsQuantizedSmallDataset)) |
Usama Arif | 881f2de | 2019-04-12 10:29:17 +0100 | [diff] [blame] | 763 | { |
| 764 | validate(Accessor(_target), _reference, tolerance_qasymm8); |
| 765 | } |
Manuel Bottini | ca62c6f | 2021-03-23 11:50:34 +0000 | [diff] [blame] | 766 | FIXTURE_DATA_TEST_CASE_NEW(RunLarge, NEDepthwiseConvolutionLayerQuantizedFixture<uint8_t>, framework::DatasetMode::NIGHTLY, |
Omar Al Khatib | 0cba93f | 2024-02-01 14:42:37 +0000 | [diff] [blame^] | 767 | combine(datasets::LargeDepthwiseDilatedConvolutionLayerDataset3x3(), |
| 768 | large_depth_multipliers, |
| 769 | make("DataType", DataType::QASYMM8), |
| 770 | IgnoredQuantizationInfo, |
| 771 | IgnoredQuantizationInfo, |
| 772 | make("DataLayout", { DataLayout::NHWC }), |
| 773 | NoActivation)) |
Usama Arif | 881f2de | 2019-04-12 10:29:17 +0100 | [diff] [blame] | 774 | { |
| 775 | validate(Accessor(_target), _reference, tolerance_qasymm8); |
| 776 | } |
| 777 | TEST_SUITE_END() // Dilation |
Michalis Spyrou | aeebe4a | 2019-01-09 14:21:03 +0000 | [diff] [blame] | 778 | TEST_SUITE_END() // W3x3 |
Georgios Pinitas | 4c75851 | 2019-07-10 19:49:11 +0100 | [diff] [blame] | 779 | |
| 780 | TEST_SUITE(Optimized) |
Manuel Bottini | ca62c6f | 2021-03-23 11:50:34 +0000 | [diff] [blame] | 781 | FIXTURE_DATA_TEST_CASE_NEW(RunSmall3x3, NEDepthwiseConvolutionLayerQuantizedFixture<uint8_t>, framework::DatasetMode::PRECOMMIT, |
Omar Al Khatib | 0cba93f | 2024-02-01 14:42:37 +0000 | [diff] [blame^] | 782 | combine(datasets::SmallOptimizedDepthwiseConvolutionLayerDataset3x3(), |
| 783 | make("DepthMultiplier", 1), |
| 784 | make("DataType", DataType::QASYMM8), |
| 785 | IgnoredQuantizationInfo, |
| 786 | IgnoredQuantizationInfo, |
| 787 | make("DataLayout", { DataLayout::NHWC }), |
| 788 | NoActivation)) |
| 789 | { |
| 790 | validate(Accessor(_target), _reference, tolerance_qasymm8); |
| 791 | } |
| 792 | FIXTURE_DATA_TEST_CASE_NEW(RunSmall3x3WithActivation, NEDepthwiseConvolutionLayerQuantizedFixture<uint8_t>, framework::DatasetMode::PRECOMMIT, |
| 793 | combine(datasets::SmallOptimizedDepthwiseConvolutionLayerDataset3x3(), |
| 794 | make("DepthMultiplier", 1), |
| 795 | make("DataType", DataType::QASYMM8), |
| 796 | input_qinfo_dataset, |
| 797 | make("DstQuantizationInfo", { QuantizationInfo(0.5f, 10) }), |
| 798 | make("DataLayout", { DataLayout::NHWC }), |
| 799 | ActivationFunctionsQuantizedSmallDataset)) |
Georgios Pinitas | 4c75851 | 2019-07-10 19:49:11 +0100 | [diff] [blame] | 800 | { |
| 801 | validate(Accessor(_target), _reference, tolerance_qasymm8); |
| 802 | } |
Manuel Bottini | ca62c6f | 2021-03-23 11:50:34 +0000 | [diff] [blame] | 803 | FIXTURE_DATA_TEST_CASE_NEW(RunMixedDataLayout3x3, NEDepthwiseConvolutionLayerQuantizedMixedDataLayoutFixture<uint8_t>, framework::DatasetMode::PRECOMMIT, |
Omar Al Khatib | 0cba93f | 2024-02-01 14:42:37 +0000 | [diff] [blame^] | 804 | combine(datasets::SmallOptimizedDepthwiseConvolutionLayerDataset3x3(), |
| 805 | make("DepthMultiplier", 1), |
| 806 | make("DataType", DataType::QASYMM8), |
| 807 | IgnoredQuantizationInfo, |
| 808 | IgnoredQuantizationInfo, |
| 809 | make("DataLayout", { DataLayout::NHWC }), |
| 810 | NoActivation)) |
Manuel Bottini | ca62c6f | 2021-03-23 11:50:34 +0000 | [diff] [blame] | 811 | { |
| 812 | validate(Accessor(_target), _reference, tolerance_qasymm8); |
| 813 | } |
| 814 | FIXTURE_DATA_TEST_CASE_NEW(RunSmall5x5, NEDepthwiseConvolutionLayerQuantizedFixture<uint8_t>, framework::DatasetMode::PRECOMMIT, |
Omar Al Khatib | 0cba93f | 2024-02-01 14:42:37 +0000 | [diff] [blame^] | 815 | combine(datasets::SmallOptimizedDepthwiseConvolutionLayerDataset5x5(), |
| 816 | make("DepthMultiplier", 1), |
| 817 | make("DataType", DataType::QASYMM8), |
| 818 | IgnoredQuantizationInfo, |
| 819 | IgnoredQuantizationInfo, |
| 820 | make("DataLayout", { DataLayout::NHWC }), |
| 821 | NoActivation)) |
| 822 | { |
| 823 | validate(Accessor(_target), _reference, tolerance_qasymm8); |
| 824 | } |
| 825 | FIXTURE_DATA_TEST_CASE_NEW(RunSmall5x5WithActivation, NEDepthwiseConvolutionLayerQuantizedFixture<uint8_t>, framework::DatasetMode::PRECOMMIT, |
| 826 | combine(datasets::SmallOptimizedDepthwiseConvolutionLayerDataset5x5(), |
| 827 | make("DepthMultiplier", 1), |
| 828 | make("DataType", DataType::QASYMM8), |
| 829 | input_qinfo_dataset, |
| 830 | make("DstQuantizationInfo", { QuantizationInfo(0.5f, 10) }), |
| 831 | make("DataLayout", { DataLayout::NHWC }), |
| 832 | ActivationFunctionsQuantizedSmallDataset)) |
Georgios Pinitas | 4c75851 | 2019-07-10 19:49:11 +0100 | [diff] [blame] | 833 | { |
| 834 | validate(Accessor(_target), _reference, tolerance_qasymm8); |
| 835 | } |
Manuel Bottini | ca62c6f | 2021-03-23 11:50:34 +0000 | [diff] [blame] | 836 | FIXTURE_DATA_TEST_CASE_NEW(RunLarge3x3, NEDepthwiseConvolutionLayerQuantizedFixture<uint8_t>, framework::DatasetMode::NIGHTLY, |
Omar Al Khatib | 0cba93f | 2024-02-01 14:42:37 +0000 | [diff] [blame^] | 837 | combine(datasets::LargeOptimizedDepthwiseConvolutionLayerDataset3x3(), |
| 838 | make("DepthMultiplier", 1), |
| 839 | make("DataType", DataType::QASYMM8), |
| 840 | IgnoredQuantizationInfo, |
| 841 | IgnoredQuantizationInfo, |
| 842 | make("DataLayout", { DataLayout::NHWC }), |
| 843 | NoActivation)) |
Georgios Pinitas | 4c75851 | 2019-07-10 19:49:11 +0100 | [diff] [blame] | 844 | { |
| 845 | validate(Accessor(_target), _reference, tolerance_qasymm8); |
| 846 | } |
| 847 | TEST_SUITE_END() // Optimized |
Michalis Spyrou | aeebe4a | 2019-01-09 14:21:03 +0000 | [diff] [blame] | 848 | TEST_SUITE_END() // QASYMM8 |
Michele Di Giorgio | 13ec5f0 | 2020-01-02 12:11:13 +0000 | [diff] [blame] | 849 | |
| 850 | TEST_SUITE(QASYMM8_SIGNED) |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 851 | |
| 852 | FIXTURE_DATA_TEST_CASE_NEW(RunActivations, NEDepthwiseConvolutionLayerQuantizedFixture<int8_t>, framework::DatasetMode::NIGHTLY, |
| 853 | combine( |
| 854 | make("In", TensorShape(33U, 27U, 11U, 3U)), |
| 855 | make("Weights", Size2D(3U, 4U)), |
| 856 | make("Info", PadStrideInfo(1, 2, 0, 1)), |
| 857 | make("Dilation", Size2D(2U, 2U)), |
| 858 | make("DepthMultiplier", { 5 }), |
| 859 | make("DataType", DataType::QASYMM8_SIGNED), |
| 860 | make("SrcQuantizationInfo", { QuantizationInfo(0.3f, 10) }), |
| 861 | make("DstQuantizationInfo", { QuantizationInfo(0.05f, 4) }), |
| 862 | make("DataLayout", { DataLayout::NHWC, DataLayout::NCHW }), |
| 863 | ActivationFunctionsQuantizedDataset)) |
| 864 | { |
| 865 | validate(Accessor(_target), _reference, tolerance_qasymm8); |
| 866 | } |
| 867 | |
Michele Di Giorgio | 8c837ca | 2020-01-07 15:06:41 +0000 | [diff] [blame] | 868 | TEST_SUITE(Generic) |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 869 | FIXTURE_DATA_TEST_CASE_NEW(RunSmall, NEDepthwiseConvolutionLayerQuantizedFixture<int8_t>, framework::DatasetMode::PRECOMMIT, |
Omar Al Khatib | 0cba93f | 2024-02-01 14:42:37 +0000 | [diff] [blame^] | 870 | combine(datasets::SmallDepthwiseConvolutionLayerDataset(), |
| 871 | depth_multipliers, |
| 872 | make("DataType", DataType::QASYMM8_SIGNED), |
| 873 | IgnoredQuantizationInfo, |
| 874 | IgnoredQuantizationInfo, |
| 875 | make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC }), |
| 876 | NoActivation)) |
Michele Di Giorgio | 8c837ca | 2020-01-07 15:06:41 +0000 | [diff] [blame] | 877 | { |
Omar Al Khatib | 0cba93f | 2024-02-01 14:42:37 +0000 | [diff] [blame^] | 878 | validate(Accessor(_target), _reference, tolerance_qasymm8_signed); |
Michele Di Giorgio | 8c837ca | 2020-01-07 15:06:41 +0000 | [diff] [blame] | 879 | } |
Omar Al Khatib | 0cba93f | 2024-02-01 14:42:37 +0000 | [diff] [blame^] | 880 | FIXTURE_DATA_TEST_CASE_NEW(RunSmallWithActivation, NEDepthwiseConvolutionLayerQuantizedFixture<int8_t>, framework::DatasetMode::PRECOMMIT, |
| 881 | combine(datasets::SmallDepthwiseConvolutionLayerDataset(), |
| 882 | depth_multipliers, |
| 883 | make("DataType", DataType::QASYMM8_SIGNED), |
| 884 | input_qinfo_dataset, |
| 885 | make("DstQuantizationInfo", { QuantizationInfo(0.5f, 4) }), |
| 886 | make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC }), |
| 887 | ActivationFunctionsQuantizedSmallDataset)) |
| 888 | { |
| 889 | validate(Accessor(_target), _reference, tolerance_qasymm8_signed); |
| 890 | } |
Michele Di Giorgio | 8c837ca | 2020-01-07 15:06:41 +0000 | [diff] [blame] | 891 | TEST_SUITE(Dilation) |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 892 | FIXTURE_DATA_TEST_CASE_NEW(RunSmall, NEDepthwiseConvolutionLayerQuantizedFixture<int8_t>, framework::DatasetMode::PRECOMMIT, |
Omar Al Khatib | 0cba93f | 2024-02-01 14:42:37 +0000 | [diff] [blame^] | 893 | combine(datasets::SmallDepthwiseDilatedConvolutionLayerDataset(), |
| 894 | depth_multipliers, |
| 895 | make("DataType", DataType::QASYMM8_SIGNED), |
| 896 | IgnoredQuantizationInfo, |
| 897 | IgnoredQuantizationInfo, |
| 898 | make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC }), |
| 899 | NoActivation)) |
Michele Di Giorgio | 8c837ca | 2020-01-07 15:06:41 +0000 | [diff] [blame] | 900 | { |
Omar Al Khatib | 0cba93f | 2024-02-01 14:42:37 +0000 | [diff] [blame^] | 901 | validate(Accessor(_target), _reference, tolerance_qasymm8_signed); |
| 902 | } |
| 903 | FIXTURE_DATA_TEST_CASE_NEW(RunSmallWithActivation, NEDepthwiseConvolutionLayerQuantizedFixture<int8_t>, framework::DatasetMode::PRECOMMIT, |
| 904 | combine(datasets::SmallDepthwiseDilatedConvolutionLayerDataset(), |
| 905 | depth_multipliers, |
| 906 | make("DataType", DataType::QASYMM8_SIGNED), |
| 907 | input_qinfo_dataset, |
| 908 | make("DstQuantizationInfo", { QuantizationInfo(0.8f, 1) }), |
| 909 | make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC }), |
| 910 | ActivationFunctionsQuantizedSmallDataset)) |
| 911 | { |
| 912 | validate(Accessor(_target), _reference, tolerance_qasymm8_signed); |
Michele Di Giorgio | 8c837ca | 2020-01-07 15:06:41 +0000 | [diff] [blame] | 913 | } |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 914 | FIXTURE_DATA_TEST_CASE_NEW(RunLarge, NEDepthwiseConvolutionLayerQuantizedFixture<int8_t>, framework::DatasetMode::NIGHTLY, |
Omar Al Khatib | 0cba93f | 2024-02-01 14:42:37 +0000 | [diff] [blame^] | 915 | combine(datasets::LargeDepthwiseDilatedConvolutionLayerDataset(), |
| 916 | large_depth_multipliers, |
| 917 | make("DataType", DataType::QASYMM8_SIGNED), |
| 918 | IgnoredQuantizationInfo, |
| 919 | IgnoredQuantizationInfo, |
| 920 | make("DataLayout", { DataLayout::NCHW }), |
| 921 | NoActivation)) |
Michele Di Giorgio | 8c837ca | 2020-01-07 15:06:41 +0000 | [diff] [blame] | 922 | { |
Omar Al Khatib | 0cba93f | 2024-02-01 14:42:37 +0000 | [diff] [blame^] | 923 | validate(Accessor(_target), _reference, tolerance_qasymm8_signed); |
Michele Di Giorgio | 8c837ca | 2020-01-07 15:06:41 +0000 | [diff] [blame] | 924 | } |
| 925 | TEST_SUITE_END() // Dilation |
| 926 | TEST_SUITE_END() // Generic |
| 927 | |
Michele Di Giorgio | 13ec5f0 | 2020-01-02 12:11:13 +0000 | [diff] [blame] | 928 | TEST_SUITE(W3x3) |
Manuel Bottini | ca62c6f | 2021-03-23 11:50:34 +0000 | [diff] [blame] | 929 | FIXTURE_DATA_TEST_CASE_NEW(RunSmall, NEDepthwiseConvolutionLayerQuantizedFixture<int8_t>, framework::DatasetMode::PRECOMMIT, |
Omar Al Khatib | 0cba93f | 2024-02-01 14:42:37 +0000 | [diff] [blame^] | 930 | combine(datasets::SmallDepthwiseConvolutionLayerDataset3x3(), |
| 931 | depth_multipliers, |
| 932 | make("DataType", DataType::QASYMM8_SIGNED), |
| 933 | IgnoredQuantizationInfo, |
| 934 | IgnoredQuantizationInfo, |
| 935 | make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC }), |
| 936 | NoActivation)) |
Michele Di Giorgio | 13ec5f0 | 2020-01-02 12:11:13 +0000 | [diff] [blame] | 937 | { |
Omar Al Khatib | 0cba93f | 2024-02-01 14:42:37 +0000 | [diff] [blame^] | 938 | validate(Accessor(_target), _reference, tolerance_qasymm8_signed); |
| 939 | } |
| 940 | FIXTURE_DATA_TEST_CASE_NEW(RunSmallWithActivation, NEDepthwiseConvolutionLayerQuantizedFixture<int8_t>, framework::DatasetMode::PRECOMMIT, |
| 941 | combine(datasets::SmallDepthwiseConvolutionLayerDataset3x3(), |
| 942 | depth_multipliers, |
| 943 | make("DataType", DataType::QASYMM8_SIGNED), |
| 944 | input_qinfo_dataset, |
| 945 | make("DstQuantizationInfo", { QuantizationInfo(0.5f, 10) }), |
| 946 | make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC }), |
| 947 | ActivationFunctionsQuantizedSmallDataset)) |
| 948 | { |
| 949 | validate(Accessor(_target), _reference, tolerance_qasymm8_signed); |
Michele Di Giorgio | 13ec5f0 | 2020-01-02 12:11:13 +0000 | [diff] [blame] | 950 | } |
Manuel Bottini | ca62c6f | 2021-03-23 11:50:34 +0000 | [diff] [blame] | 951 | FIXTURE_DATA_TEST_CASE_NEW(RunLarge, NEDepthwiseConvolutionLayerQuantizedFixture<int8_t>, framework::DatasetMode::NIGHTLY, |
Omar Al Khatib | 0cba93f | 2024-02-01 14:42:37 +0000 | [diff] [blame^] | 952 | combine(datasets::LargeDepthwiseConvolutionLayerDataset3x3(), |
| 953 | large_depth_multipliers, |
| 954 | make("DataType", DataType::QASYMM8_SIGNED), |
| 955 | IgnoredQuantizationInfo, |
| 956 | IgnoredQuantizationInfo, |
| 957 | make("DataLayout", { DataLayout::NCHW }), |
| 958 | NoActivation)) |
Michele Di Giorgio | 13ec5f0 | 2020-01-02 12:11:13 +0000 | [diff] [blame] | 959 | { |
Omar Al Khatib | 0cba93f | 2024-02-01 14:42:37 +0000 | [diff] [blame^] | 960 | validate(Accessor(_target), _reference, tolerance_qasymm8_signed); |
Michele Di Giorgio | 13ec5f0 | 2020-01-02 12:11:13 +0000 | [diff] [blame] | 961 | } |
| 962 | |
| 963 | TEST_SUITE(Dilation) |
Manuel Bottini | ca62c6f | 2021-03-23 11:50:34 +0000 | [diff] [blame] | 964 | FIXTURE_DATA_TEST_CASE_NEW(RunSmall, NEDepthwiseConvolutionLayerQuantizedFixture<int8_t>, framework::DatasetMode::PRECOMMIT, |
Omar Al Khatib | 0cba93f | 2024-02-01 14:42:37 +0000 | [diff] [blame^] | 965 | combine(datasets::SmallDepthwiseDilatedConvolutionLayerDataset3x3(), |
| 966 | depth_multipliers, |
| 967 | make("DataType", DataType::QASYMM8_SIGNED), |
| 968 | IgnoredQuantizationInfo, |
| 969 | IgnoredQuantizationInfo, |
| 970 | make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC }), |
| 971 | NoActivation)) |
Michele Di Giorgio | 13ec5f0 | 2020-01-02 12:11:13 +0000 | [diff] [blame] | 972 | { |
Omar Al Khatib | 0cba93f | 2024-02-01 14:42:37 +0000 | [diff] [blame^] | 973 | validate(Accessor(_target), _reference, tolerance_qasymm8_signed); |
| 974 | } |
| 975 | FIXTURE_DATA_TEST_CASE_NEW(RunSmallWithActivation, NEDepthwiseConvolutionLayerQuantizedFixture<int8_t>, framework::DatasetMode::PRECOMMIT, |
| 976 | combine(datasets::SmallDepthwiseDilatedConvolutionLayerDataset3x3(), |
| 977 | depth_multipliers, |
| 978 | make("DataType", DataType::QASYMM8_SIGNED), |
| 979 | input_qinfo_dataset, |
| 980 | make("DstQuantizationInfo", { QuantizationInfo(0.7f, 10) }), |
| 981 | make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC }), |
| 982 | ActivationFunctionsQuantizedSmallDataset)) |
| 983 | { |
| 984 | validate(Accessor(_target), _reference, tolerance_qasymm8_signed); |
Michele Di Giorgio | 13ec5f0 | 2020-01-02 12:11:13 +0000 | [diff] [blame] | 985 | } |
Manuel Bottini | ca62c6f | 2021-03-23 11:50:34 +0000 | [diff] [blame] | 986 | FIXTURE_DATA_TEST_CASE_NEW(RunLarge, NEDepthwiseConvolutionLayerQuantizedFixture<int8_t>, framework::DatasetMode::NIGHTLY, |
Omar Al Khatib | 0cba93f | 2024-02-01 14:42:37 +0000 | [diff] [blame^] | 987 | combine(datasets::LargeDepthwiseDilatedConvolutionLayerDataset3x3(), |
| 988 | large_depth_multipliers, |
| 989 | make("DataType", DataType::QASYMM8_SIGNED), |
| 990 | IgnoredQuantizationInfo, |
| 991 | IgnoredQuantizationInfo, |
| 992 | make("DataLayout", { DataLayout::NCHW }), |
| 993 | NoActivation)) |
Michele Di Giorgio | 13ec5f0 | 2020-01-02 12:11:13 +0000 | [diff] [blame] | 994 | { |
Omar Al Khatib | 0cba93f | 2024-02-01 14:42:37 +0000 | [diff] [blame^] | 995 | validate(Accessor(_target), _reference, tolerance_qasymm8_signed); |
Michele Di Giorgio | 13ec5f0 | 2020-01-02 12:11:13 +0000 | [diff] [blame] | 996 | } |
| 997 | TEST_SUITE_END() // Dilation |
| 998 | TEST_SUITE_END() // W3x3 |
Michele Di Giorgio | 8c837ca | 2020-01-07 15:06:41 +0000 | [diff] [blame] | 999 | |
| 1000 | TEST_SUITE(Optimized) |
Manuel Bottini | ca62c6f | 2021-03-23 11:50:34 +0000 | [diff] [blame] | 1001 | FIXTURE_DATA_TEST_CASE_NEW(RunSmall3x3, NEDepthwiseConvolutionLayerQuantizedFixture<int8_t>, framework::DatasetMode::PRECOMMIT, |
Omar Al Khatib | 0cba93f | 2024-02-01 14:42:37 +0000 | [diff] [blame^] | 1002 | combine(datasets::SmallOptimizedDepthwiseConvolutionLayerDataset3x3(), |
| 1003 | make("DepthMultiplier", 1), |
| 1004 | make("DataType", DataType::QASYMM8_SIGNED), |
| 1005 | IgnoredQuantizationInfo, |
| 1006 | IgnoredQuantizationInfo, |
| 1007 | make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC }), |
| 1008 | NoActivation)) |
Michele Di Giorgio | 8c837ca | 2020-01-07 15:06:41 +0000 | [diff] [blame] | 1009 | { |
Omar Al Khatib | 0cba93f | 2024-02-01 14:42:37 +0000 | [diff] [blame^] | 1010 | validate(Accessor(_target), _reference, tolerance_qasymm8_signed); |
| 1011 | } |
| 1012 | FIXTURE_DATA_TEST_CASE_NEW(RunSmall3x3WithActivation, NEDepthwiseConvolutionLayerQuantizedFixture<int8_t>, framework::DatasetMode::PRECOMMIT, |
| 1013 | combine(datasets::SmallOptimizedDepthwiseConvolutionLayerDataset3x3(), |
| 1014 | make("DepthMultiplier", 1), |
| 1015 | make("DataType", DataType::QASYMM8_SIGNED), |
| 1016 | input_qinfo_dataset, |
| 1017 | make("DstQuantizationInfo", { QuantizationInfo(0.5f, 10) }), |
| 1018 | make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC }), |
| 1019 | ActivationFunctionsQuantizedSmallDataset)) |
| 1020 | { |
| 1021 | validate(Accessor(_target), _reference, tolerance_qasymm8_signed); |
Michele Di Giorgio | 8c837ca | 2020-01-07 15:06:41 +0000 | [diff] [blame] | 1022 | } |
Manuel Bottini | ca62c6f | 2021-03-23 11:50:34 +0000 | [diff] [blame] | 1023 | FIXTURE_DATA_TEST_CASE_NEW(RunSmall5x5, NEDepthwiseConvolutionLayerQuantizedFixture<int8_t>, framework::DatasetMode::PRECOMMIT, |
Omar Al Khatib | 0cba93f | 2024-02-01 14:42:37 +0000 | [diff] [blame^] | 1024 | combine(datasets::SmallOptimizedDepthwiseConvolutionLayerDataset5x5(), |
| 1025 | make("DepthMultiplier", 1), |
| 1026 | make("DataType", DataType::QASYMM8_SIGNED), |
| 1027 | IgnoredQuantizationInfo, |
| 1028 | IgnoredQuantizationInfo, |
| 1029 | make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC }), |
| 1030 | NoActivation)) |
Michele Di Giorgio | 8c837ca | 2020-01-07 15:06:41 +0000 | [diff] [blame] | 1031 | { |
Omar Al Khatib | 0cba93f | 2024-02-01 14:42:37 +0000 | [diff] [blame^] | 1032 | validate(Accessor(_target), _reference, tolerance_qasymm8_signed); |
| 1033 | } |
| 1034 | FIXTURE_DATA_TEST_CASE_NEW(RunSmall5x5WithActivation, NEDepthwiseConvolutionLayerQuantizedFixture<int8_t>, framework::DatasetMode::PRECOMMIT, |
| 1035 | combine(datasets::SmallOptimizedDepthwiseConvolutionLayerDataset5x5(), |
| 1036 | make("DepthMultiplier", 1), |
| 1037 | make("DataType", DataType::QASYMM8_SIGNED), |
| 1038 | input_qinfo_dataset, |
| 1039 | make("DstQuantizationInfo", { QuantizationInfo(0.5f, 10) }), |
| 1040 | make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC }), |
| 1041 | ActivationFunctionsQuantizedSmallDataset)) |
| 1042 | { |
| 1043 | validate(Accessor(_target), _reference, tolerance_qasymm8_signed); |
Michele Di Giorgio | 8c837ca | 2020-01-07 15:06:41 +0000 | [diff] [blame] | 1044 | } |
Manuel Bottini | ca62c6f | 2021-03-23 11:50:34 +0000 | [diff] [blame] | 1045 | FIXTURE_DATA_TEST_CASE_NEW(RunLarge3x3, NEDepthwiseConvolutionLayerQuantizedFixture<int8_t>, framework::DatasetMode::NIGHTLY, |
Omar Al Khatib | 0cba93f | 2024-02-01 14:42:37 +0000 | [diff] [blame^] | 1046 | combine(datasets::LargeOptimizedDepthwiseConvolutionLayerDataset3x3(), |
| 1047 | make("DepthMultiplier", 1), |
| 1048 | make("DataType", DataType::QASYMM8_SIGNED), |
| 1049 | IgnoredQuantizationInfo, |
| 1050 | IgnoredQuantizationInfo, |
| 1051 | make("DataLayout", { DataLayout::NCHW }), |
| 1052 | NoActivation)) |
Michele Di Giorgio | 8c837ca | 2020-01-07 15:06:41 +0000 | [diff] [blame] | 1053 | { |
Omar Al Khatib | 0cba93f | 2024-02-01 14:42:37 +0000 | [diff] [blame^] | 1054 | validate(Accessor(_target), _reference, tolerance_qasymm8_signed); |
Michele Di Giorgio | 8c837ca | 2020-01-07 15:06:41 +0000 | [diff] [blame] | 1055 | } |
| 1056 | TEST_SUITE_END() // Optimized |
Michele Di Giorgio | 13ec5f0 | 2020-01-02 12:11:13 +0000 | [diff] [blame] | 1057 | TEST_SUITE_END() // QASYMM8_SIGNED |
| 1058 | |
Giorgio Arena | d93e263 | 2019-10-15 11:09:33 +0100 | [diff] [blame] | 1059 | TEST_SUITE(QSYMM8_PER_CHANNEL) |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 1060 | |
| 1061 | FIXTURE_DATA_TEST_CASE_NEW(RunActivations, NEDepthwiseConvolutionLayerQuantizedSymmetricPerChannelFixture, framework::DatasetMode::NIGHTLY, |
| 1062 | combine( |
| 1063 | make("In", TensorShape(33U, 27U, 11U, 3U)), |
| 1064 | make("Weights", Size2D(3U, 4U)), |
| 1065 | make("Info", PadStrideInfo(1, 2, 0, 1)), |
| 1066 | make("Dilation", Size2D(2U, 2U)), |
| 1067 | make("DepthMultiplier", { 5 }), |
| 1068 | make("InputDataType", DataType::QASYMM8), |
| 1069 | make("WeightsDataType", DataType::QSYMM8_PER_CHANNEL), |
| 1070 | make("SrcQuantizationInfo", { QuantizationInfo(0.3f, 10) }), |
| 1071 | make("DstQuantizationInfo", { QuantizationInfo(0.05f, 4) }), |
| 1072 | make("DataLayout", { DataLayout::NHWC, DataLayout::NCHW }), |
| 1073 | ActivationFunctionsQuantizedDataset)) |
| 1074 | { |
| 1075 | validate(Accessor(_target), _reference, tolerance_qasymm8); |
| 1076 | } |
| 1077 | |
Giorgio Arena | d93e263 | 2019-10-15 11:09:33 +0100 | [diff] [blame] | 1078 | TEST_SUITE(Generic) |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 1079 | FIXTURE_DATA_TEST_CASE_NEW(RunSmall, NEDepthwiseConvolutionLayerQuantizedSymmetricPerChannelFixture, framework::DatasetMode::PRECOMMIT, |
| 1080 | combine(combine(combine(combine(combine(combine(combine(datasets::SmallDepthwiseConvolutionLayerDataset(), |
| 1081 | depth_multipliers), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 1082 | make("InputDataType", DataType::QASYMM8)), |
| 1083 | make("WeightsDataType", DataType::QSYMM8_PER_CHANNEL)), |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 1084 | input_qinfo_dataset), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 1085 | make("DstQuantizationInfo", { QuantizationInfo(0.5f, 4) })), |
| 1086 | make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })), |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 1087 | ActivationFunctionsDataset)) |
Giorgio Arena | d93e263 | 2019-10-15 11:09:33 +0100 | [diff] [blame] | 1088 | { |
| 1089 | validate(Accessor(_target), _reference, tolerance_qasymm8); |
| 1090 | } |
| 1091 | |
| 1092 | TEST_SUITE(Dilation) |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 1093 | FIXTURE_DATA_TEST_CASE_NEW(RunSmall, NEDepthwiseConvolutionLayerQuantizedSymmetricPerChannelFixture, framework::DatasetMode::PRECOMMIT, |
| 1094 | combine(combine(combine(combine(combine(combine(combine(datasets::SmallDepthwiseDilatedConvolutionLayerDataset(), |
| 1095 | depth_multipliers), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 1096 | make("InputDataType", DataType::QASYMM8)), |
| 1097 | make("WeightsDataType", DataType::QSYMM8_PER_CHANNEL)), |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 1098 | input_qinfo_dataset), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 1099 | make("DstQuantizationInfo", { QuantizationInfo(0.5f, 4) })), |
| 1100 | make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })), |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 1101 | ActivationFunctionsDataset)) |
Giorgio Arena | d93e263 | 2019-10-15 11:09:33 +0100 | [diff] [blame] | 1102 | { |
| 1103 | validate(Accessor(_target), _reference, tolerance_qasymm8); |
| 1104 | } |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 1105 | FIXTURE_DATA_TEST_CASE_NEW(RunLarge, NEDepthwiseConvolutionLayerQuantizedSymmetricPerChannelFixture, framework::DatasetMode::NIGHTLY, |
| 1106 | combine(combine(combine(combine(combine(combine(combine(datasets::LargeDepthwiseDilatedConvolutionLayerDataset(), |
| 1107 | depth_multipliers), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 1108 | make("InputDataType", DataType::QASYMM8)), |
| 1109 | make("WeightsDataType", DataType::QSYMM8_PER_CHANNEL)), |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 1110 | input_qinfo_dataset), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 1111 | make("DstQuantizationInfo", { QuantizationInfo(0.5f, 4) })), |
| 1112 | make("DataLayout", { DataLayout::NHWC })), |
| 1113 | make("ActivationInfo", { ActivationLayerInfo() }))) |
Giorgio Arena | d93e263 | 2019-10-15 11:09:33 +0100 | [diff] [blame] | 1114 | { |
| 1115 | validate(Accessor(_target), _reference, tolerance_qasymm8); |
| 1116 | } |
| 1117 | TEST_SUITE_END() // Dilation |
| 1118 | TEST_SUITE_END() // Generic |
Giuseppe Rossini | f01201a | 2019-11-06 14:57:49 +0000 | [diff] [blame] | 1119 | |
| 1120 | TEST_SUITE(Optimized) |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 1121 | FIXTURE_DATA_TEST_CASE_NEW(RunSmall3x3, NEDepthwiseConvolutionLayerQuantizedSymmetricPerChannelFixture, framework::DatasetMode::PRECOMMIT, |
| 1122 | combine(combine(combine(combine(combine(combine(combine(datasets::SmallOptimizedDepthwiseConvolutionLayerDataset3x3(), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 1123 | make("DepthMultiplier", 1)), |
| 1124 | make("InputDataType", DataType::QASYMM8)), |
| 1125 | make("WeightsDataType", DataType::QSYMM8_PER_CHANNEL)), |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 1126 | input_qinfo_dataset), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 1127 | make("DstQuantizationInfo", { QuantizationInfo(0.5f, 4) })), |
| 1128 | make("DataLayout", { DataLayout::NHWC })), |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 1129 | ActivationFunctionsDataset)) |
Giuseppe Rossini | f01201a | 2019-11-06 14:57:49 +0000 | [diff] [blame] | 1130 | { |
| 1131 | validate(Accessor(_target), _reference, tolerance_qasymm8); |
| 1132 | } |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 1133 | FIXTURE_DATA_TEST_CASE_NEW(RunLarge3x3, NEDepthwiseConvolutionLayerQuantizedSymmetricPerChannelFixture, framework::DatasetMode::NIGHTLY, |
| 1134 | combine(combine(combine(combine(combine(combine(combine(datasets::LargeOptimizedDepthwiseConvolutionLayerDataset3x3(), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 1135 | make("DepthMultiplier", 1)), |
| 1136 | make("InputDataType", DataType::QASYMM8)), |
| 1137 | make("WeightsDataType", DataType::QSYMM8_PER_CHANNEL)), |
Giorgio Arena | 68e29da | 2021-02-08 16:31:10 +0000 | [diff] [blame] | 1138 | input_qinfo_dataset), |
Gunes Bayir | 3af4c9b | 2023-10-08 17:51:28 +0100 | [diff] [blame] | 1139 | make("DstQuantizationInfo", { QuantizationInfo(0.5f, 4) })), |
| 1140 | make("DataLayout", { DataLayout::NHWC })), |
| 1141 | make("ActivationInfo", { ActivationLayerInfo() }))) |
Giuseppe Rossini | f01201a | 2019-11-06 14:57:49 +0000 | [diff] [blame] | 1142 | { |
| 1143 | validate(Accessor(_target), _reference, tolerance_qasymm8); |
| 1144 | } |
| 1145 | TEST_SUITE_END() // Optimized |
Giorgio Arena | d93e263 | 2019-10-15 11:09:33 +0100 | [diff] [blame] | 1146 | TEST_SUITE_END() // QSYMM8_PER_CHANNEL |
Michalis Spyrou | aeebe4a | 2019-01-09 14:21:03 +0000 | [diff] [blame] | 1147 | TEST_SUITE_END() // Quantized |
Georgios Pinitas | f72f936 | 2018-01-12 16:29:45 +0000 | [diff] [blame] | 1148 | |
Michalis Spyrou | aeebe4a | 2019-01-09 14:21:03 +0000 | [diff] [blame] | 1149 | TEST_SUITE_END() // DepthwiseConvLayer |
Sheri Zhang | ac6499a | 2021-02-10 15:32:38 +0000 | [diff] [blame] | 1150 | TEST_SUITE_END() // Neon |
Michalis Spyrou | 7362f0d | 2017-10-18 17:58:22 +0100 | [diff] [blame] | 1151 | } // namespace validation |
| 1152 | } // namespace test |
| 1153 | } // namespace arm_compute |