From 11d73272b8df5ceb2629fb916b84c768b7c5c65a Mon Sep 17 00:00:00 2001 From: Sheri Zhang Date: Wed, 28 Oct 2020 14:01:55 +0000 Subject: COMPMID-3706: Add padding assert for kernels that don't have padding Signed-off-by: Sheri Zhang Change-Id: I0a3f0a989a4db9a2abc9c89429e94af4c6b6b366 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4274 Tested-by: Arm Jenkins Reviewed-by: Manuel Bottini Reviewed-by: Michele Di Giorgio Comments-Addressed: Arm Jenkins --- src/core/CL/kernels/CLReshapeLayerKernel.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/core/CL/kernels/CLReshapeLayerKernel.cpp') diff --git a/src/core/CL/kernels/CLReshapeLayerKernel.cpp b/src/core/CL/kernels/CLReshapeLayerKernel.cpp index e08970992e..b14013bc34 100644 --- a/src/core/CL/kernels/CLReshapeLayerKernel.cpp +++ b/src/core/CL/kernels/CLReshapeLayerKernel.cpp @@ -62,6 +62,8 @@ void CLReshapeLayerKernel::configure(const CLCompileContext &compile_context, co ARM_COMPUTE_ERROR_ON_NULLPTR(input, output); ARM_COMPUTE_ERROR_THROW_ON(validate_arguments(input, output)); + auto padding_info = get_padding_info({ input, output }); + // Create kernel std::set build_opts = { "-DDATA_TYPE=" + get_cl_unsigned_type_from_element_size(input->element_size()) }; _kernel = create_kernel(compile_context, "reshape_layer", build_opts); @@ -91,6 +93,8 @@ void CLReshapeLayerKernel::configure(const CLCompileContext &compile_context, co // Set the output valid region output->set_valid_region(ValidRegion(Coordinates(), output->tensor_shape())); ICLKernel::configure_internal(win); + + ARM_COMPUTE_ERROR_ON(has_padding_changed(padding_info)); } Status CLReshapeLayerKernel::validate(const ITensorInfo *input, const ITensorInfo *output) -- cgit v1.2.1