aboutsummaryrefslogtreecommitdiff
path: root/src/core/CL/kernels/CLPoolingLayerKernel.cpp
diff options
context:
space:
mode:
authorSiCong Li <sicong.li@arm.com>2020-11-17 14:09:01 +0000
committerSiCong Li <sicong.li@arm.com>2020-11-17 16:38:52 +0000
commit04a0706dddc6ca24cb80e3e0789c6b0f54c48b28 (patch)
treeeb136b5fd7bd4f3e9424cf5bcf4504e5a4f158d1 /src/core/CL/kernels/CLPoolingLayerKernel.cpp
parent1d1bca75f766625140ab0fdf000b6336f013ed83 (diff)
downloadComputeLibrary-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 'src/core/CL/kernels/CLPoolingLayerKernel.cpp')
-rw-r--r--src/core/CL/kernels/CLPoolingLayerKernel.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/CL/kernels/CLPoolingLayerKernel.cpp b/src/core/CL/kernels/CLPoolingLayerKernel.cpp
index 905610c31f..79843cd299 100644
--- a/src/core/CL/kernels/CLPoolingLayerKernel.cpp
+++ b/src/core/CL/kernels/CLPoolingLayerKernel.cpp
@@ -216,6 +216,8 @@ void CLPoolingLayerKernel::configure(const CLCompileContext &compile_context, co
{
ARM_COMPUTE_ERROR_ON_NULLPTR(input, output);
+ auto padding_info = get_padding_info({ input, output, indices });
+
// Set instance variables
_input = input;
_output = output;
@@ -419,6 +421,8 @@ void CLPoolingLayerKernel::configure(const CLCompileContext &compile_context, co
_config_id += support::cpp11::to_string(output->info()->dimension(idx_channel));
_config_id += "_";
_config_id += lower_string(string_from_data_layout(input->info()->data_layout()));
+
+ ARM_COMPUTE_ERROR_ON(input->info()->data_layout() == DataLayout::NHWC && has_padding_changed(padding_info));
}
Status CLPoolingLayerKernel::validate(const ITensorInfo *input, const ITensorInfo *output, const PoolingLayerInfo &pool_info, const ITensorInfo *indices)