diff options
author | Sadik Armagan <sadik.armagan@arm.com> | 2020-04-27 10:15:41 +0100 |
---|---|---|
committer | Sadik Armagan <sadik.armagan@arm.com> | 2020-04-27 10:15:41 +0100 |
commit | d46368765369a8058398e01361cd22a7793894dd (patch) | |
tree | 87fd3e74f2466c725fcf519c1dfef0e9f731cd81 /test/FullyConnected.cpp | |
parent | 949a69ef997b1d78dca10b4cca833c3e6b3f5436 (diff) | |
download | android-nn-driver-d46368765369a8058398e01361cd22a7793894dd.tar.gz |
IVGCVSW-4692 HAL 1.3 VTS/NNT, Unit test Failures
* Check if the model is prepared.
Signed-off-by: Sadik Armagan <sadik.armagan@arm.com>
Change-Id: Ia6ea7c5b61a1da97acddddfc5431925cbb4f0227
Diffstat (limited to 'test/FullyConnected.cpp')
-rw-r--r-- | test/FullyConnected.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/test/FullyConnected.cpp b/test/FullyConnected.cpp index a6983dd8..2f9cd4b2 100644 --- a/test/FullyConnected.cpp +++ b/test/FullyConnected.cpp @@ -77,7 +77,10 @@ BOOST_AUTO_TEST_CASE(FullyConnected) float* outdata = static_cast<float*>(static_cast<void*>(outMemory->getPointer())); // run the execution - Execute(preparedModel, request); + if (preparedModel.get() != nullptr) + { + Execute(preparedModel, request); + } // check the result BOOST_TEST(outdata[0] == 152); @@ -156,7 +159,10 @@ BOOST_AUTO_TEST_CASE(TestFullyConnected4dInput) float* outdata = static_cast<float*>(static_cast<void*>(outMemory->getPointer())); // run the execution - Execute(preparedModel, request); + if (preparedModel != nullptr) + { + Execute(preparedModel, request); + } // check the result BOOST_TEST(outdata[0] == 1); @@ -242,7 +248,10 @@ BOOST_AUTO_TEST_CASE(TestFullyConnected4dInputReshape) float* outdata = static_cast<float*>(static_cast<void*>(outMemory->getPointer())); // run the execution - Execute(preparedModel, request); + if (preparedModel != nullptr) + { + Execute(preparedModel, request); + } // check the result BOOST_TEST(outdata[0] == 1); |