aboutsummaryrefslogtreecommitdiff
path: root/tests/validation/NEON/ReductionOperation.cpp
diff options
context:
space:
mode:
authorJohn Richardson <john.richardson@arm.com>2018-05-08 14:34:33 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:52:35 +0000
commit73d4aef12463ac42fa9e31174675f32535a7edd8 (patch)
tree31707cdf30e99ee6a0e55db4eda34090349bc572 /tests/validation/NEON/ReductionOperation.cpp
parent5415a0267523931bae0a012db2438fa7cc89a549 (diff)
downloadComputeLibrary-73d4aef12463ac42fa9e31174675f32535a7edd8.tar.gz
COMPMID-948: Add validation to NEL2NormalizeLayer
Change-Id: I0cfea24884066412c2f13d9acdb72ddbccac7545 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/130407 Tested-by: Jenkins <bsgcomp@arm.com> Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'tests/validation/NEON/ReductionOperation.cpp')
-rw-r--r--tests/validation/NEON/ReductionOperation.cpp32
1 files changed, 31 insertions, 1 deletions
diff --git a/tests/validation/NEON/ReductionOperation.cpp b/tests/validation/NEON/ReductionOperation.cpp
index cf603c67ff..c2f2909c66 100644
--- a/tests/validation/NEON/ReductionOperation.cpp
+++ b/tests/validation/NEON/ReductionOperation.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017 ARM Limited.
+ * Copyright (c) 2017-2018 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -50,6 +50,36 @@ RelativeTolerance<float> tolerance_f32(0.00001f);
TEST_SUITE(NEON)
TEST_SUITE(ReductionOperation)
+// *INDENT-OFF*
+// clang-format off
+DATA_TEST_CASE(Validate, framework::DatasetMode::ALL, zip(zip(zip(
+ framework::dataset::make("InputInfo", { TensorInfo(TensorShape(128U, 64U), 1, DataType::F32), // Mismatching data type input/output
+ TensorInfo(TensorShape(128U, 64U), 2, DataType::F32), // Number of Input channels != 1
+ TensorInfo(TensorShape(128U, 64U), 1, DataType::S16), // DataType != F32
+ TensorInfo(TensorShape(128U, 64U), 1, DataType::F32), // Axis >= num_max_dimensions
+ TensorInfo(TensorShape(128U, 64U), 1, DataType::F32), // Axis > 0
+ TensorInfo(TensorShape(128U, 64U), 1, DataType::F32)
+ }),
+ framework::dataset::make("OutputInfo", { TensorInfo(TensorShape(1U, 64U), 1, DataType::F16),
+ TensorInfo(TensorShape(1U, 64U), 1, DataType::F32),
+ TensorInfo(TensorShape(1U, 64U), 1, DataType::S16),
+ TensorInfo(TensorShape(1U, 64U), 1, DataType::F32),
+ TensorInfo(TensorShape(1U, 64U), 1, DataType::F32),
+ TensorInfo(TensorShape(1U, 64U), 1, DataType::F32)
+ })),
+ framework::dataset::make("Axis", { 0U, 0U, 0U, static_cast<unsigned int>(TensorShape::num_max_dimensions), 1U, 0U })),
+ framework::dataset::make("Expected", { false, false, false, false, false, true })),
+ input_info, output_info, axis, expected)
+{
+ bool is_valid = bool(NEReductionOperation::validate(&input_info.clone()->set_is_resizable(false),
+ &output_info.clone()->set_is_resizable(true),
+ axis,
+ ReductionOperation::SUM_SQUARE));
+ ARM_COMPUTE_EXPECT(is_valid == expected, framework::LogLevel::ERRORS);
+}
+// clang-format on
+// *INDENT-ON*
+
template <typename T>
using NEReductionOperationFixture = ReductionOperationValidationFixture<Tensor, Accessor, NEReductionOperation, T>;