aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMichele Di Giorgio <michele.digiorgio@arm.com>2020-04-14 16:08:32 +0100
committerMichele Di Giorgio <michele.digiorgio@arm.com>2020-04-15 14:34:19 +0000
commit7a0212aae4fe6617eb31c734c24246c345556391 (patch)
tree850590908e9edf6d778e26377198fde7dd84d968 /tests
parent45198c8fe5c262cf7fba6f22cfc03ccf194e8bca (diff)
downloadComputeLibrary-7a0212aae4fe6617eb31c734c24246c345556391.tar.gz
COMPMID-3236: Add support QSYMM16 into S32 CLPixelwiseMultiplicationKernel
Change-Id: Ifc519f53f04fcb14ddb9c17f98cc687f34285c97 Signed-off-by: Michele Di Giorgio <michele.digiorgio@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3018 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Michalis Spyrou <michalis.spyrou@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/validation/CL/PixelWiseMultiplication.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/tests/validation/CL/PixelWiseMultiplication.cpp b/tests/validation/CL/PixelWiseMultiplication.cpp
index 310828c48d..ea686af812 100644
--- a/tests/validation/CL/PixelWiseMultiplication.cpp
+++ b/tests/validation/CL/PixelWiseMultiplication.cpp
@@ -137,7 +137,8 @@ PIXEL_WISE_MULTIPLICATION_FIXTURE_DATA_TEST_CASE(RunWithActivationSmallBroadcast
VALIDATE(float, 1.f))
template <typename T>
-using CLPixelWiseMultiplicationQuantizedFixture = PixelWiseMultiplicationValidationQuantizedFixture<CLTensor, CLAccessor, CLPixelWiseMultiplication, T, T>;
+using CLPixelWiseMultiplicationQuantizedFixture = PixelWiseMultiplicationValidationQuantizedFixture<CLTensor, CLAccessor, CLPixelWiseMultiplication, T, T>;
+using CLPixelWiseMultiplicationQSYMM16ToS32Fxture = PixelWiseMultiplicationValidationQuantizedFixture<CLTensor, CLAccessor, CLPixelWiseMultiplication, int16_t, int16_t, int32_t>;
TEST_SUITE(Quantized)
TEST_SUITE(QASYMM8)
@@ -208,6 +209,23 @@ FIXTURE_DATA_TEST_CASE(RunLarge, CLPixelWiseMultiplicationQuantizedFixture<int16
validate(CLAccessor(_target), _reference, tolerance_qsymm16);
}
TEST_SUITE_END() // QSYMM16
+TEST_SUITE(QSYMM16ToS32)
+FIXTURE_DATA_TEST_CASE(RunSmall, CLPixelWiseMultiplicationQSYMM16ToS32Fxture, framework::DatasetMode::ALL,
+ combine(combine(combine(combine(combine(combine(combine(combine(combine(datasets::SmallShapes(),
+ framework::dataset::make("DataTypeIn1", DataType::QSYMM16)),
+ framework::dataset::make("DataTypeIn2", DataType::QSYMM16)),
+ framework::dataset::make("DataTypeOut", DataType::S32)),
+ framework::dataset::make("Scale", { 1.f })),
+ framework::dataset::make("ConvertPolicy", { ConvertPolicy::SATURATE })),
+ framework::dataset::make("RoundingPolicy", RoundingPolicy::TO_NEAREST_EVEN)),
+ framework::dataset::make("Src0QInfo", { QuantizationInfo(1.f / 32768.f, 0) })),
+ framework::dataset::make("Src1QInfo", { QuantizationInfo(2.f / 32768.f, 0) })),
+ framework::dataset::make("OutQInfo", { QuantizationInfo(1.f, 0) })))
+{
+ // Validate output
+ validate(CLAccessor(_target), _reference, tolerance_qsymm16);
+}
+TEST_SUITE_END() // QSYMM16ToS32
TEST_SUITE_END() // Quantized
TEST_SUITE_END() // PixelWiseMultiplication