From f97a5de03fb431127a141eff58b7b7e61a6aaa6a Mon Sep 17 00:00:00 2001 From: Matteo Martincigh Date: Mon, 12 Aug 2019 14:07:59 +0100 Subject: 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 --- src/backends/backendsCommon/DynamicBackendUtils.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) 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 DynamicBackendUtils::GetBackendPaths(const std::string& std::vector 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 uniqueBackendPaths; std::vector tempBackendPaths; std::vector validBackendPaths; -- cgit v1.2.1