aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatteo Martincigh <matteo.martincigh@arm.com>2019-08-12 14:07:59 +0100
committerMatteo Martincigh <matteo.martincigh@arm.com>2019-08-12 14:45:30 +0000
commitf97a5de03fb431127a141eff58b7b7e61a6aaa6a (patch)
treee6536e3177ff6dc3eb7ae5918192ccf969bf737a
parent4e73b429ddfebef9beb64872d3e54a14bceccb29 (diff)
downloadarmnn-f97a5de03fb431127a141eff58b7b7e61a6aaa6a.tar.gz
IVGCVSW-3541 Treat an empty list of backend paths as a special case
* Silently considering the dynamic backend loading feature as disabled if an empty list of paths is passed to ArmNN * This was causing problems during testing as ArmNN's output was containing extra unnecessary warning messages Change-Id: I4ebda412004179817cd54494ccddc964b04b8232 Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
-rw-r--r--src/backends/backendsCommon/DynamicBackendUtils.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/backends/backendsCommon/DynamicBackendUtils.cpp b/src/backends/backendsCommon/DynamicBackendUtils.cpp
index 38ac5ad6af..fadec0c389 100644
--- a/src/backends/backendsCommon/DynamicBackendUtils.cpp
+++ b/src/backends/backendsCommon/DynamicBackendUtils.cpp
@@ -89,6 +89,14 @@ std::vector<std::string> DynamicBackendUtils::GetBackendPaths(const std::string&
std::vector<std::string> DynamicBackendUtils::GetBackendPathsImpl(const std::string& backendPaths)
{
+ // Check if there's any path to process at all
+ if (backendPaths.empty())
+ {
+ // Silently return without issuing a warning as no paths have been passed, so
+ // the whole dynamic backend loading feature can be considered as disabled
+ return {};
+ }
+
std::unordered_set<std::string> uniqueBackendPaths;
std::vector<std::string> tempBackendPaths;
std::vector<std::string> validBackendPaths;