From c2a60593436387d20ff142a619f4c3955a5cd41b Mon Sep 17 00:00:00 2001 From: Matthew Jackson Date: Fri, 30 Aug 2019 15:19:42 +0100 Subject: COMPMID-2639: CLPadLayer support for 4D padding Add support for 4D padding to CLPadLayerKernel. Add validation tests with 4D padding. Change-Id: I5579cc441a155c03fa1d14c6e77ba8ec693a806d Signed-off-by: Matthew Jackson Reviewed-on: https://review.mlplatform.org/c/1847 Comments-Addressed: Arm Jenkins Reviewed-by: Giorgio Arena Tested-by: Arm Jenkins --- src/runtime/CL/functions/CLPadLayer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/runtime/CL/functions/CLPadLayer.cpp') diff --git a/src/runtime/CL/functions/CLPadLayer.cpp b/src/runtime/CL/functions/CLPadLayer.cpp index dcd0a5b1ad..88b1b77a0d 100644 --- a/src/runtime/CL/functions/CLPadLayer.cpp +++ b/src/runtime/CL/functions/CLPadLayer.cpp @@ -183,7 +183,6 @@ void CLPadLayer::configure(ICLTensor *input, ICLTensor *output, const PaddingLis Status CLPadLayer::validate(const ITensorInfo *input, const ITensorInfo *output, const PaddingList &padding, PixelValue constant_value, PaddingMode mode) { ARM_COMPUTE_RETURN_ERROR_ON(padding.size() > input->num_dimensions()); - TensorShape padded_shape = misc::shape_calculator::compute_padded_shape(input->tensor_shape(), padding); // Use CLCopyKernel and CLMemsetKernel to validate all padding modes as this includes all of the shape and info validation. @@ -213,6 +212,7 @@ Status CLPadLayer::validate(const ITensorInfo *input, const ITensorInfo *output, { case PaddingMode::CONSTANT: { + ARM_COMPUTE_RETURN_ERROR_ON(padding.size() > 4); ARM_COMPUTE_RETURN_ON_ERROR(CLPadLayerKernel::validate(input, output, padding, constant_value, mode)); break; } -- cgit v1.2.1