24.08
|
#include <TensorHandleFactoryRegistry.hpp>
Public Member Functions | |
TensorHandleFactoryRegistry ()=default | |
TensorHandleFactoryRegistry (const TensorHandleFactoryRegistry &other)=delete | |
TensorHandleFactoryRegistry (TensorHandleFactoryRegistry &&other)=delete | |
void | RegisterFactory (std::unique_ptr< ITensorHandleFactory > allocator) |
Register a TensorHandleFactory and transfer ownership. More... | |
void | RegisterMemoryManager (std::shared_ptr< IMemoryManager > memoryManger) |
Register a memory manager with shared ownership. More... | |
ITensorHandleFactory * | GetFactory (ITensorHandleFactory::FactoryId id) const |
Find a TensorHandleFactory by Id Returns nullptr if not found. More... | |
ITensorHandleFactory * | GetFactory (ITensorHandleFactory::FactoryId id, MemorySource memSource) const |
Overload of above allowing specification of Memory Source. More... | |
void | RegisterCopyAndImportFactoryPair (ITensorHandleFactory::FactoryId copyFactoryId, ITensorHandleFactory::FactoryId importFactoryId) |
Register a pair of TensorHandleFactory Id for Memory Copy and TensorHandleFactory Id for Memory Import. More... | |
ITensorHandleFactory::FactoryId | GetMatchingImportFactoryId (ITensorHandleFactory::FactoryId copyFactoryId) |
Get a matching TensorHandleFatory Id for Memory Import given TensorHandleFactory Id for Memory Copy. More... | |
void | AquireMemory () |
Aquire memory required for inference. More... | |
void | ReleaseMemory () |
Release memory required for inference. More... | |
std::vector< std::shared_ptr< IMemoryManager > > & | GetMemoryManagers () |
Definition at line 23 of file TensorHandleFactoryRegistry.hpp.
|
default |
|
delete |
|
delete |
void AquireMemory | ( | ) |
Aquire memory required for inference.
Definition at line 78 of file TensorHandleFactoryRegistry.cpp.
ITensorHandleFactory * GetFactory | ( | ITensorHandleFactory::FactoryId | id | ) | const |
Find a TensorHandleFactory by Id Returns nullptr if not found.
Definition at line 39 of file TensorHandleFactoryRegistry.cpp.
Referenced by Graph::AddCompatibilityLayers(), armnn::CalculateEdgeStrategy(), armnn::CalculateSlotOption(), armnn::CalculateSlotOptionForInput(), SplitterLayer::CreateTensorHandles(), ConcatLayer::CreateTensorHandles(), Layer::CreateTensorHandles(), LoadedNetwork::CreateWorkingMemHandle(), LoadedNetwork::ImportInputs(), LoadedNetwork::ImportOutputs(), and armnn::RequiresCopy().
ITensorHandleFactory * GetFactory | ( | ITensorHandleFactory::FactoryId | id, |
MemorySource | memSource | ||
) | const |
Overload of above allowing specification of Memory Source.
Definition at line 52 of file TensorHandleFactoryRegistry.cpp.
ITensorHandleFactory::FactoryId GetMatchingImportFactoryId | ( | ITensorHandleFactory::FactoryId | copyFactoryId | ) |
Get a matching TensorHandleFatory Id for Memory Import given TensorHandleFactory Id for Memory Copy.
Definition at line 72 of file TensorHandleFactoryRegistry.cpp.
|
inline |
Definition at line 58 of file TensorHandleFactoryRegistry.hpp.
void RegisterCopyAndImportFactoryPair | ( | ITensorHandleFactory::FactoryId | copyFactoryId, |
ITensorHandleFactory::FactoryId | importFactoryId | ||
) |
Register a pair of TensorHandleFactory Id for Memory Copy and TensorHandleFactory Id for Memory Import.
Definition at line 66 of file TensorHandleFactoryRegistry.cpp.
Referenced by TosaRefBackend::CreateWorkloadFactory(), ClBackend::CreateWorkloadFactory(), NeonBackend::CreateWorkloadFactory(), RefBackend::CreateWorkloadFactory(), TosaRefBackend::RegisterTensorHandleFactories(), ClBackend::RegisterTensorHandleFactories(), RefBackend::RegisterTensorHandleFactories(), and NeonBackend::RegisterTensorHandleFactories().
void RegisterFactory | ( | std::unique_ptr< ITensorHandleFactory > | allocator | ) |
Register a TensorHandleFactory and transfer ownership.
Definition at line 12 of file TensorHandleFactoryRegistry.cpp.
Referenced by TosaRefBackend::CreateWorkloadFactory(), ClBackend::CreateWorkloadFactory(), NeonBackend::CreateWorkloadFactory(), RefBackend::CreateWorkloadFactory(), GpuFsaBackend::CreateWorkloadFactory(), TosaRefBackend::RegisterTensorHandleFactories(), RefBackend::RegisterTensorHandleFactories(), ClBackend::RegisterTensorHandleFactories(), NeonBackend::RegisterTensorHandleFactories(), and GpuFsaBackend::RegisterTensorHandleFactories().
void RegisterMemoryManager | ( | std::shared_ptr< IMemoryManager > | memoryManger | ) |
Register a memory manager with shared ownership.
Definition at line 34 of file TensorHandleFactoryRegistry.cpp.
Referenced by TosaRefBackend::CreateWorkloadFactory(), ClBackend::CreateWorkloadFactory(), NeonBackend::CreateWorkloadFactory(), RefBackend::CreateWorkloadFactory(), GpuFsaBackend::CreateWorkloadFactory(), TosaRefBackend::RegisterTensorHandleFactories(), RefBackend::RegisterTensorHandleFactories(), ClBackend::RegisterTensorHandleFactories(), NeonBackend::RegisterTensorHandleFactories(), and GpuFsaBackend::RegisterTensorHandleFactories().
void ReleaseMemory | ( | ) |
Release memory required for inference.
Definition at line 86 of file TensorHandleFactoryRegistry.cpp.
Referenced by LoadedNetwork::FreeWorkingMemory().