aboutsummaryrefslogtreecommitdiff
path: root/tests/benchmark
diff options
context:
space:
mode:
authorGian Marco Iodice <gianmarco.iodice@arm.com>2018-08-23 17:26:21 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:54:54 +0000
commitfbf3ecc1833b860019f965c88cda87ec9f44c3d5 (patch)
treea839e4c12b27346731c1dfd9a58e6eec343e5569 /tests/benchmark
parent1fa17c2edc51e53c6bd388b332d825208f6562e8 (diff)
downloadComputeLibrary-fbf3ecc1833b860019f965c88cda87ec9f44c3d5.tar.gz
COMPMID-1534 - Fix GEMM and Magnitude test for FP16
On GEMM we had accuracy issue On Magnitude we have disabled the fp16 acceleration since we do not have feature parity with CL and this function is not used for ML Change-Id: Iaebe3bbbd2a9f45db0c714aa5ebaf48eb0b65741 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/145467 Tested-by: Jenkins <bsgcomp@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'tests/benchmark')
-rw-r--r--tests/benchmark/CL/Magnitude.cpp12
-rw-r--r--tests/benchmark/NEON/Magnitude.cpp24
-rw-r--r--tests/benchmark/fixtures/MagnitudeFixture.h4
3 files changed, 12 insertions, 28 deletions
diff --git a/tests/benchmark/CL/Magnitude.cpp b/tests/benchmark/CL/Magnitude.cpp
index 5e7508341a..c2bb590476 100644
--- a/tests/benchmark/CL/Magnitude.cpp
+++ b/tests/benchmark/CL/Magnitude.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017 ARM Limited.
+ * Copyright (c) 2017-2018 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -47,12 +47,10 @@ using CLMagnitudeFixture = MagnitudeFixture<CLTensor, CLMagnitude, CLAccessor>;
TEST_SUITE(CL)
TEST_SUITE(Magnitude)
-REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, CLMagnitudeFixture, framework::DatasetMode::PRECOMMIT, combine(combine(combine(datasets::SmallImageShapes(), framework::dataset::make("Format", { Format::S16, Format::S32 })),
- magnitude_types),
- framework::dataset::make("UseFP16", { false })));
-REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, CLMagnitudeFixture, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::LargeImageShapes(), framework::dataset::make("Format", { Format::S16, Format::S32 })),
- magnitude_types),
- framework::dataset::make("UseFP16", { false })));
+REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, CLMagnitudeFixture, framework::DatasetMode::PRECOMMIT, combine(combine(datasets::SmallImageShapes(), framework::dataset::make("Format", { Format::S16, Format::S32 })),
+ magnitude_types));
+REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, CLMagnitudeFixture, framework::DatasetMode::NIGHTLY, combine(combine(datasets::LargeImageShapes(), framework::dataset::make("Format", { Format::S16, Format::S32 })),
+ magnitude_types));
TEST_SUITE_END() // Magnitude
TEST_SUITE_END() // CL
} // namespace benchmark
diff --git a/tests/benchmark/NEON/Magnitude.cpp b/tests/benchmark/NEON/Magnitude.cpp
index e2b1210453..d671b8e005 100644
--- a/tests/benchmark/NEON/Magnitude.cpp
+++ b/tests/benchmark/NEON/Magnitude.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017 ARM Limited.
+ * Copyright (c) 2017-2018 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -47,25 +47,11 @@ using NEMagnitudeFixture = MagnitudeFixture<Tensor, NEMagnitude, Accessor>;
TEST_SUITE(NEON)
TEST_SUITE(Magnitude)
-
-#ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC
-TEST_SUITE(FP16)
-REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, NEMagnitudeFixture, framework::DatasetMode::PRECOMMIT, combine(combine(combine(datasets::SmallImageShapes(), framework::dataset::make("Format", { Format::S16 })),
- magnitude_types),
- framework::dataset::make("UseFP16", { true })));
-REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, NEMagnitudeFixture, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::LargeImageShapes(), framework::dataset::make("Format", { Format::S16 })),
- magnitude_types),
- framework::dataset::make("UseFP16", { true })));
-TEST_SUITE_END() // FP16
-#endif // __ARM_FEATURE_FP16_VECTOR_ARITHMETIC
-
TEST_SUITE(S16)
-REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, NEMagnitudeFixture, framework::DatasetMode::PRECOMMIT, combine(combine(combine(datasets::SmallImageShapes(), framework::dataset::make("Format", { Format::S16 })),
- magnitude_types),
- framework::dataset::make("UseFP16", { false })));
-REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, NEMagnitudeFixture, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::LargeImageShapes(), framework::dataset::make("Format", { Format::S16 })),
- magnitude_types),
- framework::dataset::make("UseFP16", { false })));
+REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, NEMagnitudeFixture, framework::DatasetMode::PRECOMMIT, combine(combine(datasets::SmallImageShapes(), framework::dataset::make("Format", { Format::S16 })),
+ magnitude_types));
+REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, NEMagnitudeFixture, framework::DatasetMode::NIGHTLY, combine(combine(datasets::LargeImageShapes(), framework::dataset::make("Format", { Format::S16 })),
+ magnitude_types));
TEST_SUITE_END() // S16
TEST_SUITE_END() // Magnitude
TEST_SUITE_END() // NEON
diff --git a/tests/benchmark/fixtures/MagnitudeFixture.h b/tests/benchmark/fixtures/MagnitudeFixture.h
index f75540c66f..a1b8054529 100644
--- a/tests/benchmark/fixtures/MagnitudeFixture.h
+++ b/tests/benchmark/fixtures/MagnitudeFixture.h
@@ -41,7 +41,7 @@ class MagnitudeFixture : public framework::Fixture
{
public:
template <typename...>
- void setup(const TensorShape &shape, Format format, MagnitudeType magnitude_type, bool use_fp16)
+ void setup(const TensorShape &shape, Format format, MagnitudeType magnitude_type)
{
// Create tensors
src1 = create_tensor<TensorType>(shape, format);
@@ -49,7 +49,7 @@ public:
dst = create_tensor<TensorType>(shape, format);
// Create and configure function
- magnitude_func.configure(&src1, &src2, &dst, magnitude_type, use_fp16);
+ magnitude_func.configure(&src1, &src2, &dst, magnitude_type);
// Allocate tensors
src1.allocator()->allocate();