diff options
author | Michele Di Giorgio <michele.digiorgio@arm.com> | 2019-10-09 15:32:39 +0100 |
---|---|---|
committer | Michele Di Giorgio <michele.digiorgio@arm.com> | 2019-10-30 14:44:46 +0000 |
commit | df4cf57c7394265b27d051cb1cf0152c53659126 (patch) | |
tree | 87da5d6abeff65b2cee55b63f73bb268776af560 /tests/validation | |
parent | 8b72199f25487040713d1668c998fdde3707413c (diff) | |
download | ComputeLibrary-df4cf57c7394265b27d051cb1cf0152c53659126.tar.gz |
COMPMID-2306: CLDepthwiseConvolution: support for QUANT8_PER_CHANNEL_SYMM
Change-Id: I18c886400daa2dcba0b91011bc4e503d807a4732
Signed-off-by: Michele Di Giorgio <michele.digiorgio@arm.com>
Reviewed-on: https://review.mlplatform.org/c/2143
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Giorgio Arena <giorgio.arena@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'tests/validation')
-rw-r--r-- | tests/validation/CL/DepthwiseConvolutionLayer.cpp | 109 |
1 files changed, 109 insertions, 0 deletions
diff --git a/tests/validation/CL/DepthwiseConvolutionLayer.cpp b/tests/validation/CL/DepthwiseConvolutionLayer.cpp index 37563046cc..5d8fd200d3 100644 --- a/tests/validation/CL/DepthwiseConvolutionLayer.cpp +++ b/tests/validation/CL/DepthwiseConvolutionLayer.cpp @@ -553,6 +553,8 @@ TEST_SUITE_END() // Float template <typename T> using CLDepthwiseConvolutionLayerQuantizedFixture = DepthwiseConvolutionLayerValidationQuantizedFixture<CLTensor, CLAccessor, CLDepthwiseConvolutionLayer, T>; +template <typename T> +using CLDepthwiseConvolutionLayerQuantizedPerChannelFixture = DepthwiseConvolutionLayerValidationQuantizedPerChannelFixture<CLTensor, CLAccessor, CLDepthwiseConvolutionLayer, T, int8_t>; TEST_SUITE(Quantized) TEST_SUITE(QASYMM8) @@ -653,6 +655,113 @@ FIXTURE_DATA_TEST_CASE(RunLarge, CLDepthwiseConvolutionLayerQuantizedFixture<uin TEST_SUITE_END() // Dilation TEST_SUITE_END() // W3x3 TEST_SUITE_END() // QASYMM8 + +TEST_SUITE(QSYMM8_PER_CHANNEL) +TEST_SUITE(Generic) +FIXTURE_DATA_TEST_CASE(RunSmall, CLDepthwiseConvolutionLayerQuantizedPerChannelFixture<uint8_t>, framework::DatasetMode::PRECOMMIT, + combine(combine(combine(combine(combine(combine(combine(datasets::SmallDepthwiseConvolutionLayerDataset(), + depth_multipliers), + framework::dataset::make("SrcDataType", DataType::QASYMM8)), + framework::dataset::make("WeightsDataType", DataType::QSYMM8_PER_CHANNEL)), + framework::dataset::make("SrcQuantizationInfo", { QuantizationInfo(0.3f, 10) })), + framework::dataset::make("DstQuantizationInfo", { QuantizationInfo(0.5f, 4) })), + framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })), + ActivationFunctionsDataset)) +{ + validate(CLAccessor(_target), _reference, tolerance_qasymm8); +} +FIXTURE_DATA_TEST_CASE(RunLarge, CLDepthwiseConvolutionLayerQuantizedPerChannelFixture<uint8_t>, framework::DatasetMode::NIGHTLY, + combine(combine(combine(combine(combine(combine(combine(datasets::LargeDepthwiseConvolutionLayerDataset(), + large_depth_multipliers), + framework::dataset::make("SrcDataType", DataType::QASYMM8)), + framework::dataset::make("WeightsDataType", DataType::QSYMM8_PER_CHANNEL)), + framework::dataset::make("SrcQuantizationInfo", { QuantizationInfo(0.5f, 10) })), + framework::dataset::make("DstQuantizationInfo", { QuantizationInfo(0.7f, 2) })), + framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })), + ActivationFunctionsDataset)) +{ + validate(CLAccessor(_target), _reference, tolerance_qasymm8); +} +TEST_SUITE(Dilation) +FIXTURE_DATA_TEST_CASE(RunSmall, CLDepthwiseConvolutionLayerQuantizedPerChannelFixture<uint8_t>, framework::DatasetMode::PRECOMMIT, + combine(combine(combine(combine(combine(combine(combine(datasets::SmallDepthwiseDilatedConvolutionLayerDataset(), + depth_multipliers), + framework::dataset::make("SrcDataType", DataType::QASYMM8)), + framework::dataset::make("WeightsDataType", DataType::QSYMM8_PER_CHANNEL)), + framework::dataset::make("SrcQuantizationInfo", { QuantizationInfo(0.5f, 10) })), + framework::dataset::make("DstQuantizationInfo", { QuantizationInfo(0.8, 1) })), + framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })), + ActivationFunctionsDataset)) +{ + validate(CLAccessor(_target), _reference, tolerance_qasymm8); +} +FIXTURE_DATA_TEST_CASE(RunLarge, CLDepthwiseConvolutionLayerQuantizedPerChannelFixture<uint8_t>, framework::DatasetMode::NIGHTLY, + combine(combine(combine(combine(combine(combine(combine(datasets::LargeDepthwiseDilatedConvolutionLayerDataset(), + large_depth_multipliers), + framework::dataset::make("SrcDataType", DataType::QASYMM8)), + framework::dataset::make("WeightsDataType", DataType::QSYMM8_PER_CHANNEL)), + framework::dataset::make("SrcQuantizationInfo", { QuantizationInfo(0.5f, 10) })), + framework::dataset::make("DstQuantizationInfo", { QuantizationInfo(0.9f, 11) })), + framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })), + ActivationFunctionsDataset)) +{ + validate(CLAccessor(_target), _reference, tolerance_qasymm8); +} +TEST_SUITE_END() // Dilation +TEST_SUITE_END() // Generic +TEST_SUITE(W3x3) +FIXTURE_DATA_TEST_CASE(RunSmall, CLDepthwiseConvolutionLayerQuantizedPerChannelFixture<uint8_t>, framework::DatasetMode::PRECOMMIT, + combine(combine(combine(combine(combine(combine(combine(datasets::SmallDepthwiseConvolutionLayerDataset3x3(), + depth_multipliers), + framework::dataset::make("SrcDataType", DataType::QASYMM8)), + framework::dataset::make("WeightsDataType", DataType::QSYMM8_PER_CHANNEL)), + framework::dataset::make("SrcQuantizationInfo", { QuantizationInfo(0.3f, 10) })), + framework::dataset::make("DstQuantizationInfo", { QuantizationInfo(0.5f, 4) })), + framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })), + ActivationFunctionsDataset)) +{ + validate(CLAccessor(_target), _reference, tolerance_qasymm8); +} +FIXTURE_DATA_TEST_CASE(RunLarge, CLDepthwiseConvolutionLayerQuantizedPerChannelFixture<uint8_t>, framework::DatasetMode::NIGHTLY, + combine(combine(combine(combine(combine(combine(combine(datasets::LargeDepthwiseConvolutionLayerDataset3x3(), + large_depth_multipliers), + framework::dataset::make("SrcDataType", DataType::QASYMM8)), + framework::dataset::make("WeightsDataType", DataType::QSYMM8_PER_CHANNEL)), + framework::dataset::make("SrcQuantizationInfo", { QuantizationInfo(0.5f, 10) })), + framework::dataset::make("DstQuantizationInfo", { QuantizationInfo(0.5f, 10) })), + framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })), + ActivationFunctionsDataset)) +{ + validate(CLAccessor(_target), _reference, tolerance_qasymm8); +} +TEST_SUITE(Dilation) +FIXTURE_DATA_TEST_CASE(RunSmall, CLDepthwiseConvolutionLayerQuantizedPerChannelFixture<uint8_t>, framework::DatasetMode::PRECOMMIT, + combine(combine(combine(combine(combine(combine(combine(datasets::SmallDepthwiseDilatedConvolutionLayerDataset3x3(), + depth_multipliers), + framework::dataset::make("SrcDataType", DataType::QASYMM8)), + framework::dataset::make("WeightsDataType", DataType::QSYMM8_PER_CHANNEL)), + framework::dataset::make("SrcQuantizationInfo", { QuantizationInfo(0.5f, 10) })), + framework::dataset::make("DstQuantizationInfo", { QuantizationInfo(0.5f, 10) })), + framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })), + ActivationFunctionsDataset)) +{ + validate(CLAccessor(_target), _reference, tolerance_qasymm8); +} +FIXTURE_DATA_TEST_CASE(RunLarge, CLDepthwiseConvolutionLayerQuantizedPerChannelFixture<uint8_t>, framework::DatasetMode::NIGHTLY, + combine(combine(combine(combine(combine(combine(combine(datasets::LargeDepthwiseDilatedConvolutionLayerDataset3x3(), + large_depth_multipliers), + framework::dataset::make("SrcDataType", DataType::QASYMM8)), + framework::dataset::make("WeightsDataType", DataType::QSYMM8_PER_CHANNEL)), + framework::dataset::make("SrcQuantizationInfo", { QuantizationInfo(0.5f, 10) })), + framework::dataset::make("DstQuantizationInfo", { QuantizationInfo(0.5f, 10) })), + framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC })), + ActivationFunctionsDataset)) +{ + validate(CLAccessor(_target), _reference, tolerance_qasymm8); +} +TEST_SUITE_END() // Dilation +TEST_SUITE_END() // W3x3 +TEST_SUITE_END() // QSYMM8_PER_CHANNEL TEST_SUITE_END() // Quantized TEST_SUITE_END() // DepthwiseConvolutionLayer |