aboutsummaryrefslogtreecommitdiff
path: root/tests/validation/NEON/Gather.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/validation/NEON/Gather.cpp')
-rw-r--r--tests/validation/NEON/Gather.cpp34
1 files changed, 8 insertions, 26 deletions
diff --git a/tests/validation/NEON/Gather.cpp b/tests/validation/NEON/Gather.cpp
index 6c7faa0032..0aea19939e 100644
--- a/tests/validation/NEON/Gather.cpp
+++ b/tests/validation/NEON/Gather.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019 ARM Limited.
+ * Copyright (c) 2019-2022 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -97,35 +97,17 @@ DATA_TEST_CASE(Validate, framework::DatasetMode::ALL, zip(zip(zip(zip(
// clang-format on
// *INDENT-ON*
-DATA_TEST_CASE(Configuration,
- framework::DatasetMode::ALL,
- combine(arm_compute::test::datasets::SmallGatherDataset(), framework::dataset::make("DataType", { DataType::F32 })),
- input_shape, indices_shape, axis, data_type)
-{
- const uint32_t actual_axis = wrap_around(axis, static_cast<int>(input_shape.num_dimensions()));
- Tensor src = create_tensor<Tensor>(input_shape, data_type);
- Tensor indices = create_tensor<Tensor>(indices_shape, DataType::U32);
- TensorShape dst_shape = arm_compute::misc::shape_calculator::compute_gather_shape(input_shape, indices_shape, actual_axis);
- Tensor dst = create_tensor<Tensor>(dst_shape, data_type);
-
- // Create and Configure function
- NEGather gather;
- gather.configure(&src, &indices, &dst, axis);
-
- // Validate valid region
- const ValidRegion valid_region = shape_to_valid_region(dst.info()->tensor_shape());
- validate(dst.info()->valid_region(), valid_region);
-}
-
template <typename T>
using NEGatherFixture = GatherFixture<Tensor, Accessor, NEGather, T>;
+const auto gather_small_shapes = arm_compute::test::framework::dataset::concat(datasets::SmallGatherDataset(), datasets::SmallGatherMultiDimIndicesDataset());
+
TEST_SUITE(Float)
TEST_SUITE(FP16)
FIXTURE_DATA_TEST_CASE(RunSmall,
NEGatherFixture<half>,
framework::DatasetMode::PRECOMMIT,
- combine(datasets::SmallGatherDataset(), framework::dataset::make("DataType", DataType::F16)))
+ combine(gather_small_shapes, framework::dataset::make("DataType", DataType::F16)))
{
// Validate output
validate(Accessor(_target), _reference);
@@ -145,7 +127,7 @@ TEST_SUITE(FP32)
FIXTURE_DATA_TEST_CASE(RunSmall,
NEGatherFixture<float>,
framework::DatasetMode::PRECOMMIT,
- combine(datasets::SmallGatherDataset(), framework::dataset::make("DataType", DataType::F32)))
+ combine(gather_small_shapes, framework::dataset::make("DataType", DataType::F32)))
{
// Validate output
validate(Accessor(_target), _reference);
@@ -166,7 +148,7 @@ TEST_SUITE(U8)
FIXTURE_DATA_TEST_CASE(RunSmall,
NEGatherFixture<uint8_t>,
framework::DatasetMode::PRECOMMIT,
- combine(datasets::SmallGatherDataset(), framework::dataset::make("DataType", DataType::U8)))
+ combine(gather_small_shapes, framework::dataset::make("DataType", DataType::U8)))
{
// Validate output
validate(Accessor(_target), _reference);
@@ -186,7 +168,7 @@ TEST_SUITE(U16)
FIXTURE_DATA_TEST_CASE(RunSmall,
NEGatherFixture<uint16_t>,
framework::DatasetMode::PRECOMMIT,
- combine(datasets::SmallGatherDataset(), framework::dataset::make("DataType", DataType::U16)))
+ combine(gather_small_shapes, framework::dataset::make("DataType", DataType::U16)))
{
// Validate output
validate(Accessor(_target), _reference);
@@ -203,7 +185,7 @@ FIXTURE_DATA_TEST_CASE(RunLarge,
TEST_SUITE_END() // U16
TEST_SUITE_END() // Gather
-TEST_SUITE_END() // NEON
+TEST_SUITE_END() // Neon
} // namespace validation
} // namespace test
} // namespace arm_compute