From 04a0706dddc6ca24cb80e3e0789c6b0f54c48b28 Mon Sep 17 00:00:00 2001 From: SiCong Li Date: Tue, 17 Nov 2020 14:09:01 +0000 Subject: COMPMID-3979 Sanitise Padding Removal epic * Add missing padding immutability asserts in all relevant CL kernels * Remove unnecessary zero padding validation tests. Change-Id: If93f9ccbc988e0286f5e7b135f812141476d5da0 Signed-off-by: SiCong Li Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4446 Reviewed-by: Gian Marco Iodice Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins --- tests/validation/CL/PoolingLayer.cpp | 53 ------------------------------------ 1 file changed, 53 deletions(-) (limited to 'tests/validation/CL/PoolingLayer.cpp') diff --git a/tests/validation/CL/PoolingLayer.cpp b/tests/validation/CL/PoolingLayer.cpp index 071b58323c..c79775e1e2 100644 --- a/tests/validation/CL/PoolingLayer.cpp +++ b/tests/validation/CL/PoolingLayer.cpp @@ -85,39 +85,6 @@ const auto pool_data_layout_dataset = framework::datas const auto pool_fp_mixed_precision_dataset = framework::dataset::make("FpMixedPrecision", { true, false }); -/** Zero padding test */ -bool validate_zero_padding(unsigned int width, DataType data_type) -{ - const PoolingLayerInfo pool_info(PoolingType::MAX, Size2D(2U, 2U), DataLayout::NHWC); - - TensorShape shape(width, 23, 11, 1); - - // Create tensors - CLTensor src = create_tensor(shape, data_type); - CLTensor idx; - CLTensor dst; - - src.info()->set_quantization_info(QuantizationInfo(1.f / 256.f, 0)); - dst.info()->set_quantization_info(QuantizationInfo(1.f / 256.f, 0)); - - CLPoolingLayer pool; - - if(is_data_type_quantized(data_type)) - { - pool.configure(&src, &dst, pool_info, nullptr); - - // Padding can be added along rhs and bias's X dimension - return src.info()->padding().empty() && dst.info()->padding().empty(); - } - else - { - pool.configure(&src, &dst, pool_info, &idx); - - // Padding can be added along rhs and bias's X dimension - return src.info()->padding().empty() && dst.info()->padding().empty() && idx.info()->padding().empty(); - } -} - } // namespace TEST_SUITE(CL) @@ -159,26 +126,6 @@ DATA_TEST_CASE(Validate, framework::DatasetMode::ALL, zip(zip(zip( ARM_COMPUTE_EXPECT(bool(CLPoolingLayer::validate(&input_info.clone()->set_is_resizable(false), &output_info.clone()->set_is_resizable(false), pool_info)) == expected, framework::LogLevel::ERRORS); } -/** Validate zero padding tests - * - * A series of validation tests to check that no padding is added as part of configuration for 4 different scenarios. - * - * Checks performed in order: - * - First dimension multiple of 16 - * - First dimension non-multiple of 16 - * - First dimension less than 16 (vec_size for qasymm8) but multiple - * - First dimension less than 16 (vec_size for qasymm8) non-multiple - * - Tensor with only one element - */ -DATA_TEST_CASE(ValidateZeroPadding, framework::DatasetMode::ALL, zip( -framework::dataset::make("Width", { 32U, 37U, 12U, 13U, 1U }), -framework::dataset::make("DataType", { DataType::F32, DataType::QASYMM8 })), -width, data_type) -{ - bool status = validate_zero_padding(width, data_type); - ARM_COMPUTE_EXPECT(status, framework::LogLevel::ERRORS); -} - // clang-format on // *INDENT-ON* -- cgit v1.2.1