Sanghoon Lee | 70f8291 | 2017-08-24 14:21:24 +0100 | [diff] [blame] | 1 | /* |
Georgios Pinitas | 5a59453 | 2018-12-03 14:30:05 +0000 | [diff] [blame^] | 2 | * Copyright (c) 2017-2019 ARM Limited. |
Sanghoon Lee | 70f8291 | 2017-08-24 14:21:24 +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, |
Georgios Pinitas | 5a59453 | 2018-12-03 14:30:05 +0000 | [diff] [blame^] | 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
Sanghoon Lee | 70f8291 | 2017-08-24 14:21:24 +0100 | [diff] [blame] | 22 | * SOFTWARE. |
| 23 | */ |
| 24 | #include "arm_compute/core/Types.h" |
| 25 | #include "arm_compute/runtime/NEON/functions/NEArithmeticAddition.h" |
| 26 | #include "arm_compute/runtime/Tensor.h" |
| 27 | #include "arm_compute/runtime/TensorAllocator.h" |
| 28 | #include "tests/NEON/Accessor.h" |
| 29 | #include "tests/PaddingCalculator.h" |
| 30 | #include "tests/datasets/ConvertPolicyDataset.h" |
| 31 | #include "tests/datasets/ShapeDatasets.h" |
| 32 | #include "tests/framework/Asserts.h" |
| 33 | #include "tests/framework/Macros.h" |
| 34 | #include "tests/framework/datasets/Datasets.h" |
| 35 | #include "tests/validation/Validation.h" |
Georgios Pinitas | cbf39c6 | 2018-09-10 15:07:45 +0100 | [diff] [blame] | 36 | #include "tests/validation/fixtures/ArithmeticOperationsFixture.h" |
Sanghoon Lee | 70f8291 | 2017-08-24 14:21:24 +0100 | [diff] [blame] | 37 | |
| 38 | namespace arm_compute |
| 39 | { |
| 40 | namespace test |
| 41 | { |
| 42 | namespace validation |
| 43 | { |
| 44 | namespace |
| 45 | { |
Georgios Pinitas | a84faff | 2018-12-05 18:17:24 +0000 | [diff] [blame] | 46 | constexpr AbsoluteTolerance<float> tolerance_qasymm8(1); /**< Tolerance value for comparing reference's output against implementation's output for quantized data types */ |
| 47 | |
Sanghoon Lee | 70f8291 | 2017-08-24 14:21:24 +0100 | [diff] [blame] | 48 | /** Input data sets **/ |
| 49 | const auto ArithmeticAdditionU8Dataset = combine(combine(framework::dataset::make("DataType", DataType::U8), framework::dataset::make("DataType", DataType::U8)), framework::dataset::make("DataType", |
| 50 | DataType::U8)); |
| 51 | const auto ArithmeticAdditionS16Dataset = combine(combine(framework::dataset::make("DataType", { DataType::U8, DataType::S16 }), framework::dataset::make("DataType", DataType::S16)), |
| 52 | framework::dataset::make("DataType", DataType::S16)); |
Ioan-Cristian Szabo | 5edbd1c | 2017-11-13 13:34:08 +0000 | [diff] [blame] | 53 | #ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC |
Sanghoon Lee | 70f8291 | 2017-08-24 14:21:24 +0100 | [diff] [blame] | 54 | const auto ArithmeticAdditionFP16Dataset = combine(combine(framework::dataset::make("DataType", DataType::F16), framework::dataset::make("DataType", DataType::F16)), |
| 55 | framework::dataset::make("DataType", DataType::F16)); |
Ioan-Cristian Szabo | 5edbd1c | 2017-11-13 13:34:08 +0000 | [diff] [blame] | 56 | #endif /* __ARM_FEATURE_FP16_VECTOR_ARITHMETIC */ |
Sanghoon Lee | 70f8291 | 2017-08-24 14:21:24 +0100 | [diff] [blame] | 57 | const auto ArithmeticAdditionFP32Dataset = combine(combine(framework::dataset::make("DataType", DataType::F32), framework::dataset::make("DataType", DataType::F32)), |
| 58 | framework::dataset::make("DataType", DataType::F32)); |
Georgios Pinitas | a84faff | 2018-12-05 18:17:24 +0000 | [diff] [blame] | 59 | const auto ArithmeticAdditionQASYMM8Dataset = combine(combine(framework::dataset::make("DataType", DataType::QASYMM8), framework::dataset::make("DataType", DataType::QASYMM8)), |
| 60 | framework::dataset::make("DataType", DataType::QASYMM8)); |
Sanghoon Lee | 70f8291 | 2017-08-24 14:21:24 +0100 | [diff] [blame] | 61 | } // namespace |
| 62 | |
| 63 | TEST_SUITE(NEON) |
| 64 | TEST_SUITE(ArithmeticAddition) |
| 65 | |
| 66 | template <typename T> |
| 67 | using NEArithmeticAdditionFixture = ArithmeticAdditionValidationFixture<Tensor, Accessor, NEArithmeticAddition, T>; |
| 68 | |
Ioan-Cristian Szabo | 397d58a | 2017-11-30 15:19:11 +0000 | [diff] [blame] | 69 | // *INDENT-OFF* |
| 70 | // clang-format off |
| 71 | DATA_TEST_CASE(Validate, framework::DatasetMode::ALL, zip(zip(zip( |
| 72 | framework::dataset::make("Input1Info", { TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::U8), |
| 73 | TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::U8), |
Georgios Pinitas | 5a59453 | 2018-12-03 14:30:05 +0000 | [diff] [blame^] | 74 | TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::U8), // Unsupported broadcast |
| 75 | TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::U8), // Invalid data type combination |
| 76 | TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::F32),// Mismatching shapes |
Ioan-Cristian Szabo | 397d58a | 2017-11-30 15:19:11 +0000 | [diff] [blame] | 77 | }), |
| 78 | framework::dataset::make("Input2Info",{ TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::U8), |
| 79 | TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::U8), |
Georgios Pinitas | 5a59453 | 2018-12-03 14:30:05 +0000 | [diff] [blame^] | 80 | TensorInfo(TensorShape(1U, 13U, 2U), 1, DataType::S16), |
Ioan-Cristian Szabo | 397d58a | 2017-11-30 15:19:11 +0000 | [diff] [blame] | 81 | TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::S16), |
| 82 | TensorInfo(TensorShape(48U, 11U, 2U), 1, DataType::F32), |
Ioan-Cristian Szabo | 397d58a | 2017-11-30 15:19:11 +0000 | [diff] [blame] | 83 | })), |
| 84 | framework::dataset::make("OutputInfo",{ TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::S16), |
| 85 | TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::U8), |
Georgios Pinitas | 5a59453 | 2018-12-03 14:30:05 +0000 | [diff] [blame^] | 86 | TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::S16), |
Ioan-Cristian Szabo | 397d58a | 2017-11-30 15:19:11 +0000 | [diff] [blame] | 87 | TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::U8), |
| 88 | TensorInfo(TensorShape(48U, 11U, 2U), 1, DataType::F32), |
Ioan-Cristian Szabo | 397d58a | 2017-11-30 15:19:11 +0000 | [diff] [blame] | 89 | })), |
Vidhya Sudhan Loganathan | 0fc2545 | 2018-06-18 14:40:56 +0100 | [diff] [blame] | 90 | framework::dataset::make("Expected", { true, true, false, false, false})), |
Ioan-Cristian Szabo | 397d58a | 2017-11-30 15:19:11 +0000 | [diff] [blame] | 91 | input1_info, input2_info, output_info, expected) |
| 92 | { |
Georgios Pinitas | 5a59453 | 2018-12-03 14:30:05 +0000 | [diff] [blame^] | 93 | Status s = NEArithmeticAddition::validate(&input1_info.clone()->set_is_resizable(false), |
| 94 | &input2_info.clone()->set_is_resizable(false), |
| 95 | &output_info.clone()->set_is_resizable(false), |
| 96 | ConvertPolicy::WRAP); |
| 97 | ARM_COMPUTE_EXPECT(bool(s) == expected, framework::LogLevel::ERRORS); |
Ioan-Cristian Szabo | 397d58a | 2017-11-30 15:19:11 +0000 | [diff] [blame] | 98 | } |
| 99 | // clang-format on |
| 100 | // *INDENT-ON* |
| 101 | |
Georgios Pinitas | a84faff | 2018-12-05 18:17:24 +0000 | [diff] [blame] | 102 | TEST_SUITE(Integer) |
Sanghoon Lee | 70f8291 | 2017-08-24 14:21:24 +0100 | [diff] [blame] | 103 | TEST_SUITE(U8) |
| 104 | DATA_TEST_CASE(Configuration, framework::DatasetMode::ALL, combine(framework::dataset::concat(datasets::SmallShapes(), datasets::LargeShapes()), framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP })), |
| 105 | shape, policy) |
| 106 | { |
| 107 | // Create tensors |
| 108 | Tensor ref_src1 = create_tensor<Tensor>(shape, DataType::U8); |
| 109 | Tensor ref_src2 = create_tensor<Tensor>(shape, DataType::U8); |
| 110 | Tensor dst = create_tensor<Tensor>(shape, DataType::U8); |
| 111 | |
| 112 | // Create and Configure function |
| 113 | NEArithmeticAddition add; |
| 114 | add.configure(&ref_src1, &ref_src2, &dst, policy); |
| 115 | |
| 116 | // Validate valid region |
| 117 | const ValidRegion valid_region = shape_to_valid_region(shape); |
| 118 | validate(dst.info()->valid_region(), valid_region); |
| 119 | |
| 120 | // Validate padding |
Georgios Pinitas | 5a59453 | 2018-12-03 14:30:05 +0000 | [diff] [blame^] | 121 | validate(ref_src1.info()->padding(), PaddingSize()); |
| 122 | validate(ref_src2.info()->padding(), PaddingSize()); |
| 123 | validate(dst.info()->padding(), PaddingSize()); |
Sanghoon Lee | 70f8291 | 2017-08-24 14:21:24 +0100 | [diff] [blame] | 124 | } |
| 125 | |
| 126 | FIXTURE_DATA_TEST_CASE(RunSmall, NEArithmeticAdditionFixture<uint8_t>, framework::DatasetMode::PRECOMMIT, combine(combine(datasets::SmallShapes(), ArithmeticAdditionU8Dataset), |
| 127 | framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP }))) |
| 128 | { |
| 129 | // Validate output |
| 130 | validate(Accessor(_target), _reference); |
| 131 | } |
Georgios Pinitas | a84faff | 2018-12-05 18:17:24 +0000 | [diff] [blame] | 132 | TEST_SUITE_END() // U8 |
Sanghoon Lee | 70f8291 | 2017-08-24 14:21:24 +0100 | [diff] [blame] | 133 | |
| 134 | TEST_SUITE(S16) |
| 135 | DATA_TEST_CASE(Configuration, framework::DatasetMode::ALL, combine(combine(framework::dataset::concat(datasets::SmallShapes(), datasets::LargeShapes()), framework::dataset::make("DataType", { DataType::U8, DataType::S16 })), |
| 136 | framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP })), |
| 137 | shape, data_type, policy) |
| 138 | { |
| 139 | // Create tensors |
| 140 | Tensor ref_src1 = create_tensor<Tensor>(shape, data_type); |
| 141 | Tensor ref_src2 = create_tensor<Tensor>(shape, DataType::S16); |
| 142 | Tensor dst = create_tensor<Tensor>(shape, DataType::S16); |
| 143 | |
| 144 | // Create and Configure function |
| 145 | NEArithmeticAddition add; |
| 146 | add.configure(&ref_src1, &ref_src2, &dst, policy); |
| 147 | |
| 148 | // Validate valid region |
| 149 | const ValidRegion valid_region = shape_to_valid_region(shape); |
| 150 | validate(dst.info()->valid_region(), valid_region); |
| 151 | |
| 152 | // Validate padding |
Georgios Pinitas | 5a59453 | 2018-12-03 14:30:05 +0000 | [diff] [blame^] | 153 | validate(ref_src1.info()->padding(), PaddingSize()); |
| 154 | validate(ref_src2.info()->padding(), PaddingSize()); |
| 155 | validate(dst.info()->padding(), PaddingSize()); |
Sanghoon Lee | 70f8291 | 2017-08-24 14:21:24 +0100 | [diff] [blame] | 156 | } |
| 157 | |
| 158 | FIXTURE_DATA_TEST_CASE(RunSmall, NEArithmeticAdditionFixture<int16_t>, framework::DatasetMode::PRECOMMIT, combine(combine(datasets::SmallShapes(), ArithmeticAdditionS16Dataset), |
| 159 | framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP }))) |
| 160 | { |
| 161 | // Validate output |
| 162 | validate(Accessor(_target), _reference); |
| 163 | } |
| 164 | |
| 165 | FIXTURE_DATA_TEST_CASE(RunLarge, NEArithmeticAdditionFixture<int16_t>, framework::DatasetMode::NIGHTLY, combine(combine(datasets::LargeShapes(), ArithmeticAdditionS16Dataset), |
| 166 | framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP }))) |
| 167 | { |
| 168 | // Validate output |
| 169 | validate(Accessor(_target), _reference); |
| 170 | } |
Georgios Pinitas | a84faff | 2018-12-05 18:17:24 +0000 | [diff] [blame] | 171 | TEST_SUITE_END() // S16 |
| 172 | TEST_SUITE_END() // Integer |
Sanghoon Lee | 70f8291 | 2017-08-24 14:21:24 +0100 | [diff] [blame] | 173 | |
Sanghoon Lee | 70f8291 | 2017-08-24 14:21:24 +0100 | [diff] [blame] | 174 | TEST_SUITE(Float) |
Ioan-Cristian Szabo | 5edbd1c | 2017-11-13 13:34:08 +0000 | [diff] [blame] | 175 | #ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC |
Sanghoon Lee | 70f8291 | 2017-08-24 14:21:24 +0100 | [diff] [blame] | 176 | TEST_SUITE(F16) |
Georgios Pinitas | 583137c | 2017-08-31 18:12:42 +0100 | [diff] [blame] | 177 | FIXTURE_DATA_TEST_CASE(RunSmall, NEArithmeticAdditionFixture<half>, framework::DatasetMode::ALL, combine(combine(datasets::SmallShapes(), ArithmeticAdditionFP16Dataset), |
| 178 | framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP }))) |
Sanghoon Lee | 70f8291 | 2017-08-24 14:21:24 +0100 | [diff] [blame] | 179 | { |
| 180 | // Validate output |
| 181 | validate(Accessor(_target), _reference); |
| 182 | } |
Georgios Pinitas | a84faff | 2018-12-05 18:17:24 +0000 | [diff] [blame] | 183 | TEST_SUITE_END() // F16 |
| 184 | #endif /* __ARM_FEATURE_FP16_VECTOR_ARITHMETIC */ |
Sanghoon Lee | 70f8291 | 2017-08-24 14:21:24 +0100 | [diff] [blame] | 185 | |
| 186 | TEST_SUITE(F32) |
| 187 | DATA_TEST_CASE(Configuration, framework::DatasetMode::ALL, combine(framework::dataset::concat(datasets::SmallShapes(), datasets::LargeShapes()), framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP })), |
| 188 | shape, policy) |
| 189 | { |
| 190 | // Create tensors |
| 191 | Tensor ref_src1 = create_tensor<Tensor>(shape, DataType::F32); |
| 192 | Tensor ref_src2 = create_tensor<Tensor>(shape, DataType::F32); |
| 193 | Tensor dst = create_tensor<Tensor>(shape, DataType::F32); |
| 194 | |
| 195 | // Create and Configure function |
| 196 | NEArithmeticAddition add; |
| 197 | add.configure(&ref_src1, &ref_src2, &dst, policy); |
| 198 | |
| 199 | // Validate valid region |
| 200 | const ValidRegion valid_region = shape_to_valid_region(shape); |
| 201 | validate(dst.info()->valid_region(), valid_region); |
| 202 | |
| 203 | // Validate padding |
Georgios Pinitas | 5a59453 | 2018-12-03 14:30:05 +0000 | [diff] [blame^] | 204 | validate(ref_src1.info()->padding(), PaddingSize()); |
| 205 | validate(ref_src2.info()->padding(), PaddingSize()); |
| 206 | validate(dst.info()->padding(), PaddingSize()); |
Sanghoon Lee | 70f8291 | 2017-08-24 14:21:24 +0100 | [diff] [blame] | 207 | } |
| 208 | |
| 209 | FIXTURE_DATA_TEST_CASE(RunSmall, NEArithmeticAdditionFixture<float>, framework::DatasetMode::PRECOMMIT, combine(combine(datasets::SmallShapes(), ArithmeticAdditionFP32Dataset), |
| 210 | framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP }))) |
| 211 | { |
| 212 | // Validate output |
| 213 | validate(Accessor(_target), _reference); |
| 214 | } |
| 215 | |
| 216 | FIXTURE_DATA_TEST_CASE(RunLarge, NEArithmeticAdditionFixture<float>, framework::DatasetMode::NIGHTLY, combine(combine(datasets::LargeShapes(), ArithmeticAdditionFP32Dataset), |
| 217 | framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP }))) |
| 218 | { |
| 219 | // Validate output |
| 220 | validate(Accessor(_target), _reference); |
| 221 | } |
Diego Lopez Recas | 0021d75 | 2017-12-18 14:42:56 +0000 | [diff] [blame] | 222 | |
| 223 | template <typename T> |
| 224 | using NEArithmeticAdditionBroadcastFixture = ArithmeticAdditionBroadcastValidationFixture<Tensor, Accessor, NEArithmeticAddition, T>; |
| 225 | |
| 226 | FIXTURE_DATA_TEST_CASE(RunSmallBroadcast, NEArithmeticAdditionBroadcastFixture<float>, framework::DatasetMode::PRECOMMIT, combine(combine(datasets::SmallShapesBroadcast(), |
| 227 | ArithmeticAdditionFP32Dataset), |
| 228 | framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP }))) |
| 229 | { |
| 230 | // Validate output |
| 231 | validate(Accessor(_target), _reference); |
| 232 | } |
| 233 | |
| 234 | FIXTURE_DATA_TEST_CASE(RunLargeBroadcast, NEArithmeticAdditionBroadcastFixture<float>, framework::DatasetMode::NIGHTLY, combine(combine(datasets::LargeShapesBroadcast(), |
| 235 | ArithmeticAdditionFP32Dataset), |
| 236 | framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP }))) |
| 237 | { |
| 238 | // Validate output |
| 239 | validate(Accessor(_target), _reference); |
| 240 | } |
Georgios Pinitas | a84faff | 2018-12-05 18:17:24 +0000 | [diff] [blame] | 241 | TEST_SUITE_END() // F32 |
| 242 | TEST_SUITE_END() // Float |
Sanghoon Lee | 70f8291 | 2017-08-24 14:21:24 +0100 | [diff] [blame] | 243 | |
Georgios Pinitas | a84faff | 2018-12-05 18:17:24 +0000 | [diff] [blame] | 244 | template <typename T> |
| 245 | using NEArithmeticAdditionQuantizedFixture = ArithmeticAdditionValidationQuantizedFixture<Tensor, Accessor, NEArithmeticAddition, T>; |
| 246 | |
| 247 | TEST_SUITE(Quantized) |
| 248 | TEST_SUITE(QASYMM8) |
| 249 | DATA_TEST_CASE(Configuration, framework::DatasetMode::ALL, combine(framework::dataset::concat(datasets::SmallShapes(), datasets::LargeShapes()), framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP })), |
| 250 | shape, policy) |
| 251 | { |
| 252 | // Create tensors |
| 253 | Tensor ref_src1 = create_tensor<Tensor>(shape, DataType::QASYMM8); |
| 254 | Tensor ref_src2 = create_tensor<Tensor>(shape, DataType::QASYMM8); |
| 255 | Tensor dst = create_tensor<Tensor>(shape, DataType::QASYMM8); |
| 256 | |
| 257 | // Create and Configure function |
| 258 | NEArithmeticAddition add; |
| 259 | add.configure(&ref_src1, &ref_src2, &dst, policy); |
| 260 | |
| 261 | // Validate valid region |
| 262 | const ValidRegion valid_region = shape_to_valid_region(shape); |
| 263 | validate(dst.info()->valid_region(), valid_region); |
| 264 | |
| 265 | // Validate padding |
Georgios Pinitas | 5a59453 | 2018-12-03 14:30:05 +0000 | [diff] [blame^] | 266 | validate(ref_src1.info()->padding(), PaddingSize()); |
| 267 | validate(ref_src2.info()->padding(), PaddingSize()); |
| 268 | validate(dst.info()->padding(), PaddingSize()); |
Georgios Pinitas | a84faff | 2018-12-05 18:17:24 +0000 | [diff] [blame] | 269 | } |
| 270 | |
| 271 | FIXTURE_DATA_TEST_CASE(RunSmall, |
| 272 | NEArithmeticAdditionQuantizedFixture<uint8_t>, |
| 273 | framework::DatasetMode::PRECOMMIT, |
| 274 | combine(combine(combine(combine(combine(datasets::SmallShapes(), ArithmeticAdditionQASYMM8Dataset), |
| 275 | framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE, ConvertPolicy::WRAP })), |
| 276 | framework::dataset::make("QuantizationInfo", { QuantizationInfo(5.f / 255.f, 20) })), |
| 277 | framework::dataset::make("QuantizationInfo", { QuantizationInfo(2.f / 255.f, 10) })), |
| 278 | framework::dataset::make("QuantizationInfo", { QuantizationInfo(1.f / 255.f, 5) }))) |
| 279 | { |
| 280 | // Validate output |
| 281 | validate(Accessor(_target), _reference, tolerance_qasymm8); |
| 282 | } |
| 283 | TEST_SUITE_END() // QASYMM8 |
| 284 | TEST_SUITE_END() // Quantized |
| 285 | |
| 286 | TEST_SUITE_END() // ArithmeticAddition |
| 287 | TEST_SUITE_END() // NEON |
Sanghoon Lee | 70f8291 | 2017-08-24 14:21:24 +0100 | [diff] [blame] | 288 | } // namespace validation |
| 289 | } // namespace test |
| 290 | } // namespace arm_compute |