blob: 7616df9eaa69e3ab378b610b0bb72baaa283425d [file] [log] [blame]
Pablo Tello299025a2017-09-29 11:30:12 +01001/*
2 * Copyright (c) 2017 ARM Limited.
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 */
Gian Marco Iodiceab182122017-10-09 15:05:40 +010024#include "arm_compute/core/NEON/kernels/NEGEMMInterleaveBlockedKernel.h"
Pablo Tello181e6512017-11-15 13:28:27 +000025#include "arm_compute/core/NEON/kernels/arm64/NEGEMMLowpAArch64Kernel.h"
Pablo Tello299025a2017-09-29 11:30:12 +010026#include "arm_compute/core/Types.h"
Pablo Tello181e6512017-11-15 13:28:27 +000027#include "arm_compute/runtime/NEON/functions/NEGEMMLowpAssemblyMatrixMultiplyCore.h"
Gian Marcoe75a02b2017-11-08 12:24:09 +000028#include "arm_compute/runtime/NEON/functions/NEGEMMLowpMatrixMultiplyCore.h"
29#include "arm_compute/runtime/NEON/functions/NEGEMMLowpOutputStage.h"
Pablo Tello299025a2017-09-29 11:30:12 +010030#include "arm_compute/runtime/Tensor.h"
31#include "arm_compute/runtime/TensorAllocator.h"
32#include "tests/NEON/Accessor.h"
Gian Marco Iodiceab182122017-10-09 15:05:40 +010033#include "tests/NEON/Helper.h"
Gian Marcoe75a02b2017-11-08 12:24:09 +000034#include "tests/PaddingCalculator.h"
Gian Marcofa4cacd2017-10-18 17:05:02 +010035#include "tests/datasets/LargeGEMMLowpDataset.h"
Gian Marcoe75a02b2017-11-08 12:24:09 +000036#include "tests/datasets/ShapeDatasets.h"
Gian Marcofa4cacd2017-10-18 17:05:02 +010037#include "tests/datasets/SmallGEMMLowpDataset.h"
Pablo Tello299025a2017-09-29 11:30:12 +010038#include "tests/framework/Asserts.h"
39#include "tests/framework/Macros.h"
40#include "tests/framework/datasets/Datasets.h"
41#include "tests/validation/Validation.h"
Pablo Tellobf2fb952017-09-29 16:43:25 +010042#include "tests/validation/fixtures/GEMMInterleaveBlockedFixture.h"
Pablo Tello181e6512017-11-15 13:28:27 +000043#include "tests/validation/fixtures/GEMMLowpAssemblyFixture.h"
Pablo Tello299025a2017-09-29 11:30:12 +010044#include "tests/validation/fixtures/GEMMLowpFixture.h"
45
46namespace arm_compute
47{
48namespace test
49{
50namespace validation
51{
52namespace
53{
Pablo Tello181e6512017-11-15 13:28:27 +000054const auto data_int_blk = framework::dataset::make("M", 8, 12) * framework::dataset::make("N", 8, 12) * framework::dataset::make("by", 8, 13) * framework::dataset::make("block", 4, 9);
55const auto data_int_blk_tr = framework::dataset::make("M", 8, 17) * framework::dataset::make("N", 8, 14) * framework::dataset::make("by", 12) * framework::dataset::make("block", 4);
56const auto data_matrix_multiply = framework::dataset::make("M", 12, 20) * framework::dataset::make("N", 12, 20) * framework::dataset::make("K", 16);
Pablo Tello299025a2017-09-29 11:30:12 +010057} // namespace
58
59TEST_SUITE(NEON)
Pablo Tello181e6512017-11-15 13:28:27 +000060TEST_SUITE(ASSEMBLY_MATRIX_MULTIPLY)
Michalis Spyrouf3dfa272017-11-21 17:52:12 +000061
62using NEGEMMAssemblyFixture_S8 = GEMMLowpAssemblyFixture<Tensor, Accessor, NEGEMMLowpAssemblyMatrixMultiplyCore, int8_t>;
63using NEGEMMAssemblyFixture_U8 = GEMMLowpAssemblyFixture<Tensor, Accessor, NEGEMMLowpAssemblyMatrixMultiplyCore, uint8_t>;
64
65TEST_SUITE(S8)
66FIXTURE_DATA_TEST_CASE(RunSmall, NEGEMMAssemblyFixture_S8, framework::DatasetMode::PRECOMMIT, data_matrix_multiply)
Pablo Tello181e6512017-11-15 13:28:27 +000067{
68 // Validate output
69 validate(Accessor(_target), _reference);
70}
71TEST_SUITE_END()
72
Michalis Spyrouf3dfa272017-11-21 17:52:12 +000073TEST_SUITE(U8)
74FIXTURE_DATA_TEST_CASE(RunSmall, NEGEMMAssemblyFixture_U8, framework::DatasetMode::PRECOMMIT, data_matrix_multiply)
75{
76 // Validate output
77 validate(Accessor(_target), _reference);
78}
79TEST_SUITE_END()
80TEST_SUITE_END()
81
Pablo Tello299025a2017-09-29 11:30:12 +010082TEST_SUITE(GEMMLowp)
83
Pablo Tellobf2fb952017-09-29 16:43:25 +010084TEST_SUITE(INTERLEAVE_BLOCKED)
85
86using NEInterleaveBlocked = NESynthetizeFunction<NEGEMMInterleaveBlockedKernel>;
87using NEGEMMInterleaveBlockedFixture = GEMMInterleaveBlockedValidationFixture<Tensor, Accessor, NEInterleaveBlocked>;
88FIXTURE_DATA_TEST_CASE(RunSmall, NEGEMMInterleaveBlockedFixture, framework::DatasetMode::PRECOMMIT, data_int_blk)
89{
90 // Validate output
Gian Marcofa4cacd2017-10-18 17:05:02 +010091 validate(Accessor(_target), _reference);
Pablo Tellobf2fb952017-09-29 16:43:25 +010092}
93TEST_SUITE_END()
94
95TEST_SUITE(INTERLEAVE_BLOCKED_TRANSPOSED)
96using NEInterleaveBlockedTransposed = NESynthetizeFunction<NEGEMMInterleaveBlockedKernel>;
97using NEGEMMInterleaveBlockedTransposedFixture = GEMMInterleaveBlockedValidationFixture<Tensor, Accessor, NEInterleaveBlockedTransposed, true>;
98FIXTURE_DATA_TEST_CASE(RunSmall, NEGEMMInterleaveBlockedTransposedFixture, framework::DatasetMode::PRECOMMIT, data_int_blk_tr)
99{
100 // Validate output
Gian Marcofa4cacd2017-10-18 17:05:02 +0100101 validate(Accessor(_target), _reference);
Pablo Tellobf2fb952017-09-29 16:43:25 +0100102}
103
104TEST_SUITE_END()
105
Gian Marcoe75a02b2017-11-08 12:24:09 +0000106TEST_SUITE(MatrixMultiplyCore)
107using NEGEMMLowpMatrixMultiplyCoreFixture = GEMMLowpMatrixMultiplyCoreValidationFixture<Tensor, Accessor, NEGEMMLowpMatrixMultiplyCore>;
Gian Marcofa4cacd2017-10-18 17:05:02 +0100108
Gian Marcoe75a02b2017-11-08 12:24:09 +0000109DATA_TEST_CASE(Configuration, framework::DatasetMode::ALL, framework::dataset::concat(datasets::SmallGEMMLowpDataset(), datasets::LargeGEMMLowpDataset()),
110 shape_a, shape_b, shape_c, a_offset, b_offset)
Gian Marcofa4cacd2017-10-18 17:05:02 +0100111{
112 // Create tensors
Gian Marcoe75a02b2017-11-08 12:24:09 +0000113 Tensor a = create_tensor<Tensor>(shape_a, DataType::QASYMM8);
114 Tensor b = create_tensor<Tensor>(shape_b, DataType::QASYMM8);
115 Tensor c = create_tensor<Tensor>(shape_c, DataType::S32);
116
117 a.info()->set_quantization_info(QuantizationInfo(1.0f / 255, a_offset));
118 b.info()->set_quantization_info(QuantizationInfo(1.0f / 255, b_offset));
Gian Marcofa4cacd2017-10-18 17:05:02 +0100119
120 ARM_COMPUTE_EXPECT(a.info()->is_resizable(), framework::LogLevel::ERRORS);
121 ARM_COMPUTE_EXPECT(b.info()->is_resizable(), framework::LogLevel::ERRORS);
122 ARM_COMPUTE_EXPECT(c.info()->is_resizable(), framework::LogLevel::ERRORS);
123
124 // Create and configure function
Gian Marcoe75a02b2017-11-08 12:24:09 +0000125 NEGEMMLowpMatrixMultiplyCore gemmlowp_mm;
126 gemmlowp_mm.configure(&a, &b, &c);
Gian Marcofa4cacd2017-10-18 17:05:02 +0100127}
128
Georgios Pinitasa3b1b462017-11-16 19:24:39 +0000129// *INDENT-OFF*
130// clang-format off
131DATA_TEST_CASE(Validate, framework::DatasetMode::ALL, zip(zip(zip(
132 framework::dataset::make("InputAInfo", { TensorInfo(TensorShape(21U, 13U), 1, DataType::QASYMM8, QuantizationInfo(1.f/255, 10)), // Input not a multiple of 4
133 TensorInfo(TensorShape(21U, 13U), 1, DataType::QS8, 2), // Mismatching data type
134 TensorInfo(TensorShape(20U, 13U), 1, DataType::QASYMM8, QuantizationInfo(1.f/255, 10)), // Invalid dimensions
135 TensorInfo(TensorShape(21U, 13U), 1, DataType::QASYMM8, QuantizationInfo(1.f/255, 10)), // Invalid dimensions
136 TensorInfo(TensorShape(16U, 32U), 1, DataType::QASYMM8, QuantizationInfo(1.f/255, 10)),
137 }),
138 framework::dataset::make("InputBInfo",{ TensorInfo(TensorShape(33U, 21U), 1, DataType::QASYMM8, QuantizationInfo(1.f/256, 10)),
139 TensorInfo(TensorShape(33U, 21U), 1, DataType::QASYMM8, QuantizationInfo(1.f/256, 10)),
140 TensorInfo(TensorShape(33U, 21U), 1, DataType::QASYMM8, QuantizationInfo(1.f/256, 10)),
141 TensorInfo(TensorShape(33U, 21U), 1, DataType::QASYMM8, QuantizationInfo(1.f/256, 10)),
142 TensorInfo(TensorShape(64U, 16U), 1, DataType::QASYMM8, QuantizationInfo(1.f/256, 10)),
143 })),
144 framework::dataset::make("OutputInfo",{ TensorInfo(TensorShape(33U, 13U), 1, DataType::S32),
145 TensorInfo(TensorShape(33U, 13U), 1, DataType::S32),
146 TensorInfo(TensorShape(33U, 13U), 1, DataType::S32),
147 TensorInfo(TensorShape(8U, 11U), 1, DataType::S32),
148 TensorInfo(TensorShape(64U, 32U), 1, DataType::S32),
149 })),
Georgios Pinitas631c41a2017-12-06 11:53:03 +0000150 framework::dataset::make("Expected", { false, false, false, false, true })),
Georgios Pinitasa3b1b462017-11-16 19:24:39 +0000151 a_info, b_info, output_info, expected)
152{
153 // Lock tensors
Georgios Pinitas631c41a2017-12-06 11:53:03 +0000154 Status status = NEGEMMLowpMatrixMultiplyCore::validate(&a_info.clone()->set_is_resizable(false),
155 &b_info.clone()->set_is_resizable(false),
156 &output_info.clone()->set_is_resizable(false));
157 ARM_COMPUTE_EXPECT(bool(status) == expected, framework::LogLevel::ERRORS);
Georgios Pinitasa3b1b462017-11-16 19:24:39 +0000158}
159// clang-format on
160// *INDENT-ON*
161
Gian Marcoe75a02b2017-11-08 12:24:09 +0000162FIXTURE_DATA_TEST_CASE(RunSmall, NEGEMMLowpMatrixMultiplyCoreFixture, framework::DatasetMode::ALL, datasets::SmallGEMMLowpDataset())
Pablo Tello299025a2017-09-29 11:30:12 +0100163{
164 // Validate output
Gian Marcofa4cacd2017-10-18 17:05:02 +0100165 validate(Accessor(_target), _reference);
166}
167
Gian Marcoe75a02b2017-11-08 12:24:09 +0000168FIXTURE_DATA_TEST_CASE(RunLarge, NEGEMMLowpMatrixMultiplyCoreFixture, framework::DatasetMode::NIGHTLY, datasets::LargeGEMMLowpDataset())
Gian Marcofa4cacd2017-10-18 17:05:02 +0100169{
170 // Validate output
171 validate(Accessor(_target), _reference);
Pablo Tello299025a2017-09-29 11:30:12 +0100172}
Pablo Tello299025a2017-09-29 11:30:12 +0100173
Gian Marcoe75a02b2017-11-08 12:24:09 +0000174TEST_SUITE_END() // MatrixMultiplyCore
175
176TEST_SUITE(OutputStage)
177
178TEST_SUITE(QuantizeDownInt32ToUint8Scale)
179
Gian Marco05288a22017-11-21 10:57:50 +0000180const auto quantize_down_int32_to_uint8_scale_cases = framework::dataset::make("result_offset", -2, 1) * framework::dataset::make("result_mult_int", 1, 2) * framework::dataset::make("result_shift", 2,
Gian Marco6b77e912017-11-17 09:27:57 +0000181 3)
182 * framework::dataset::make("min", 0) * framework::dataset::make("max", 0) * framework::dataset::make("addBias", { false, true });
183
Gian Marco05288a22017-11-21 10:57:50 +0000184const auto quantize_down_int32_to_uint8_scale_relu_cases = framework::dataset::make("result_offset", -2, 1) * framework::dataset::make("result_mult_int", 1,
Gian Marco6b77e912017-11-17 09:27:57 +0000185 2)
186 * framework::dataset::make("result_shift", 2, 3) * framework::dataset::make("min", 0, 2) * framework::dataset::make("max", 171, 174) * framework::dataset::make("addBias", { false, true });
187
Gian Marcoe75a02b2017-11-08 12:24:09 +0000188using NEGEMMLowpQuantizeDownInt32ToUint8ScaleFixture = GEMMLowpQuantizeDownInt32ToUint8ScaleValidationFixture<Tensor, Accessor, NEGEMMLowpQuantizeDownInt32ToUint8Scale>;
189
Gian Marcoe75a02b2017-11-08 12:24:09 +0000190DATA_TEST_CASE(Configuration, framework::DatasetMode::ALL, combine(framework::dataset::concat(datasets::SmallShapes(), datasets::LargeShapes()), quantize_down_int32_to_uint8_scale_cases),
Gian Marco6b77e912017-11-17 09:27:57 +0000191 shape, result_offset, result_mult_int, result_shift, min, max, add_bias)
Gian Marcoe75a02b2017-11-08 12:24:09 +0000192{
Gian Marco6b77e912017-11-17 09:27:57 +0000193 TensorShape shape_bias(shape[0]);
194
Gian Marcoe75a02b2017-11-08 12:24:09 +0000195 // Create tensors
Gian Marco6b77e912017-11-17 09:27:57 +0000196 Tensor in = create_tensor<Tensor>(shape, DataType::S32);
197 Tensor bias = create_tensor<Tensor>(shape_bias, DataType::S32);
198 Tensor out = create_tensor<Tensor>(shape, DataType::QASYMM8);
Gian Marcoe75a02b2017-11-08 12:24:09 +0000199
200 ARM_COMPUTE_EXPECT(in.info()->is_resizable(), framework::LogLevel::ERRORS);
Gian Marco6b77e912017-11-17 09:27:57 +0000201 ARM_COMPUTE_EXPECT(bias.info()->is_resizable(), framework::LogLevel::ERRORS);
Gian Marcoe75a02b2017-11-08 12:24:09 +0000202 ARM_COMPUTE_EXPECT(out.info()->is_resizable(), framework::LogLevel::ERRORS);
203
204 // Create and configure function
205 NEGEMMLowpQuantizeDownInt32ToUint8Scale output_stage;
Gian Marco6b77e912017-11-17 09:27:57 +0000206 output_stage.configure(&in, add_bias ? &bias : nullptr, &out, result_offset, result_mult_int, result_shift, min, max);
Gian Marcoe75a02b2017-11-08 12:24:09 +0000207
Gian Marco6b77e912017-11-17 09:27:57 +0000208 // Validate valid region input and output
Gian Marcoe75a02b2017-11-08 12:24:09 +0000209 const ValidRegion valid_region = shape_to_valid_region(shape);
210 validate(in.info()->valid_region(), valid_region);
211 validate(out.info()->valid_region(), valid_region);
212
Gian Marco6b77e912017-11-17 09:27:57 +0000213 // Validate valid region bias
214 if(add_bias)
215 {
216 const ValidRegion valid_region_bias = shape_to_valid_region(shape_bias);
217 validate(bias.info()->valid_region(), valid_region_bias);
218 }
219
Gian Marcoe75a02b2017-11-08 12:24:09 +0000220 // Validate padding
221 const PaddingSize padding = PaddingCalculator(shape.x(), 16).required_padding();
222 validate(in.info()->padding(), padding);
223 validate(out.info()->padding(), padding);
Gian Marco6b77e912017-11-17 09:27:57 +0000224
225 if(add_bias)
226 {
227 validate(bias.info()->padding(), padding);
228 }
Gian Marcoe75a02b2017-11-08 12:24:09 +0000229}
230
231FIXTURE_DATA_TEST_CASE(RunSmall, NEGEMMLowpQuantizeDownInt32ToUint8ScaleFixture, framework::DatasetMode::ALL, combine(datasets::SmallShapes(), quantize_down_int32_to_uint8_scale_cases))
Pablo Tellobf2fb952017-09-29 16:43:25 +0100232{
233 // Validate output
Gian Marcofa4cacd2017-10-18 17:05:02 +0100234 validate(Accessor(_target), _reference);
Pablo Tellobf2fb952017-09-29 16:43:25 +0100235}
Pablo Tello6ff12a02017-11-02 16:09:35 +0000236
Gian Marcoe75a02b2017-11-08 12:24:09 +0000237FIXTURE_DATA_TEST_CASE(RunLarge, NEGEMMLowpQuantizeDownInt32ToUint8ScaleFixture, framework::DatasetMode::NIGHTLY, combine(datasets::LargeShapes(), quantize_down_int32_to_uint8_scale_cases))
238{
239 // Validate output
240 validate(Accessor(_target), _reference);
241}
242
Gian Marco6b77e912017-11-17 09:27:57 +0000243TEST_SUITE(BoundedReLu)
244FIXTURE_DATA_TEST_CASE(RunSmall, NEGEMMLowpQuantizeDownInt32ToUint8ScaleFixture, framework::DatasetMode::ALL, combine(datasets::SmallShapes(), quantize_down_int32_to_uint8_scale_relu_cases))
245{
246 // Validate output
247 validate(Accessor(_target), _reference);
248}
Gian Marcoe75a02b2017-11-08 12:24:09 +0000249
Gian Marco6b77e912017-11-17 09:27:57 +0000250FIXTURE_DATA_TEST_CASE(RunLarge, NEGEMMLowpQuantizeDownInt32ToUint8ScaleFixture, framework::DatasetMode::NIGHTLY, combine(datasets::LargeShapes(), quantize_down_int32_to_uint8_scale_relu_cases))
251{
252 // Validate output
253 validate(Accessor(_target), _reference);
254}
255TEST_SUITE_END() // BoundedReLu
256
Gian Marco6b77e912017-11-17 09:27:57 +0000257TEST_SUITE_END() // QuantizeDownInt32ToUint8Scale
Gian Marco58c57942017-11-28 09:10:03 +0000258
259TEST_SUITE(QuantizeDownInt32ToUint8ScaleByFixedPoint)
260
261const auto quantize_down_int32_to_uint8_scale_by_fixedpoint_cases = framework::dataset::make("result_fixedpoint_multiplier", 254601600, 254601602) * framework::dataset::make("result_shift", 1,
262 2)
263 * framework::dataset::make("result_offset_after_shift", 2, 3) * framework::dataset::make("min", 0) * framework::dataset::make("max", 0) * framework::dataset::make("addBias", { false, true });
264
265const auto quantize_down_int32_to_uint8_scale_by_fixedpoint_relu_cases = framework::dataset::make("result_fixedpoint_multiplier", 254601600, 254601602) * framework::dataset::make("result_shift", 1,
266 2)
267 * framework::dataset::make("result_offset_after_shift", 2, 3) * framework::dataset::make("min", 0, 2) * framework::dataset::make("max", 171, 174) * framework::dataset::make("addBias", { false, true });
268
269using NEGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPointFixture =
270 GEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPointValidationFixture<Tensor, Accessor, NEGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPoint>;
271
272DATA_TEST_CASE(Configuration, framework::DatasetMode::ALL, combine(framework::dataset::concat(datasets::SmallShapes(), datasets::LargeShapes()),
273 quantize_down_int32_to_uint8_scale_by_fixedpoint_cases),
274 shape, result_fixedpoint_multiplier, result_shift, result_offset_after_shift, min, max, add_bias)
275{
276 TensorShape shape_bias(shape[0]);
277
278 // Create tensors
279 Tensor in = create_tensor<Tensor>(shape, DataType::S32);
280 Tensor bias = create_tensor<Tensor>(shape_bias, DataType::S32);
281 Tensor out = create_tensor<Tensor>(shape, DataType::QASYMM8);
282
283 ARM_COMPUTE_EXPECT(in.info()->is_resizable(), framework::LogLevel::ERRORS);
284 ARM_COMPUTE_EXPECT(bias.info()->is_resizable(), framework::LogLevel::ERRORS);
285 ARM_COMPUTE_EXPECT(out.info()->is_resizable(), framework::LogLevel::ERRORS);
286
287 // Create and configure function
288 NEGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPoint output_stage;
289 output_stage.configure(&in, add_bias ? &bias : nullptr, &out, result_fixedpoint_multiplier, result_shift, result_offset_after_shift, min, max);
290
291 // Validate valid region input and output
292 const ValidRegion valid_region = shape_to_valid_region(shape);
293 validate(in.info()->valid_region(), valid_region);
294 validate(out.info()->valid_region(), valid_region);
295
296 // Validate valid region bias
297 if(add_bias)
298 {
299 const ValidRegion valid_region_bias = shape_to_valid_region(shape_bias);
300 validate(bias.info()->valid_region(), valid_region_bias);
301 }
302
303 // Validate padding
304 const PaddingSize padding = PaddingCalculator(shape.x(), 16).required_padding();
305 validate(in.info()->padding(), padding);
306 validate(out.info()->padding(), padding);
307
308 if(add_bias)
309 {
310 validate(bias.info()->padding(), padding);
311 }
312}
313
314FIXTURE_DATA_TEST_CASE(RunSmall, NEGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPointFixture, framework::DatasetMode::ALL, combine(datasets::SmallShapes(),
315 quantize_down_int32_to_uint8_scale_by_fixedpoint_cases))
316{
317 // Validate output
318 validate(Accessor(_target), _reference);
319}
320
321FIXTURE_DATA_TEST_CASE(RunLarge, NEGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPointFixture, framework::DatasetMode::NIGHTLY, combine(datasets::LargeShapes(),
322 quantize_down_int32_to_uint8_scale_by_fixedpoint_cases))
323{
324 // Validate output
325 validate(Accessor(_target), _reference);
326}
327
328TEST_SUITE(BoundedReLu)
329FIXTURE_DATA_TEST_CASE(RunSmall, NEGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPointFixture, framework::DatasetMode::ALL, combine(datasets::SmallShapes(),
330 quantize_down_int32_to_uint8_scale_by_fixedpoint_relu_cases))
331{
332 // Validate output
333 validate(Accessor(_target), _reference);
334}
335
336FIXTURE_DATA_TEST_CASE(RunLarge, NEGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPointFixture, framework::DatasetMode::NIGHTLY, combine(datasets::LargeShapes(),
337 quantize_down_int32_to_uint8_scale_by_fixedpoint_relu_cases))
338{
339 // Validate output
340 validate(Accessor(_target), _reference);
341}
342TEST_SUITE_END() // BoundedReLu
343
344TEST_SUITE_END() // QuantizeDownInt32ToUint8ScaleByFixedPoint
Gian Marcoe75a02b2017-11-08 12:24:09 +0000345TEST_SUITE_END() // OutputStage
346
347TEST_SUITE_END() // GEMMLowp
348TEST_SUITE_END() // NEON
Pablo Tello299025a2017-09-29 11:30:12 +0100349} // namespace validation
350} // namespace test
351} // namespace arm_compute