From 77605826a353981d41f0ee346850d411770535f8 Mon Sep 17 00:00:00 2001 From: Nikhil Raj Date: Mon, 3 Sep 2018 11:25:56 +0100 Subject: 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 --- test/1.0/Convolution2D.cpp | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 test/1.0/Convolution2D.cpp (limited to 'test/1.0') 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 +#include + +#include + +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(android::nn::kPaddingValid); +} + +BOOST_AUTO_TEST_CASE(ConvSamePadding_Hal_1_0) +{ + PaddingTestImpl(android::nn::kPaddingSame); +} + +BOOST_AUTO_TEST_SUITE_END() -- cgit v1.2.1