aboutsummaryrefslogtreecommitdiff
path: root/tests/validation/NEON/ReduceMean.cpp
diff options
context:
space:
mode:
authorManuel Bottini <manuel.bottini@arm.com>2020-08-07 16:49:15 +0100
committerManuel Bottini <manuel.bottini@arm.com>2020-08-19 08:53:41 +0000
commitc58f0ad7ac6d91f2789a78049d3cec7355113f9a (patch)
tree09124c0b141892e35c9293c3ebde06f3766812dd /tests/validation/NEON/ReduceMean.cpp
parent97c1a6751c4f9bf52f0a4421b94da80a3028ca78 (diff)
downloadComputeLibrary-c58f0ad7ac6d91f2789a78049d3cec7355113f9a.tar.gz
COMPMID-3502: Add support of different quantization input/output for ReduceMean
Change-Id: If9a5c6ee3902a7381f4117e473adbddf006f3347 Signed-off-by: Manuel Bottini <manuel.bottini@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3731 Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Sang-Hoon Park <sang-hoon.park@arm.com>
Diffstat (limited to 'tests/validation/NEON/ReduceMean.cpp')
-rw-r--r--tests/validation/NEON/ReduceMean.cpp42
1 files changed, 38 insertions, 4 deletions
diff --git a/tests/validation/NEON/ReduceMean.cpp b/tests/validation/NEON/ReduceMean.cpp
index 23229a08ef..e5a5a175fb 100644
--- a/tests/validation/NEON/ReduceMean.cpp
+++ b/tests/validation/NEON/ReduceMean.cpp
@@ -160,16 +160,33 @@ TEST_SUITE(QASYMM8)
FIXTURE_DATA_TEST_CASE(RunSmall,
NEReduceMeanQuantizedFixture<uint8_t>,
framework::DatasetMode::PRECOMMIT,
- combine(combine(combine(datasets::Small4DShapes(), framework::dataset::make("DataType", DataType::QASYMM8)), concat(axis_keep, axis_drop)), framework::dataset::make("QuantizationInfo", { QuantizationInfo(1.f / 255, 5) })))
+ combine(combine(combine(combine(datasets::Small4DShapes(), framework::dataset::make("DataType", DataType::QASYMM8)), concat(axis_keep, axis_drop)),
+ framework::dataset::make("QuantizationInfoInput", { QuantizationInfo(1.f / 255, 5) })),
+ framework::dataset::make("QuantizationInfoOutput", { QuantizationInfo(1.f / 255, 5) })))
{
// Validate output
validate(Accessor(_target), _reference, tolerance_u8);
}
+TEST_SUITE(Requant)
+FIXTURE_DATA_TEST_CASE(RunSmall,
+ NEReduceMeanQuantizedFixture<uint8_t>,
+ framework::DatasetMode::PRECOMMIT,
+ combine(combine(combine(combine(datasets::Small4DShapes(), framework::dataset::make("DataType", DataType::QASYMM8)), axis_drop),
+ framework::dataset::make("QuantizationInfoInput", { QuantizationInfo(1.f / 255, 5) })),
+ framework::dataset::make("QuantizationInfoOutput", { QuantizationInfo(1.f / 200, 16) })))
+{
+ // Validate output
+ validate(Accessor(_target), _reference, tolerance_u8);
+}
+TEST_SUITE_END() // Requant
+
FIXTURE_DATA_TEST_CASE(RunLarge,
NEReduceMeanQuantizedFixture<uint8_t>,
framework::DatasetMode::NIGHTLY,
- combine(combine(combine(datasets::Large4DShapes(), framework::dataset::make("DataType", DataType::QASYMM8)), concat(axis_keep, axis_drop)), framework::dataset::make("QuantizationInfo", { QuantizationInfo(1.f / 255, 5) })))
+ combine(combine(combine(combine(datasets::Large4DShapes(), framework::dataset::make("DataType", DataType::QASYMM8)), concat(axis_keep, axis_drop)),
+ framework::dataset::make("QuantizationInfoInput", { QuantizationInfo(1.f / 255, 5) })),
+ framework::dataset::make("QuantizationInfoOutput", { QuantizationInfo(1.f / 255, 5) })))
{
// Validate output
validate(Accessor(_target), _reference, tolerance_u8);
@@ -180,15 +197,32 @@ TEST_SUITE(QASYMM8_SIGNED)
FIXTURE_DATA_TEST_CASE(RunSmall,
NEReduceMeanQuantizedFixture<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 / 127, -10), QuantizationInfo(1.f / 250, -20) })))
+ combine(combine(combine(combine(datasets::Small4DShapes(), framework::dataset::make("DataType", DataType::QASYMM8_SIGNED)), concat(axis_keep, axis_drop)),
+ framework::dataset::make("QuantizationInfoInput", { QuantizationInfo(1.f / 127, -10), QuantizationInfo(1.f / 250, -20) })),
+ framework::dataset::make("QuantizationInfoInputOutput", { QuantizationInfo(1.f / 127, -10) })))
{
// Validate output
validate(Accessor(_target), _reference, tolerance_s8);
}
+TEST_SUITE(Requant)
+FIXTURE_DATA_TEST_CASE(RunSmall,
+ NEReduceMeanQuantizedFixture<int8_t>,
+ framework::DatasetMode::PRECOMMIT,
+ combine(combine(combine(combine(datasets::Small4DShapes(), framework::dataset::make("DataType", DataType::QASYMM8_SIGNED)), axis_drop),
+ framework::dataset::make("QuantizationInfoInput", { QuantizationInfo(1.f / 102, 2) })),
+ framework::dataset::make("QuantizationInfoOutput", { QuantizationInfo(1.f / 113, 10) })))
+{
+ // Validate output
+ validate(Accessor(_target), _reference, tolerance_s8);
+}
+TEST_SUITE_END() // Requant
+
FIXTURE_DATA_TEST_CASE(RunLarge,
NEReduceMeanQuantizedFixture<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 / 127, 0) })))
+ combine(combine(combine(combine(datasets::Large4DShapes(), framework::dataset::make("DataType", DataType::QASYMM8_SIGNED)), concat(axis_keep, axis_drop)),
+ framework::dataset::make("QuantizationInfoInput", { QuantizationInfo(1.f / 127, -10) })),
+ framework::dataset::make("QuantizationInfoInputOutput", { QuantizationInfo(1.f / 127, -10) })))
{
// Validate output
validate(Accessor(_target), _reference, tolerance_s8);