diff options
author | Francis Murtagh <francis.murtagh@arm.com> | 2021-04-29 14:23:04 +0100 |
---|---|---|
committer | Francis Murtagh <francis.murtagh@arm.com> | 2021-04-29 14:55:27 +0000 |
commit | 73d3e2e1616ba5dcdb0a190afba2463742bd4fcc (patch) | |
tree | 5e03f174a763c275d5874c804996048fb0b505ab /src/backends/backendsCommon/TensorHandleFactoryRegistry.cpp | |
parent | 4df97eb257d3fc29b7431d9cb8a054b21d5a7448 (diff) | |
download | armnn-73d3e2e1616ba5dcdb0a190afba2463742bd4fcc.tar.gz |
IVGCVSW-5819 5820 5821 Add MemorySourceFlags to TensorHandleFactoryRegistry::GetFactory
* Modify Layer::CreateTensorHandles to include MemorySource
* Modify INetworkProperties to add MemorySource
* Disable Neon/Cl fallback tests until full import implementation complete
Change-Id: Ia4fff6ea3d4bf6afca33aae358125ccaec7f9a38
Signed-off-by: Francis Murtagh <francis.murtagh@arm.com>
Diffstat (limited to 'src/backends/backendsCommon/TensorHandleFactoryRegistry.cpp')
-rw-r--r-- | src/backends/backendsCommon/TensorHandleFactoryRegistry.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/backends/backendsCommon/TensorHandleFactoryRegistry.cpp b/src/backends/backendsCommon/TensorHandleFactoryRegistry.cpp index 0670461b54..cc8a1361a3 100644 --- a/src/backends/backendsCommon/TensorHandleFactoryRegistry.cpp +++ b/src/backends/backendsCommon/TensorHandleFactoryRegistry.cpp @@ -49,6 +49,20 @@ ITensorHandleFactory* TensorHandleFactoryRegistry::GetFactory(ITensorHandleFacto return nullptr; } +ITensorHandleFactory* TensorHandleFactoryRegistry::GetFactory(ITensorHandleFactory::FactoryId id, + MemorySource memSource) const +{ + for (auto& factory : m_Factories) + { + if (factory->GetId() == id && factory->GetImportFlags() == static_cast<MemorySourceFlags>(memSource)) + { + return factory.get(); + } + } + + return nullptr; +} + void TensorHandleFactoryRegistry::AquireMemory() { for (auto& mgr : m_MemoryManagers) |