aboutsummaryrefslogtreecommitdiff
path: root/src/armnn/Runtime.cpp
diff options
context:
space:
mode:
authorMatteo Martincigh <matteo.martincigh@arm.com>2019-08-15 12:08:06 +0100
committerMatteo Martincigh <matteo.martincigh@arm.com>2019-08-19 12:12:28 +0000
commit895339092fa9edc0aa59de0309f79bebacc3fa63 (patch)
tree6e98c570423ff4ff292ebd109e9c3792bdd1a3b9 /src/armnn/Runtime.cpp
parentf800de2140ca55f29bacfa6795df7a28aba3e5ff (diff)
downloadarmnn-895339092fa9edc0aa59de0309f79bebacc3fa63.tar.gz
IVGCVSW-3545 Update the device specs with the dynamic backend ids
* Now the utility function RegisterDynamicBackends returns a list of the backend ids that have been registered * The list of registered ids is added to the list of supported backends in the Runtime * Added unit tests Change-Id: I97bbe1f680920358f5baba5a4666e4983b849cac Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
Diffstat (limited to 'src/armnn/Runtime.cpp')
-rw-r--r--src/armnn/Runtime.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/armnn/Runtime.cpp b/src/armnn/Runtime.cpp
index 6b91863deb..9e874848ec 100644
--- a/src/armnn/Runtime.cpp
+++ b/src/armnn/Runtime.cpp
@@ -144,8 +144,7 @@ Runtime::Runtime(const CreationOptions& options)
{
// Store backend contexts for the supported ones
const BackendIdSet& supportedBackends = m_DeviceSpec.GetSupportedBackends();
- auto it = supportedBackends.find(id);
- if (it != supportedBackends.end())
+ if (supportedBackends.find(id) != supportedBackends.end())
{
auto factoryFun = BackendRegistryInstance().GetFactory(id);
auto backend = factoryFun();
@@ -257,7 +256,10 @@ void Runtime::LoadDynamicBackends(const std::string& overrideBackendPath)
m_DynamicBackends = DynamicBackendUtils::CreateDynamicBackends(sharedObjects);
// Register the dynamic backends in the backend registry
- DynamicBackendUtils::RegisterDynamicBackends(m_DynamicBackends);
+ BackendIdSet registeredBackendIds = DynamicBackendUtils::RegisterDynamicBackends(m_DynamicBackends);
+
+ // Add the registered dynamic backend ids to the list of supported backends
+ m_DeviceSpec.AddSupportedBackends(registeredBackendIds);
}
} // namespace armnn