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/CLWeightsReshapeKernel.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/core/CL/kernels/CLWeightsReshapeKernel.cpp') diff --git a/src/core/CL/kernels/CLWeightsReshapeKernel.cpp b/src/core/CL/kernels/CLWeightsReshapeKernel.cpp index f69967265a..c06c2d3ec7 100644 --- a/src/core/CL/kernels/CLWeightsReshapeKernel.cpp +++ b/src/core/CL/kernels/CLWeightsReshapeKernel.cpp @@ -88,6 +88,8 @@ void CLWeightsReshapeKernel::configure(const CLCompileContext &compile_context, (biases != nullptr) ? biases->info() : nullptr, output->info(), num_groups)); + auto padding_info = get_padding_info({ input, biases, output }); + const DataType data_type = input->info()->data_type(); _biases = biases; @@ -108,6 +110,8 @@ void CLWeightsReshapeKernel::configure(const CLCompileContext &compile_context, // The CLWeightsReshapeKernel doesn't need padding so update_window_and_padding() can be skipped output->info()->set_valid_region(ValidRegion(Coordinates(), output->info()->tensor_shape())); ICLKernel::configure_internal(win); + + ARM_COMPUTE_ERROR_ON(has_padding_changed(padding_info)); } Status CLWeightsReshapeKernel::validate(const ITensorInfo *input, const ITensorInfo *biases, const ITensorInfo *output, unsigned int num_groups) -- cgit v1.2.1