From 4d91dc68adf8a4cc07285fe781469231230df3b9 Mon Sep 17 00:00:00 2001 From: Sheri Zhang Date: Wed, 23 Sep 2020 11:22:50 +0100 Subject: COMPMID-3181: Remove padding from NEReductionOperationKernel COMPMID-3803: Remove padding from NEComplexPixelWiseMultiplicationKernel Signed-off-by: Sheri Zhang Change-Id: I309fc4ab62bacbca9203d2680a9d6d52f76f70e6 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4078 Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins Reviewed-by: Manuel Bottini Reviewed-by: Pablo Marquez --- tests/validation/NEON/ReductionOperation.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'tests/validation/NEON/ReductionOperation.cpp') diff --git a/tests/validation/NEON/ReductionOperation.cpp b/tests/validation/NEON/ReductionOperation.cpp index 47b36c630c..ed17e6968e 100644 --- a/tests/validation/NEON/ReductionOperation.cpp +++ b/tests/validation/NEON/ReductionOperation.cpp @@ -106,6 +106,28 @@ DATA_TEST_CASE(Validate, framework::DatasetMode::ALL, zip(zip(zip(zip( keep_dims)); ARM_COMPUTE_EXPECT(is_valid == expected, framework::LogLevel::ERRORS); } + +DATA_TEST_CASE(ValidateNoPadding, framework::DatasetMode::ALL, combine(combine(combine(combine(datasets::Small4DShapes(), framework::dataset::make("DataType", DataType::F32)), framework::dataset::make("Axis", +{ 0, 1 })), framework::dataset::make("ReductionOperation", {ReductionOperation::SUM,})), KeepDims), + shape, data_type, axis, op, keep_dims) +{ + TensorShape input_shape = TensorShape(shape); + TensorInfo input_info = TensorInfo(input_shape, 1, data_type); + const bool is_arg_min_max = (op == ReductionOperation::ARG_IDX_MAX) || (op == ReductionOperation::ARG_IDX_MIN); + const bool _keep_dims = keep_dims && !is_arg_min_max; + const TensorShape output_shape = arm_compute::misc::shape_calculator::compute_reduced_shape(shape, axis, keep_dims); + + // Create tensors + Tensor src = create_tensor(input_shape, data_type, 1, QuantizationInfo()); + Tensor dst = create_tensor(output_shape, data_type, 1, QuantizationInfo()); + + // Create and configure function + NEReductionOperation reduction; + reduction.configure(&src, &dst, axis, op, _keep_dims); + + validate(src.info()->padding(), PaddingSize(0, 0, 0, 0)); + validate(dst.info()->padding(), PaddingSize(0, 0, 0, 0)); +} // clang-format on // *INDENT-ON* -- cgit v1.2.1