IVGCVSW-3541 Get the paths where to load the dynamic backends from
* Adds GetBackendPaths and IsPathValid to DynamicBackendUtils
* Adds related unit tests
Change-Id: I94e377d92a88a4b5d48026f6ad5b4d5387d20c21
Signed-off-by: Jan Eilers <jan.eilers@arm.com>
Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
diff --git a/src/backends/backendsCommon/DynamicBackendUtils.hpp b/src/backends/backendsCommon/DynamicBackendUtils.hpp
index 0a2d428..f0bfd3b 100644
--- a/src/backends/backendsCommon/DynamicBackendUtils.hpp
+++ b/src/backends/backendsCommon/DynamicBackendUtils.hpp
@@ -11,9 +11,14 @@
#include <string>
#include <dlfcn.h>
+#include <vector>
#include <boost/format.hpp>
+#if !defined(DYNAMIC_BACKEND_PATHS)
+#define DYNAMIC_BACKEND_PATHS ""
+#endif
+
namespace armnn
{
@@ -28,9 +33,13 @@
static bool IsBackendCompatible(const BackendVersion& backendVersion);
+ static std::vector<std::string> GetBackendPaths(const std::string& overrideBackendPath = "");
+ static bool IsPathValid(const std::string& path);
+
protected:
- /// Protected for testing purposes
+ /// Protected methods for testing purposes
static bool IsBackendCompatibleImpl(const BackendVersion& backendApiVersion, const BackendVersion& backendVersion);
+ static std::vector<std::string> GetBackendPathsImpl(const std::string& backendPaths);
private:
static std::string GetDlError();