aboutsummaryrefslogtreecommitdiff
path: root/tests/validation/NEON/DeconvolutionLayer.cpp
diff options
context:
space:
mode:
authorFreddie Liardet <frederick.liardet@arm.com>2021-04-22 14:55:17 +0100
committerfrederick.liardet <frederick.liardet@arm.com>2021-04-28 14:17:10 +0000
commite92b0458a0432254f8e49bc306aebfe172bb4d0e (patch)
treec22bfced606c2b00990b74032c1bcd70529b74ca /tests/validation/NEON/DeconvolutionLayer.cpp
parenta47dcc229d912d4e4bb5afa37220d20451f243a7 (diff)
downloadComputeLibrary-e92b0458a0432254f8e49bc306aebfe172bb4d0e.tar.gz
Add per-channel quantization support for CLDeconvolutionLayer
Add QSYMM8_PER_CHANNEL support on weight input for CLDeconvolutionLayer. When weights are per-channel quantized type "Direct" method is always used. Also reduce number of QSYMM8_PER_CHANNEL tests for NEDeconvolutionLayer. Resolves: COMPMID-3438 Signed-off-by: Freddie Liardet <frederick.liardet@arm.com> Change-Id: I1330cac5142e19d21e322574fb8d912558745b02 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5484 Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com> Reviewed-by: Giorgio Arena <giorgio.arena@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'tests/validation/NEON/DeconvolutionLayer.cpp')
-rw-r--r--tests/validation/NEON/DeconvolutionLayer.cpp29
1 files changed, 17 insertions, 12 deletions
diff --git a/tests/validation/NEON/DeconvolutionLayer.cpp b/tests/validation/NEON/DeconvolutionLayer.cpp
index 4c6ee2615d..19bd742a61 100644
--- a/tests/validation/NEON/DeconvolutionLayer.cpp
+++ b/tests/validation/NEON/DeconvolutionLayer.cpp
@@ -395,14 +395,19 @@ TEST_SUITE_END() // W1x1
TEST_SUITE_END() // QASYMM8_SIGNED
+const auto input_qinfo_per_channel_dataset = framework::dataset::make("InputQuantizationInfo", { QuantizationInfo(1.f / 255.f, 10) });
+const auto output_qinfo_per_channel_dataset = framework::dataset::make("OutputQuantizationInfo", { QuantizationInfo(3.f / 255.f, 0) });
+const auto input_signed_qinfo_per_channel_dataset = framework::dataset::make("InputQuantizationInfo", { QuantizationInfo(1.f / 255.f, -10) });
+const auto output_signed_qinfo_per_channel_dataset = framework::dataset::make("OutputQuantizationInfo", { QuantizationInfo(3.f / 255.f, 10) });
+
TEST_SUITE(QSYMM8_PER_CHANNEL)
TEST_SUITE(W4x4)
FIXTURE_DATA_TEST_CASE(Run, NEDeconvolutionLayerQuantizedPerChannelFixture4x4<uint8_t>, framework::DatasetMode::ALL, combine(combine(combine(combine(combine(combine(data4x4,
framework::dataset::make("DataType", DataType::QASYMM8)),
data_layouts_dataset),
- input_qinfo_dataset),
- output_qinfo_dataset),
+ input_qinfo_per_channel_dataset),
+ output_qinfo_per_channel_dataset),
add_bias_dataset),
framework::dataset::make("WeightsDataType", { DataType::QSYMM8_PER_CHANNEL })))
{
@@ -412,8 +417,8 @@ FIXTURE_DATA_TEST_CASE(Run, NEDeconvolutionLayerQuantizedPerChannelFixture4x4<ui
FIXTURE_DATA_TEST_CASE(RunSigned, NEDeconvolutionLayerQuantizedPerChannelFixture4x4<int8_t>, framework::DatasetMode::ALL, combine(combine(combine(combine(combine(combine(data4x4,
framework::dataset::make("DataType", DataType::QASYMM8_SIGNED)),
data_layouts_dataset),
- input_qinfo_dataset),
- output_qinfo_dataset),
+ input_signed_qinfo_per_channel_dataset),
+ output_signed_qinfo_per_channel_dataset),
add_bias_dataset),
framework::dataset::make("WeightsDataType", { DataType::QSYMM8_PER_CHANNEL })))
{
@@ -426,8 +431,8 @@ TEST_SUITE(W3x3)
FIXTURE_DATA_TEST_CASE(Run, NEDeconvolutionLayerQuantizedPerChannelFixture3x3<uint8_t>, framework::DatasetMode::ALL, combine(combine(combine(combine(combine(combine(data3x3,
framework::dataset::make("DataType", DataType::QASYMM8)),
data_layouts_dataset),
- input_qinfo_dataset),
- output_qinfo_dataset),
+ input_qinfo_per_channel_dataset),
+ output_qinfo_per_channel_dataset),
add_bias_dataset),
framework::dataset::make("WeightsDataType", { DataType::QSYMM8_PER_CHANNEL })))
{
@@ -437,8 +442,8 @@ FIXTURE_DATA_TEST_CASE(Run, NEDeconvolutionLayerQuantizedPerChannelFixture3x3<ui
FIXTURE_DATA_TEST_CASE(RunSigned, NEDeconvolutionLayerQuantizedPerChannelFixture3x3<int8_t>, framework::DatasetMode::ALL, combine(combine(combine(combine(combine(combine(data3x3,
framework::dataset::make("DataType", DataType::QASYMM8_SIGNED)),
data_layouts_dataset),
- input_qinfo_dataset),
- output_qinfo_dataset),
+ input_signed_qinfo_per_channel_dataset),
+ output_signed_qinfo_per_channel_dataset),
add_bias_dataset),
framework::dataset::make("WeightsDataType", { DataType::QSYMM8_PER_CHANNEL })))
{
@@ -451,8 +456,8 @@ TEST_SUITE(W1x1)
FIXTURE_DATA_TEST_CASE(Run, NEDeconvolutionLayerQuantizedPerChannelFixture1x1<uint8_t>, framework::DatasetMode::ALL, combine(combine(combine(combine(combine(combine(data1x1,
framework::dataset::make("DataType", DataType::QASYMM8)),
data_layouts_dataset),
- input_qinfo_dataset),
- output_qinfo_dataset),
+ input_qinfo_per_channel_dataset),
+ output_qinfo_per_channel_dataset),
add_bias_dataset),
framework::dataset::make("WeightsDataType", { DataType::QSYMM8_PER_CHANNEL })))
{
@@ -462,8 +467,8 @@ FIXTURE_DATA_TEST_CASE(Run, NEDeconvolutionLayerQuantizedPerChannelFixture1x1<ui
FIXTURE_DATA_TEST_CASE(RunSigned, NEDeconvolutionLayerQuantizedPerChannelFixture1x1<int8_t>, framework::DatasetMode::ALL, combine(combine(combine(combine(combine(combine(data1x1,
framework::dataset::make("DataType", DataType::QASYMM8_SIGNED)),
data_layouts_dataset),
- input_qinfo_dataset),
- output_qinfo_dataset),
+ input_signed_qinfo_per_channel_dataset),
+ output_signed_qinfo_per_channel_dataset),
add_bias_dataset),
framework::dataset::make("WeightsDataType", { DataType::QSYMM8_PER_CHANNEL })))
{