From b6869dda4a5bf233df009eaac15cf0c220b653f2 Mon Sep 17 00:00:00 2001 From: Manuel Bottini Date: Wed, 16 Dec 2020 15:34:25 +0000 Subject: Adding no padding check asserts to specific CL Kernels Resolves COMPMID-3905 Updates following kernels:: - CLDeconvolutionLayerUpsampleKernel - CLDeconvolutionReshapeOutputKernel - CLInstanceNormalizationLayerKernel - CLMaxUnpoolingLayerKernel - CLPermuteKernel - CLQLSTMLayerNormalizationKernel - CLReorgLayerKernel - CLReverseKernel - CLSpaceToBatchLayerKernel - CLSpaceToDepthLayerKernel - CLGenerateProposalsLayerKernel - CLFFTDigitReverseKernel - CLFFTRadixStageKernel - CLFFTScaleKernel - CLFillBorderKernel - CLGatherKernel - CLStridedSliceKernel - CLBoundingBoxTransformKernel Change-Id: I067ec670ff9cceadb1dfbf60dabef311a567d99a Signed-off-by: Manuel Bottini Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4713 Comments-Addressed: Arm Jenkins Reviewed-by: Giorgio Arena Reviewed-by: Georgios Pinitas Tested-by: Arm Jenkins --- src/core/CL/kernels/CLPermuteKernel.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/core/CL/kernels/CLPermuteKernel.cpp') diff --git a/src/core/CL/kernels/CLPermuteKernel.cpp b/src/core/CL/kernels/CLPermuteKernel.cpp index 4d289f28e6..07d83bddc2 100644 --- a/src/core/CL/kernels/CLPermuteKernel.cpp +++ b/src/core/CL/kernels/CLPermuteKernel.cpp @@ -28,8 +28,8 @@ #include "src/core/helpers/WindowHelpers.h" #include "support/StringSupport.h" -using namespace arm_compute; - +namespace arm_compute +{ CLPermuteKernel::CLPermuteKernel() : _input(nullptr), _output(nullptr), _perm() { @@ -76,6 +76,7 @@ void CLPermuteKernel::configure(const ICLTensor *input, ICLTensor *output, const void CLPermuteKernel::configure(const CLCompileContext &compile_context, const ICLTensor *input, ICLTensor *output, const PermutationVector &perm) { ARM_COMPUTE_ERROR_ON_NULLPTR(input, output); + auto padding_info = get_padding_info({ input, output }); const TensorShape output_shape = get_output_shape(input->info(), perm); // Output auto inizialitation if not yet initialized auto_init_if_empty(*output->info(), input->info()->clone()->set_tensor_shape(output_shape)); @@ -107,6 +108,7 @@ void CLPermuteKernel::configure(const CLCompileContext &compile_context, const I output->info()->set_valid_region(ValidRegion(coord, output->info()->tensor_shape())); ICLKernel::configure_internal(win); + ARM_COMPUTE_ERROR_ON(has_padding_changed(padding_info)); } Status CLPermuteKernel::validate(const ITensorInfo *input, const ITensorInfo *output, const PermutationVector &perm) @@ -140,3 +142,4 @@ void CLPermuteKernel::run(const Window &window, cl::CommandQueue &queue) } while(window.slide_window_slice_4D(slice_in) && window.slide_window_slice_4D(slice_out)); } +} // namespace arm_compute \ No newline at end of file -- cgit v1.2.1