diff options
author | Colm Donelan <Colm.Donelan@arm.com> | 2020-06-03 08:00:28 +0100 |
---|---|---|
committer | Colm Donelan <colm.donelan@arm.com> | 2020-06-03 10:45:45 +0000 |
commit | 0dbe00a9c6fdfc20a3d7815b05269da0e8df7b0a (patch) | |
tree | 2575a8ec6db802e091674a6d7fd3e769e23fa960 /src/backends | |
parent | 9b65a15bfb2aa2113348292c07cc75991e93eb2f (diff) | |
download | armnn-0dbe00a9c6fdfc20a3d7815b05269da0e8df7b0a.tar.gz |
IVGCVSW-4915 Improving messages around SAMPLE_DYNAMIC_BACKEND_ENABLED
* If SAMPLE_DYNAMIC_BACKEND_ENABLED is enabled but DYNAMIC_BACKEND_PATHS
is not set then the user gets failing tests cases with no clear idea
what has gone wrong. Explicitly failing when DYNAMIC_BACKEND_PATHS has
not been set.
* Adding an FAQ entry describing how the user can get confused by our
documented usage of CMake.
Signed-off-by: Colm Donelan <Colm.Donelan@arm.com>
Change-Id: Ic11e14a971f53a6454962354ff728365ccc9de6d
Diffstat (limited to 'src/backends')
-rw-r--r-- | src/backends/backendsCommon/test/DynamicBackendTests.hpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/backends/backendsCommon/test/DynamicBackendTests.hpp b/src/backends/backendsCommon/test/DynamicBackendTests.hpp index 6371e53250..16c2f0db7a 100644 --- a/src/backends/backendsCommon/test/DynamicBackendTests.hpp +++ b/src/backends/backendsCommon/test/DynamicBackendTests.hpp @@ -1439,11 +1439,15 @@ void CreateReferenceDynamicBackendTestImpl() void CreateSampleDynamicBackendTestImpl() { using namespace armnn; - // Using the path override in CreationOptions to load the reference dynamic backend IRuntime::CreationOptions creationOptions; - IRuntimePtr runtime = IRuntime::Create(creationOptions); + // If m_DynamicBackendsPath is an empty string then we know this test will fail. + if(creationOptions.m_DynamicBackendsPath.empty()) + { + BOOST_FAIL("No dynamic backends paths have been set. Ensure DYNAMIC_BACKEND_PATHS is set at compile time."); + } + IRuntimePtr runtime = IRuntime::Create(creationOptions); const BackendRegistry& backendRegistry = BackendRegistryInstance(); BOOST_TEST(backendRegistry.Size() >= 1); @@ -1506,6 +1510,12 @@ void SampleDynamicBackendEndToEndTestImpl() using namespace boost::filesystem; // Create runtime in which test will run IRuntime::CreationOptions options; + // If m_DynamicBackendsPath is an empty string then we know this test will fail. + if(options.m_DynamicBackendsPath.empty()) + { + BOOST_FAIL("No dynamic backends paths have been set. Ensure DYNAMIC_BACKEND_PATHS is set at compile time."); + } + IRuntimePtr runtime(IRuntime::Create(options)); // Builds up the structure of the network. |