24.08
|
#include <WorkingMemHandle.hpp>
Classes | |
struct | InputMemDescriptorCoords |
struct | OutputMemDescriptorCoords |
Public Member Functions | |
WorkingMemHandle (NetworkId networkId) | |
WorkingMemHandle (NetworkId networkId, std::vector< InputMemDescriptorCoords > inputLayerInfo, std::vector< OutputMemDescriptorCoords > outputLayerInfo, std::vector< WorkingMemDescriptor > workingMemDescriptors, std::unique_ptr< MemoryManager > memoryManager, std::vector< std::pair< std::shared_ptr< TensorMemory >, MemorySource >> tensorMemory, std::vector< std::unique_ptr< ITensorHandle >> managedTensorHandles, std::vector< std::unique_ptr< ITensorHandle >> unmanagedTensorHandles, std::vector< std::pair< BackendId, ExecutionData >> executionDataVec, BackendPtrMap *backends) | |
~WorkingMemHandle () | |
NetworkId | GetNetworkId () override |
Returns the NetworkId of the Network that this IWorkingMemHandle works with. More... | |
void | Allocate () override |
Allocate the backing memory required for execution. More... | |
void | Free () override |
Free the backing memory required for execution. More... | |
bool | IsAllocated () override |
IsAllocated returns true if the backing memory is currently allocated. More... | |
WorkingMemDescriptor & | GetWorkingMemDescriptorAt (unsigned int id) override |
Get the WorkingMemDescriptor at an index. More... | |
std::pair< BackendId, ExecutionData > & | GetExecutionDataAt (unsigned int id) override |
Get the ExecutionData at an index. More... | |
ITensorHandle * | GetInputHandle (LayerBindingId layerBindingId) const |
ITensorHandle * | GetOutputHandle (LayerBindingId layerBindingId) const |
const std::vector< std::vector< ITensorHandle * >::iterator > & | GetInputConnections (LayerBindingId layerBindingId) const |
const std::vector< std::vector< ITensorHandle * >::iterator > & | GetOutputConnection (LayerBindingId layerBindingId) const |
void | MemSyncOutputs () |
std::vector< LayerBindingId > & | GetBindingIdVector () |
void | ValidateBindingIds () |
Public Member Functions inherited from IWorkingMemHandle | |
virtual | ~IWorkingMemHandle () |
Definition at line 29 of file WorkingMemHandle.hpp.
|
inline |
Definition at line 48 of file WorkingMemHandle.hpp.
WorkingMemHandle | ( | NetworkId | networkId, |
std::vector< InputMemDescriptorCoords > | inputLayerInfo, | ||
std::vector< OutputMemDescriptorCoords > | outputLayerInfo, | ||
std::vector< WorkingMemDescriptor > | workingMemDescriptors, | ||
std::unique_ptr< MemoryManager > | memoryManager, | ||
std::vector< std::pair< std::shared_ptr< TensorMemory >, MemorySource >> | tensorMemory, | ||
std::vector< std::unique_ptr< ITensorHandle >> | managedTensorHandles, | ||
std::vector< std::unique_ptr< ITensorHandle >> | unmanagedTensorHandles, | ||
std::vector< std::pair< BackendId, ExecutionData >> | executionDataVec, | ||
BackendPtrMap * | backends | ||
) |
Definition at line 18 of file WorkingMemHandle.cpp.
References armnn::IgnoreUnused(), and WorkingMemDescriptor::m_Inputs.
|
inline |
|
overridevirtual |
Allocate the backing memory required for execution.
If this is not called, then allocation will be deferred to execution time.
Implements IWorkingMemHandle.
Definition at line 100 of file WorkingMemHandle.cpp.
References WorkingMemHandle::GetWorkingMemDescriptorAt().
Referenced by LoadedNetwork::Execute().
|
overridevirtual |
Free the backing memory required for execution.
Implements IWorkingMemHandle.
Definition at line 125 of file WorkingMemHandle.cpp.
Referenced by WorkingMemHandle::~WorkingMemHandle().
|
inline |
Definition at line 119 of file WorkingMemHandle.hpp.
Referenced by LoadedNetwork::Execute().
|
inlineoverridevirtual |
Get the ExecutionData at an index.
The ExecutionData is paired with a BackendId to be able to call backend specific functions upon it. The ExecutionData are stored in the same order as the Workloads in a topologically sorted graph.
Implements IWorkingMemHandle.
Definition at line 92 of file WorkingMemHandle.hpp.
Referenced by LoadedNetwork::Execute().
|
inline |
Definition at line 107 of file WorkingMemHandle.hpp.
Referenced by LoadedNetwork::Execute().
|
inline |
Definition at line 97 of file WorkingMemHandle.hpp.
Referenced by LoadedNetwork::Execute().
|
inlineoverridevirtual |
Returns the NetworkId of the Network that this IWorkingMemHandle works with.
Implements IWorkingMemHandle.
Definition at line 64 of file WorkingMemHandle.hpp.
|
inline |
Definition at line 112 of file WorkingMemHandle.hpp.
Referenced by LoadedNetwork::Execute().
|
inline |
Definition at line 102 of file WorkingMemHandle.hpp.
Referenced by LoadedNetwork::Execute().
|
inlineoverridevirtual |
Get the WorkingMemDescriptor at an index.
The WorkingMemDescriptors are stored in the same order as the Workloads in a topologically sorted graph.
Implements IWorkingMemHandle.
Definition at line 84 of file WorkingMemHandle.hpp.
Referenced by WorkingMemHandle::Allocate().
|
inlineoverridevirtual |
IsAllocated returns true if the backing memory is currently allocated.
Implements IWorkingMemHandle.
Definition at line 77 of file WorkingMemHandle.hpp.
Referenced by LoadedNetwork::Execute().
void MemSyncOutputs | ( | ) |
Definition at line 136 of file WorkingMemHandle.cpp.
References armnn::Map, and armnn::Unmap.
Referenced by LoadedNetwork::Execute().
void ValidateBindingIds | ( | ) |
Definition at line 145 of file WorkingMemHandle.cpp.
Referenced by LoadedNetwork::Execute().