aboutsummaryrefslogtreecommitdiff
path: root/tests/validation/CL/ReduceMean.cpp
diff options
context:
space:
mode:
authorMichalis Spyrou <michalis.spyrou@arm.com>2020-01-30 18:11:13 +0000
committerMichalis Spyrou <michalis.spyrou@arm.com>2020-02-07 15:17:57 +0000
commit0b18d9740f04cc4e9cb6000a76b9c1dcd8327e24 (patch)
tree8ffd0b1c676b13499314d3396818f0c30c1020f2 /tests/validation/CL/ReduceMean.cpp
parentc971cf1034a61875c8e8c87d48634cbfac3865fd (diff)
downloadComputeLibrary-0b18d9740f04cc4e9cb6000a76b9c1dcd8327e24.tar.gz
COMPMID-2762: Add support for QASYMM8_SIGNED in CLReductionOperation and CLReduceMean
Change-Id: Ib6babd9ad80c57cf21c2f0ee2aab404221088595 Signed-off-by: Michalis Spyrou <michalis.spyrou@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/2670 Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com>
Diffstat (limited to 'tests/validation/CL/ReduceMean.cpp')
-rw-r--r--tests/validation/CL/ReduceMean.cpp42
1 files changed, 20 insertions, 22 deletions
diff --git a/tests/validation/CL/ReduceMean.cpp b/tests/validation/CL/ReduceMean.cpp
index 036ea181ac..5069711296 100644
--- a/tests/validation/CL/ReduceMean.cpp
+++ b/tests/validation/CL/ReduceMean.cpp
@@ -80,28 +80,6 @@ DATA_TEST_CASE(Validate, framework::DatasetMode::ALL, zip(zip(zip(zip(
// clang-format on
// *INDENT-ON*
-DATA_TEST_CASE(Configuration,
- framework::DatasetMode::ALL,
- combine(datasets::SmallShapes(), framework::dataset::make("DataType", { DataType::F16, DataType::F32 })),
- shape, data_type)
-{
- // Create tensors
- CLTensor ref_src = create_tensor<CLTensor>(shape, data_type);
- CLTensor dst;
-
- Coordinates axis(1);
-
- // Create and Configure function
- CLReduceMean reduce_mean;
- reduce_mean.configure(&ref_src, axis, true, &dst);
-
- // Validate valid region
- TensorShape output_shape = shape;
- output_shape.set(1, 1);
- const ValidRegion valid_region = shape_to_valid_region(output_shape);
- validate(dst.info()->valid_region(), valid_region);
-}
-
template <typename T>
using CLReduceMeanFixture = ReduceMeanFixture<CLTensor, CLAccessor, CLReduceMean, T>;
@@ -170,6 +148,26 @@ FIXTURE_DATA_TEST_CASE(RunLarge,
validate(CLAccessor(_target), _reference, tolerance_qasymm8);
}
TEST_SUITE_END() // QASYMM8
+
+TEST_SUITE(QASYMM8_SIGNED)
+FIXTURE_DATA_TEST_CASE(RunSmall,
+ CLReduceMeanQuantizedFixture<int8_t>,
+ framework::DatasetMode::PRECOMMIT,
+ combine(combine(combine(datasets::Small4DShapes(), framework::dataset::make("DataType", DataType::QASYMM8_SIGNED)), concat(axis_keep, axis_drop)), framework::dataset::make("QuantizationInfo", { QuantizationInfo(1.f / 102, 2) })))
+{
+ // Validate output
+ validate(CLAccessor(_target), _reference, tolerance_qasymm8);
+}
+
+FIXTURE_DATA_TEST_CASE(RunLarge,
+ CLReduceMeanQuantizedFixture<int8_t>,
+ framework::DatasetMode::NIGHTLY,
+ combine(combine(combine(datasets::Large4DShapes(), framework::dataset::make("DataType", DataType::QASYMM8_SIGNED)), concat(axis_keep, axis_drop)), framework::dataset::make("QuantizationInfo", { QuantizationInfo(1.f / 102, 2) })))
+{
+ // Validate output
+ validate(CLAccessor(_target), _reference, tolerance_qasymm8);
+}
+TEST_SUITE_END() // QASYMM8_SIGNED
TEST_SUITE_END() // Quantized
TEST_SUITE_END() // ReduceMean
TEST_SUITE_END() // CL