diff options
author | Sheri Zhang <sheri.zhang@arm.com> | 2020-09-23 11:22:50 +0100 |
---|---|---|
committer | Sheri Zhang <sheri.zhang@arm.com> | 2020-10-06 09:19:36 +0000 |
commit | 4d91dc68adf8a4cc07285fe781469231230df3b9 (patch) | |
tree | 4b8b53ab30f86921031fd2b6b9ff35dfdecc222b /tests/validation/NEON/ReductionOperation.cpp | |
parent | 47ae441b320c0a9f79f8e6036a0b12a1bf68f9ca (diff) | |
download | ComputeLibrary-4d91dc68adf8a4cc07285fe781469231230df3b9.tar.gz |
COMPMID-3181: Remove padding from NEReductionOperationKernel
COMPMID-3803: Remove padding from NEComplexPixelWiseMultiplicationKernel
Signed-off-by: Sheri Zhang <sheri.zhang@arm.com>
Change-Id: I309fc4ab62bacbca9203d2680a9d6d52f76f70e6
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4078
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Manuel Bottini <manuel.bottini@arm.com>
Reviewed-by: Pablo Marquez <pablo.tello@arm.com>
Diffstat (limited to 'tests/validation/NEON/ReductionOperation.cpp')
-rw-r--r-- | tests/validation/NEON/ReductionOperation.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
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<Tensor>(input_shape, data_type, 1, QuantizationInfo()); + Tensor dst = create_tensor<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* |