aboutsummaryrefslogtreecommitdiff
path: root/tests/validation/CL/ReduceMean.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/validation/CL/ReduceMean.cpp')
-rw-r--r--tests/validation/CL/ReduceMean.cpp42
1 files changed, 38 insertions, 4 deletions
diff --git a/tests/validation/CL/ReduceMean.cpp b/tests/validation/CL/ReduceMean.cpp
index cb1e38e3ac..1dc6c615a9 100644
--- a/tests/validation/CL/ReduceMean.cpp
+++ b/tests/validation/CL/ReduceMean.cpp
@@ -133,16 +133,33 @@ TEST_SUITE(QASYMM8)
FIXTURE_DATA_TEST_CASE(RunSmall,
CLReduceMeanQuantizedFixture<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(CLAccessor(_target), _reference, tolerance_qasymm8);
}
+TEST_SUITE(Requant)
+FIXTURE_DATA_TEST_CASE(RunSmall,
+ CLReduceMeanQuantizedFixture<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(CLAccessor(_target), _reference, tolerance_qasymm8);
+}
+TEST_SUITE_END() // Requant
+
FIXTURE_DATA_TEST_CASE(RunLarge,
CLReduceMeanQuantizedFixture<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(CLAccessor(_target), _reference, tolerance_qasymm8);
@@ -153,16 +170,33 @@ 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) })))
+ 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 / 102, 2) })),
+ framework::dataset::make("QuantizationInfoOutput", { QuantizationInfo(1.f / 102, 2) })))
+{
+ // Validate output
+ validate(CLAccessor(_target), _reference, tolerance_qasymm8);
+}
+
+TEST_SUITE(Requant)
+FIXTURE_DATA_TEST_CASE(RunSmall,
+ CLReduceMeanQuantizedFixture<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(CLAccessor(_target), _reference, tolerance_qasymm8);
}
+TEST_SUITE_END() // Requant
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) })))
+ 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 / 102, 2) })),
+ framework::dataset::make("QuantizationInfoOutput", { QuantizationInfo(1.f / 102, 2) })))
{
// Validate output
validate(CLAccessor(_target), _reference, tolerance_qasymm8);