From f650ea5be66be5c7b16faf5482e793e3a6d2430c Mon Sep 17 00:00:00 2001 From: SiCong Li Date: Wed, 5 Aug 2020 15:04:00 +0100 Subject: COMPMID-3339: Patch2: Remove paddings from im2col*_nhwc cl kernel * Remove channel paddings from all nhwc kernels (im2col_3x3_nhwc, im2col_9x9_nhwc, im2col_generic_nhwc) * Validate that input total spatial dimensions (with x and y paddings) are bigger than or equal to the kernel spatial dimension. - Otherwise it would result in invalid memory reads. - This problem likely existed before, but was made obvious with the removal of implicit paddings * Add zero padding validation tests * Fix Im2ColValidationFixture by not permuting the input shape in case of NHWC Change-Id: I1f895e8938af0e9130cb516106f0b4b665531709 Signed-off-by: SiCong Li Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3696 Tested-by: Arm Jenkins Reviewed-by: Gian Marco Iodice Comments-Addressed: Arm Jenkins --- tests/validation/fixtures/Im2ColFixture.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'tests/validation/fixtures/Im2ColFixture.h') diff --git a/tests/validation/fixtures/Im2ColFixture.h b/tests/validation/fixtures/Im2ColFixture.h index f680da7ae9..e1f33a3575 100644 --- a/tests/validation/fixtures/Im2ColFixture.h +++ b/tests/validation/fixtures/Im2ColFixture.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018 Arm Limited. + * Copyright (c) 2017-2020 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -59,11 +59,6 @@ public: _has_bias = data_type != DataType::QASYMM8; _num_groups = num_groups; - if(_data_layout == DataLayout::NHWC) - { - permute(input_shape, PermutationVector(2U, 0U, 1U)); - } - TensorInfo input_info(input_shape, 1, data_type); input_info.set_data_layout(_data_layout); -- cgit v1.2.1