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/armnn/Layer.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/armnn/Layer.cpp')
-rw-r--r-- | src/armnn/Layer.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/armnn/Layer.cpp b/src/armnn/Layer.cpp index 13d834f6ae..782f1939b0 100644 --- a/src/armnn/Layer.cpp +++ b/src/armnn/Layer.cpp @@ -249,7 +249,8 @@ void Layer::SetAdditionalInfo(QueueDescriptor& descriptor) const void Layer::CreateTensorHandles(const TensorHandleFactoryRegistry& registry, const IWorkloadFactory& workloadFactory, - const bool IsMemoryManaged) + const bool IsMemoryManaged, + MemorySource memSource) { for (unsigned int idx=0; idx < GetNumOutputSlots(); idx++) { @@ -264,7 +265,15 @@ void Layer::CreateTensorHandles(const TensorHandleFactoryRegistry& registry, } else { - ITensorHandleFactory* handleFactory = registry.GetFactory(factoryId); + ITensorHandleFactory* handleFactory; + if (memSource == MemorySource::Undefined ) + { + handleFactory = registry.GetFactory(factoryId); + } + else + { + handleFactory = registry.GetFactory(factoryId, memSource); + } ARMNN_ASSERT(handleFactory); handler.CreateTensorHandles(*handleFactory, IsMemoryManaged); } |