aboutsummaryrefslogtreecommitdiff
path: root/test/1.0
diff options
context:
space:
mode:
authorNikhil Raj <nikhil.raj@arm.com>2018-09-03 11:25:56 +0100
committerMatthew Bentham <matthew.bentham@arm.com>2018-09-18 12:40:40 +0100
commit77605826a353981d41f0ee346850d411770535f8 (patch)
tree5cdd4c8cb6768d7651089105ee2884f536d8a34c /test/1.0
parentb0717b5241a15e3e4d37a1b51b6e5fd9a92a664f (diff)
downloadandroid-nn-driver-77605826a353981d41f0ee346850d411770535f8.tar.gz
IVGCVSW-1713 Create a minimum unit test to compare the results
before and after passing the FP16 flag in the Android-nn-driver Change-Id: If8d4ca12421c3bee2526eec98f11d393af822373
Diffstat (limited to 'test/1.0')
-rw-r--r--test/1.0/Convolution2D.cpp42
1 files changed, 42 insertions, 0 deletions
diff --git a/test/1.0/Convolution2D.cpp b/test/1.0/Convolution2D.cpp
new file mode 100644
index 00000000..9a5d2393
--- /dev/null
+++ b/test/1.0/Convolution2D.cpp
@@ -0,0 +1,42 @@
+//
+// Copyright © 2017 Arm Ltd. All rights reserved.
+// SPDX-License-Identifier: MIT
+//
+
+#include "../DriverTestHelpers.hpp"
+#include "../Convolution2D.hpp"
+#include "../../1.0/HalPolicy.hpp"
+
+#include <boost/test/unit_test.hpp>
+#include <log/log.h>
+
+#include <OperationsUtils.h>
+
+BOOST_AUTO_TEST_SUITE(Convolution2DTests)
+
+using namespace android::hardware;
+using namespace driverTestHelpers;
+using namespace armnn_driver;
+
+namespace driverTestHelpers
+{
+
+void SetModelFp16Flag(V1_0::Model&, bool)
+{
+ // Nothing to do, the V1_0::Model does not support fp16 precision relaxation.
+ // This function is used for compatibility only.
+}
+
+} // namespace driverTestHelpers
+
+BOOST_AUTO_TEST_CASE(ConvValidPadding_Hal_1_0)
+{
+ PaddingTestImpl<hal_1_0::HalPolicy>(android::nn::kPaddingValid);
+}
+
+BOOST_AUTO_TEST_CASE(ConvSamePadding_Hal_1_0)
+{
+ PaddingTestImpl<hal_1_0::HalPolicy>(android::nn::kPaddingSame);
+}
+
+BOOST_AUTO_TEST_SUITE_END()