diff options
author | Michele Di Giorgio <michele.digiorgio@arm.com> | 2020-10-14 12:26:51 +0100 |
---|---|---|
committer | Michele Di Giorgio <michele.digiorgio@arm.com> | 2020-10-16 17:19:40 +0000 |
commit | 671d4f01d96b62a24cf0688059118a1e7908650e (patch) | |
tree | 33ee626be7de34f0c7fb91da9cb136004c361cb7 /tests/validation/CL | |
parent | 3b9a564fd4573d7cf09e3203eb8a9a30fd5969c9 (diff) | |
download | ComputeLibrary-671d4f01d96b62a24cf0688059118a1e7908650e.tar.gz |
COMPMID-3724: Remove OpenCL padding: CLGEMMLowpQuantizeDownInt32ScaleByFloatKernel
COMPMID-3725: Remove OpenCL padding: CLGEMMLowpQuantizeDownInt32ScaleKernel
Change-Id: Idea5974a56861efae3bc255f1224c7f1e88f3650
Signed-off-by: Michele Di Giorgio <michele.digiorgio@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4182
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Giorgio Arena <giorgio.arena@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'tests/validation/CL')
-rw-r--r-- | tests/validation/CL/GEMMLowp.cpp | 20 |
1 files changed, 17 insertions, 3 deletions
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<float> 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<CLTensor>(shape, DataType::S32, 1); @@ -56,7 +56,7 @@ bool validate_output_stage_zero_padding(const TensorShape shape, const DataType CLTensor dst = create_tensor<CLTensor>(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<CLTensor, CLAccessor, CLGEMMLowpOutputStage, uint8_t>; |