From 671d4f01d96b62a24cf0688059118a1e7908650e Mon Sep 17 00:00:00 2001 From: Michele Di Giorgio Date: Wed, 14 Oct 2020 12:26:51 +0100 Subject: COMPMID-3724: Remove OpenCL padding: CLGEMMLowpQuantizeDownInt32ScaleByFloatKernel COMPMID-3725: Remove OpenCL padding: CLGEMMLowpQuantizeDownInt32ScaleKernel Change-Id: Idea5974a56861efae3bc255f1224c7f1e88f3650 Signed-off-by: Michele Di Giorgio Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4182 Tested-by: Arm Jenkins Reviewed-by: Giorgio Arena Comments-Addressed: Arm Jenkins --- tests/validation/CL/GEMMLowp.cpp | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/validation/CL/GEMMLowp.cpp b/tests/validation/CL/GEMMLowp.cpp index 8d5ac24de8..00f831b2e2 100644 --- a/tests/validation/CL/GEMMLowp.cpp +++ b/tests/validation/CL/GEMMLowp.cpp @@ -48,7 +48,7 @@ namespace { constexpr AbsoluteTolerance tolerance_quant(1); /**< Tolerance value for comparing reference's output against implementation's output for quantized data types */ -bool validate_output_stage_zero_padding(const TensorShape shape, const DataType dt) +bool validate_output_stage_zero_padding(const TensorShape shape, const DataType dt, const GEMMLowpOutputStageType type) { // Create tensors CLTensor src = create_tensor(shape, DataType::S32, 1); @@ -56,7 +56,7 @@ bool validate_output_stage_zero_padding(const TensorShape shape, const DataType CLTensor dst = create_tensor(shape, dt, 1); GEMMLowpOutputStageInfo info; - info.type = GEMMLowpOutputStageType::QUANTIZE_DOWN_FIXEDPOINT; + info.type = type; info.output_data_type = dt; std::tie(info.gemmlowp_min_bound, info.gemmlowp_max_bound) = quantization::get_min_max_values_from_quantized_data_type(dt); @@ -147,6 +147,13 @@ TEST_SUITE(OutputStage) TEST_SUITE(QuantizeDownInt32Scale) +DATA_TEST_CASE(ValidateZeroPadding, framework::DatasetMode::ALL, combine(datasets::SmallShapes(), framework::dataset::make("DataType", { DataType::QASYMM8, DataType::QASYMM8_SIGNED })), + shape, data_type) +{ + bool status = validate_output_stage_zero_padding(shape, data_type, GEMMLowpOutputStageType::QUANTIZE_DOWN); + ARM_COMPUTE_EXPECT(status, framework::LogLevel::ERRORS); +} + TEST_SUITE(QASYMM8) const auto quantize_down_int32_to_uint8_scale_cases = framework::dataset::make("result_offset", -2, 1) * framework::dataset::make("result_mult_int", 1, 2) * framework::dataset::make("result_shift", 2, @@ -208,7 +215,7 @@ TEST_SUITE(QuantizeDownInt32ScaleByFixedPoint) DATA_TEST_CASE(ValidateZeroPadding, framework::DatasetMode::ALL, combine(datasets::SmallShapes(), framework::dataset::make("DataType", { DataType::QASYMM8, DataType::QASYMM8_SIGNED, DataType::QSYMM16 })), shape, data_type) { - bool status = validate_output_stage_zero_padding(shape, data_type); + bool status = validate_output_stage_zero_padding(shape, data_type, GEMMLowpOutputStageType::QUANTIZE_DOWN_FIXEDPOINT); ARM_COMPUTE_EXPECT(status, framework::LogLevel::ERRORS); } @@ -346,6 +353,13 @@ TEST_SUITE_END() // QuantizeDownInt32ScaleByFixedPoint TEST_SUITE(QuantizeDownInt32ScaleByFloat) +DATA_TEST_CASE(ValidateZeroPadding, framework::DatasetMode::ALL, combine(datasets::SmallShapes(), framework::dataset::make("DataType", { DataType::QASYMM8, DataType::QASYMM8_SIGNED })), + shape, data_type) +{ + bool status = validate_output_stage_zero_padding(shape, data_type, GEMMLowpOutputStageType::QUANTIZE_DOWN_FLOAT); + ARM_COMPUTE_EXPECT(status, framework::LogLevel::ERRORS); +} + TEST_SUITE(QASYMM8) using CLGEMMLowpQuantizeDownInt32ScaleByFloatFixture = GEMMLowpQuantizeDownInt32ScaleByFloatValidationFixture; -- cgit v1.2.1