Georgios Pinitas | dc460f1 | 2017-08-24 19:02:44 +0100 | [diff] [blame] | 1 | /* |
Michele Di Giorgio | d9eaf61 | 2020-07-08 11:12:57 +0100 | [diff] [blame] | 2 | * Copyright (c) 2017-2020 Arm Limited. |
Georgios Pinitas | dc460f1 | 2017-08-24 19:02:44 +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, |
| 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| 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/CLPoolingLayer.h" |
Georgios Pinitas | dc460f1 | 2017-08-24 19:02:44 +0100 | [diff] [blame] | 28 | #include "tests/CL/CLAccessor.h" |
| 29 | #include "tests/PaddingCalculator.h" |
Georgios Pinitas | 1599787 | 2018-02-19 13:58:22 +0000 | [diff] [blame] | 30 | #include "tests/datasets/PoolingLayerDataset.h" |
Moritz Pflanzer | a09de0c | 2017-09-01 20:41:12 +0100 | [diff] [blame] | 31 | #include "tests/datasets/PoolingTypesDataset.h" |
| 32 | #include "tests/datasets/ShapeDatasets.h" |
| 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" |
| 37 | #include "tests/validation/fixtures/PoolingLayerFixture.h" |
Georgios Pinitas | dc460f1 | 2017-08-24 19:02:44 +0100 | [diff] [blame] | 38 | |
| 39 | namespace arm_compute |
| 40 | { |
| 41 | namespace test |
| 42 | { |
| 43 | namespace validation |
| 44 | { |
| 45 | namespace |
| 46 | { |
Michalis Spyrou | 064add6 | 2018-11-01 18:14:27 +0000 | [diff] [blame] | 47 | /** Input data sets for floating-point data types */ |
Michalis Spyrou | 5ce99a2 | 2019-01-25 14:17:49 +0000 | [diff] [blame] | 48 | const auto PoolingLayerDatasetFP = combine(combine(combine(datasets::PoolingTypes(), framework::dataset::make("PoolingSize", { Size2D(2, 2), Size2D(3, 3), Size2D(5, 7) })), |
Georgios Pinitas | adaae7e | 2017-10-30 15:56:32 +0000 | [diff] [blame] | 49 | framework::dataset::make("PadStride", { PadStrideInfo(1, 1, 0, 0), PadStrideInfo(2, 1, 0, 0), PadStrideInfo(1, 2, 1, 1), PadStrideInfo(2, 2, 1, 0) })), |
| 50 | framework::dataset::make("ExcludePadding", { true, false })); |
Georgios Pinitas | dc460f1 | 2017-08-24 19:02:44 +0100 | [diff] [blame] | 51 | |
Michalis Spyrou | 8094325 | 2019-01-10 17:19:50 +0000 | [diff] [blame] | 52 | const auto PoolingLayerDatasetFPSmall = combine(combine(combine(datasets::PoolingTypes(), framework::dataset::make("PoolingSize", { Size2D(2, 2), Size2D(3, 3) })), |
| 53 | framework::dataset::make("PadStride", { PadStrideInfo(1, 1, 0, 0), PadStrideInfo(2, 1, 0, 0) })), |
Michalis Spyrou | 064add6 | 2018-11-01 18:14:27 +0000 | [diff] [blame] | 54 | framework::dataset::make("ExcludePadding", { true, false })); |
| 55 | |
| 56 | /** Input data sets for asymmetric data type */ |
| 57 | const auto PoolingLayerDatasetQASYMM8 = combine(concat(combine(combine(framework::dataset::make("PoolingType", |
| 58 | { |
| 59 | PoolingType::MAX, PoolingType::AVG, |
| 60 | }), |
Michalis Spyrou | 5ce99a2 | 2019-01-25 14:17:49 +0000 | [diff] [blame] | 61 | framework::dataset::make("PoolingSize", { Size2D(2, 2), Size2D(3, 3) })), |
| 62 | framework::dataset::make("PadStride", { PadStrideInfo(1, 1, 0, 0), PadStrideInfo(1, 2, 1, 1), PadStrideInfo(2, 2, 1, 0) })), |
| 63 | combine(combine(framework::dataset::make("PoolingType", { PoolingType::AVG }), framework::dataset::make("PoolingSize", { Size2D(5, 7) })), framework::dataset::make("PadStride", { PadStrideInfo(2, 1, 0, 0) }))), |
Michalis Spyrou | 064add6 | 2018-11-01 18:14:27 +0000 | [diff] [blame] | 64 | framework::dataset::make("ExcludePadding", { true })); |
| 65 | |
| 66 | const auto PoolingLayerDatasetQASYMM8Small = combine(combine(combine(framework::dataset::make("PoolingType", |
| 67 | { |
| 68 | PoolingType::MAX, PoolingType::AVG, |
| 69 | }), |
Michalis Spyrou | 8094325 | 2019-01-10 17:19:50 +0000 | [diff] [blame] | 70 | framework::dataset::make("PoolingSize", { Size2D(2, 2), Size2D(5, 7) })), |
| 71 | framework::dataset::make("PadStride", { PadStrideInfo(1, 2, 1, 1) })), |
Michalis Spyrou | 064add6 | 2018-11-01 18:14:27 +0000 | [diff] [blame] | 72 | framework::dataset::make("ExcludePadding", { true })); |
Anton Lokhmotov | af6204c | 2017-11-08 09:34:19 +0000 | [diff] [blame] | 73 | |
Sheri Zhang | 801bbcb | 2020-08-03 20:11:56 +0100 | [diff] [blame] | 74 | const auto PoolingLayerDatasetFPIndicesSmall = combine(combine(combine(framework::dataset::make("PoolingType", |
| 75 | { PoolingType::MAX }), |
| 76 | framework::dataset::make("PoolingSize", { Size2D(2, 2) })), |
| 77 | framework::dataset::make("PadStride", { PadStrideInfo(1, 1, 0, 0), PadStrideInfo(2, 2, 0, 0) })), |
| 78 | framework::dataset::make("ExcludePadding", { true, false })); |
| 79 | |
Michele Di Giorgio | cbbed28 | 2019-12-20 13:26:08 +0000 | [diff] [blame] | 80 | constexpr AbsoluteTolerance<float> tolerance_f32(0.001f); /**< Tolerance value for comparing reference's output against implementation's output for 32-bit floating-point type */ |
| 81 | constexpr AbsoluteTolerance<float> tolerance_f16(0.01f); /**< Tolerance value for comparing reference's output against implementation's output for 16-bit floating-point type */ |
| 82 | constexpr AbsoluteTolerance<uint8_t> tolerance_qasymm8(1); /**< Tolerance value for comparing reference's output against implementation's output for 8-bit asymmetric type */ |
| 83 | constexpr AbsoluteTolerance<int8_t> tolerance_qasymm8_s(1); /**< Tolerance value for comparing reference's output against implementation's output for 8-bit signed asymmetric type */ |
Pablo Tello | a52e4cf | 2019-04-01 14:55:18 +0100 | [diff] [blame] | 84 | const auto pool_data_layout_dataset = framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC }); |
| 85 | |
Sang-Hoon Park | 2aa7fd0 | 2019-09-18 13:39:00 +0100 | [diff] [blame] | 86 | const auto pool_fp_mixed_precision_dataset = framework::dataset::make("FpMixedPrecision", { true, false }); |
| 87 | |
Georgios Pinitas | dc460f1 | 2017-08-24 19:02:44 +0100 | [diff] [blame] | 88 | } // namespace |
| 89 | |
| 90 | TEST_SUITE(CL) |
| 91 | TEST_SUITE(PoolingLayer) |
| 92 | |
Georgios Pinitas | 3faea25 | 2017-10-30 14:13:50 +0000 | [diff] [blame] | 93 | // *INDENT-OFF* |
| 94 | // clang-format off |
| 95 | DATA_TEST_CASE(Validate, framework::DatasetMode::ALL, zip(zip(zip( |
Vidhya Sudhan Loganathan | 7485d5a | 2018-07-04 09:34:00 +0100 | [diff] [blame] | 96 | framework::dataset::make("InputInfo", { TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), // Mismatching data type |
Vidhya Sudhan Loganathan | 7485d5a | 2018-07-04 09:34:00 +0100 | [diff] [blame] | 97 | TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), // Invalid pad/size combination |
| 98 | TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), // Invalid pad/size combination |
| 99 | TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::QASYMM8), // Invalid parameters |
| 100 | TensorInfo(TensorShape(15U, 13U, 5U), 1, DataType::F32), // Non-rectangular Global Pooling |
| 101 | TensorInfo(TensorShape(13U, 13U, 5U), 1, DataType::F32), // Invalid output Global Pooling |
Gian Marco Iodice | 7333e1f | 2020-10-08 10:25:49 +0100 | [diff] [blame] | 102 | TensorInfo(TensorShape(13U, 13U, 5U), 1, DataType::QASYMM8), |
Vidhya Sudhan Loganathan | 7485d5a | 2018-07-04 09:34:00 +0100 | [diff] [blame] | 103 | TensorInfo(TensorShape(13U, 13U, 5U), 1, DataType::F32), |
Georgios Pinitas | 3faea25 | 2017-10-30 14:13:50 +0000 | [diff] [blame] | 104 | }), |
Vidhya Sudhan Loganathan | 7485d5a | 2018-07-04 09:34:00 +0100 | [diff] [blame] | 105 | framework::dataset::make("OutputInfo",{ TensorInfo(TensorShape(25U, 11U, 2U), 1, DataType::F16), |
Vidhya Sudhan Loganathan | 7485d5a | 2018-07-04 09:34:00 +0100 | [diff] [blame] | 106 | TensorInfo(TensorShape(30U, 11U, 2U), 1, DataType::F32), |
| 107 | TensorInfo(TensorShape(25U, 16U, 2U), 1, DataType::F32), |
| 108 | TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::QASYMM8), |
| 109 | TensorInfo(TensorShape(1U, 1U, 5U), 1, DataType::F32), |
| 110 | TensorInfo(TensorShape(2U, 2U, 5U), 1, DataType::F32), |
Michele Di Giorgio | 2c87719 | 2020-02-18 19:06:27 +0000 | [diff] [blame] | 111 | TensorInfo(TensorShape(12U, 12U, 5U), 1, DataType::QASYMM8), |
Vidhya Sudhan Loganathan | 7485d5a | 2018-07-04 09:34:00 +0100 | [diff] [blame] | 112 | TensorInfo(TensorShape(1U, 1U, 5U), 1, DataType::F32), |
Georgios Pinitas | 3faea25 | 2017-10-30 14:13:50 +0000 | [diff] [blame] | 113 | })), |
Sang-Hoon Park | 11fedda | 2020-01-15 14:44:04 +0000 | [diff] [blame] | 114 | framework::dataset::make("PoolInfo", { PoolingLayerInfo(PoolingType::AVG, 3, DataLayout::NCHW, PadStrideInfo(1, 1, 0, 0)), |
Sang-Hoon Park | 11fedda | 2020-01-15 14:44:04 +0000 | [diff] [blame] | 115 | PoolingLayerInfo(PoolingType::AVG, 2, DataLayout::NCHW, PadStrideInfo(1, 1, 2, 0)), |
| 116 | PoolingLayerInfo(PoolingType::AVG, 2, DataLayout::NCHW, PadStrideInfo(1, 1, 0, 2)), |
| 117 | PoolingLayerInfo(PoolingType::L2, 3, DataLayout::NCHW, PadStrideInfo(1, 1, 0, 0)), |
| 118 | PoolingLayerInfo(PoolingType::AVG, DataLayout::NCHW), |
| 119 | PoolingLayerInfo(PoolingType::MAX, DataLayout::NCHW), |
Michele Di Giorgio | 2c87719 | 2020-02-18 19:06:27 +0000 | [diff] [blame] | 120 | PoolingLayerInfo(PoolingType::AVG, 2, DataLayout::NHWC, PadStrideInfo(), false), |
Sang-Hoon Park | 11fedda | 2020-01-15 14:44:04 +0000 | [diff] [blame] | 121 | PoolingLayerInfo(PoolingType::AVG, DataLayout::NCHW), |
Georgios Pinitas | 3faea25 | 2017-10-30 14:13:50 +0000 | [diff] [blame] | 122 | })), |
Gian Marco Iodice | 7333e1f | 2020-10-08 10:25:49 +0100 | [diff] [blame] | 123 | framework::dataset::make("Expected", { false, false, false, false, true, false, true, true })), |
Georgios Pinitas | 3faea25 | 2017-10-30 14:13:50 +0000 | [diff] [blame] | 124 | input_info, output_info, pool_info, expected) |
| 125 | { |
Giorgio Arena | 9f26b3e | 2017-11-28 14:35:00 +0000 | [diff] [blame] | 126 | ARM_COMPUTE_EXPECT(bool(CLPoolingLayer::validate(&input_info.clone()->set_is_resizable(false), &output_info.clone()->set_is_resizable(false), pool_info)) == expected, framework::LogLevel::ERRORS); |
Georgios Pinitas | 3faea25 | 2017-10-30 14:13:50 +0000 | [diff] [blame] | 127 | } |
Gian Marco Iodice | 7333e1f | 2020-10-08 10:25:49 +0100 | [diff] [blame] | 128 | |
Georgios Pinitas | 3faea25 | 2017-10-30 14:13:50 +0000 | [diff] [blame] | 129 | // clang-format on |
| 130 | // *INDENT-ON* |
| 131 | |
Georgios Pinitas | dc460f1 | 2017-08-24 19:02:44 +0100 | [diff] [blame] | 132 | template <typename T> |
| 133 | using CLPoolingLayerFixture = PoolingLayerValidationFixture<CLTensor, CLAccessor, CLPoolingLayer, T>; |
| 134 | |
Georgios Pinitas | 1599787 | 2018-02-19 13:58:22 +0000 | [diff] [blame] | 135 | template <typename T> |
| 136 | using CLSpecialPoolingLayerFixture = SpecialPoolingLayerValidationFixture<CLTensor, CLAccessor, CLPoolingLayer, T>; |
| 137 | |
Sang-Hoon Park | 2aa7fd0 | 2019-09-18 13:39:00 +0100 | [diff] [blame] | 138 | template <typename T> |
| 139 | using CLMixedPrecesionPoolingLayerFixture = PoolingLayerValidationMixedPrecisionFixture<CLTensor, CLAccessor, CLPoolingLayer, T>; |
| 140 | |
Sheri Zhang | 801bbcb | 2020-08-03 20:11:56 +0100 | [diff] [blame] | 141 | template <typename T> |
| 142 | using CLPoolingLayerIndicesFixture = PoolingLayerIndicesValidationFixture<CLTensor, CLAccessor, CLPoolingLayer, T>; |
| 143 | |
Georgios Pinitas | dc460f1 | 2017-08-24 19:02:44 +0100 | [diff] [blame] | 144 | TEST_SUITE(Float) |
| 145 | TEST_SUITE(FP32) |
Georgios Pinitas | 1599787 | 2018-02-19 13:58:22 +0000 | [diff] [blame] | 146 | FIXTURE_DATA_TEST_CASE(RunSpecial, CLSpecialPoolingLayerFixture<float>, framework::DatasetMode::ALL, datasets::PoolingLayerDatasetSpecial() * framework::dataset::make("DataType", DataType::F32)) |
Diego Lopez Recas | 61ef5bf | 2017-12-11 12:36:55 +0000 | [diff] [blame] | 147 | { |
| 148 | // Validate output |
| 149 | validate(CLAccessor(_target), _reference, tolerance_f32); |
| 150 | } |
Michalis Spyrou | 064add6 | 2018-11-01 18:14:27 +0000 | [diff] [blame] | 151 | FIXTURE_DATA_TEST_CASE(RunSmall, CLPoolingLayerFixture<float>, framework::DatasetMode::PRECOMMIT, combine(combine(datasets::SmallShapes(), combine(PoolingLayerDatasetFPSmall, |
| 152 | framework::dataset::make("DataType", |
| 153 | DataType::F32))), |
Pablo Tello | a52e4cf | 2019-04-01 14:55:18 +0100 | [diff] [blame] | 154 | pool_data_layout_dataset)) |
Georgios Pinitas | dc460f1 | 2017-08-24 19:02:44 +0100 | [diff] [blame] | 155 | { |
| 156 | // Validate output |
| 157 | validate(CLAccessor(_target), _reference, tolerance_f32); |
| 158 | } |
Michalis Spyrou | 57dac84 | 2018-03-01 16:03:50 +0000 | [diff] [blame] | 159 | FIXTURE_DATA_TEST_CASE(RunLarge, CLPoolingLayerFixture<float>, framework::DatasetMode::NIGHTLY, combine(combine(datasets::LargeShapes(), combine(PoolingLayerDatasetFP, |
| 160 | framework::dataset::make("DataType", |
| 161 | DataType::F32))), |
Pablo Tello | a52e4cf | 2019-04-01 14:55:18 +0100 | [diff] [blame] | 162 | pool_data_layout_dataset)) |
Georgios Pinitas | dc460f1 | 2017-08-24 19:02:44 +0100 | [diff] [blame] | 163 | { |
| 164 | // Validate output |
| 165 | validate(CLAccessor(_target), _reference, tolerance_f32); |
| 166 | } |
Sheri Zhang | 801bbcb | 2020-08-03 20:11:56 +0100 | [diff] [blame] | 167 | |
| 168 | FIXTURE_DATA_TEST_CASE(RunSmallIndices, CLPoolingLayerIndicesFixture<float>, framework::DatasetMode::PRECOMMIT, combine(combine(datasets::SmallShapes(), combine(PoolingLayerDatasetFPIndicesSmall, |
| 169 | framework::dataset::make("DataType", |
| 170 | DataType::F32))), |
| 171 | pool_data_layout_dataset)) |
| 172 | { |
| 173 | // Validate output |
| 174 | validate(CLAccessor(_target), _reference, tolerance_f32); |
| 175 | validate(CLAccessor(_target_indices), _ref_indices); |
| 176 | } |
| 177 | |
Michalis Spyrou | 57dac84 | 2018-03-01 16:03:50 +0000 | [diff] [blame] | 178 | TEST_SUITE_END() // FP32 |
Georgios Pinitas | dc460f1 | 2017-08-24 19:02:44 +0100 | [diff] [blame] | 179 | |
| 180 | TEST_SUITE(FP16) |
Sang-Hoon Park | 2aa7fd0 | 2019-09-18 13:39:00 +0100 | [diff] [blame] | 181 | FIXTURE_DATA_TEST_CASE(RunSmall, CLMixedPrecesionPoolingLayerFixture<half>, framework::DatasetMode::PRECOMMIT, combine(combine(combine(datasets::SmallShapes(), combine(PoolingLayerDatasetFPSmall, |
| 182 | framework::dataset::make("DataType", DataType::F16))), |
| 183 | pool_data_layout_dataset), |
| 184 | pool_fp_mixed_precision_dataset)) |
Georgios Pinitas | dc460f1 | 2017-08-24 19:02:44 +0100 | [diff] [blame] | 185 | { |
| 186 | // Validate output |
| 187 | validate(CLAccessor(_target), _reference, tolerance_f16); |
| 188 | } |
Sang-Hoon Park | 2aa7fd0 | 2019-09-18 13:39:00 +0100 | [diff] [blame] | 189 | FIXTURE_DATA_TEST_CASE(RunLarge, CLMixedPrecesionPoolingLayerFixture<half>, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::LargeShapes(), combine(PoolingLayerDatasetFP, |
| 190 | framework::dataset::make("DataType", DataType::F16))), |
| 191 | pool_data_layout_dataset), |
| 192 | pool_fp_mixed_precision_dataset)) |
Georgios Pinitas | dc460f1 | 2017-08-24 19:02:44 +0100 | [diff] [blame] | 193 | { |
| 194 | // Validate output |
| 195 | validate(CLAccessor(_target), _reference, tolerance_f16); |
| 196 | } |
Sheri Zhang | 801bbcb | 2020-08-03 20:11:56 +0100 | [diff] [blame] | 197 | FIXTURE_DATA_TEST_CASE(RunSmallIndices, CLPoolingLayerIndicesFixture<half>, framework::DatasetMode::PRECOMMIT, combine(combine(datasets::SmallShapes(), combine(PoolingLayerDatasetFPIndicesSmall, |
| 198 | framework::dataset::make("DataType", |
| 199 | DataType::F16))), |
| 200 | pool_data_layout_dataset)) |
| 201 | { |
| 202 | // Validate output |
| 203 | validate(CLAccessor(_target), _reference, tolerance_f32); |
| 204 | validate(CLAccessor(_target_indices), _ref_indices); |
| 205 | } |
Michalis Spyrou | 57dac84 | 2018-03-01 16:03:50 +0000 | [diff] [blame] | 206 | TEST_SUITE_END() // FP16 |
| 207 | TEST_SUITE_END() // Float |
Georgios Pinitas | dc460f1 | 2017-08-24 19:02:44 +0100 | [diff] [blame] | 208 | |
Anton Lokhmotov | af6204c | 2017-11-08 09:34:19 +0000 | [diff] [blame] | 209 | TEST_SUITE(Quantized) |
| 210 | |
| 211 | template <typename T> |
| 212 | using CLPoolingLayerQuantizedFixture = PoolingLayerValidationQuantizedFixture<CLTensor, CLAccessor, CLPoolingLayer, T>; |
| 213 | |
| 214 | TEST_SUITE(QASYMM8) |
Pablo Tello | a52e4cf | 2019-04-01 14:55:18 +0100 | [diff] [blame] | 215 | FIXTURE_DATA_TEST_CASE(RunSmall, CLPoolingLayerQuantizedFixture<uint8_t>, framework::DatasetMode::PRECOMMIT, combine(combine(datasets::SmallShapes(), combine(PoolingLayerDatasetQASYMM8Small, |
Michalis Spyrou | 064add6 | 2018-11-01 18:14:27 +0000 | [diff] [blame] | 216 | framework::dataset::make("DataType", DataType::QASYMM8))), |
Pablo Tello | a52e4cf | 2019-04-01 14:55:18 +0100 | [diff] [blame] | 217 | pool_data_layout_dataset)) |
Anton Lokhmotov | af6204c | 2017-11-08 09:34:19 +0000 | [diff] [blame] | 218 | { |
| 219 | // Validate output |
| 220 | validate(CLAccessor(_target), _reference, tolerance_qasymm8); |
| 221 | } |
Michele Di Giorgio | cbbed28 | 2019-12-20 13:26:08 +0000 | [diff] [blame] | 222 | TEST_SUITE_END() // QASYMM8 |
| 223 | |
| 224 | TEST_SUITE(QASYMM8_SIGNED) |
| 225 | FIXTURE_DATA_TEST_CASE(RunSmall, CLPoolingLayerQuantizedFixture<int8_t>, framework::DatasetMode::PRECOMMIT, combine(combine(datasets::SmallShapes(), combine(PoolingLayerDatasetQASYMM8Small, |
| 226 | framework::dataset::make("DataType", DataType::QASYMM8_SIGNED))), |
| 227 | pool_data_layout_dataset)) |
Anton Lokhmotov | af6204c | 2017-11-08 09:34:19 +0000 | [diff] [blame] | 228 | { |
| 229 | // Validate output |
Michele Di Giorgio | cbbed28 | 2019-12-20 13:26:08 +0000 | [diff] [blame] | 230 | validate(CLAccessor(_target), _reference, tolerance_qasymm8_s); |
Anton Lokhmotov | af6204c | 2017-11-08 09:34:19 +0000 | [diff] [blame] | 231 | } |
Michele Di Giorgio | cbbed28 | 2019-12-20 13:26:08 +0000 | [diff] [blame] | 232 | TEST_SUITE_END() // QASYMM8_SIGNED |
Michalis Spyrou | 57dac84 | 2018-03-01 16:03:50 +0000 | [diff] [blame] | 233 | TEST_SUITE_END() // Quantized |
Michalis Spyrou | 57dac84 | 2018-03-01 16:03:50 +0000 | [diff] [blame] | 234 | TEST_SUITE_END() // PoolingLayer |
| 235 | TEST_SUITE_END() // CL |
Georgios Pinitas | dc460f1 | 2017-08-24 19:02:44 +0100 | [diff] [blame] | 236 | } // namespace validation |
| 237 | } // namespace test |
| 238 | } // namespace arm_compute |