diff options
author | SiCong Li <sicong.li@arm.com> | 2020-11-17 14:09:01 +0000 |
---|---|---|
committer | SiCong Li <sicong.li@arm.com> | 2020-11-17 16:38:52 +0000 |
commit | 04a0706dddc6ca24cb80e3e0789c6b0f54c48b28 (patch) | |
tree | eb136b5fd7bd4f3e9424cf5bcf4504e5a4f158d1 /tests/validation/CL/PoolingLayer.cpp | |
parent | 1d1bca75f766625140ab0fdf000b6336f013ed83 (diff) | |
download | ComputeLibrary-04a0706dddc6ca24cb80e3e0789c6b0f54c48b28.tar.gz |
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 <sicong.li@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4446
Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'tests/validation/CL/PoolingLayer.cpp')
-rw-r--r-- | tests/validation/CL/PoolingLayer.cpp | 53 |
1 files changed, 0 insertions, 53 deletions
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<CLTensor>(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* |