23.05
|
Go to the documentation of this file.
33 return std::make_unique<RefWorkloadFactory>(PolymorphicPointerDowncast<RefMemoryManager>(memoryManager));
39 auto memoryManager = std::make_shared<RefMemoryManager>();
43 std::unique_ptr<RefTensorHandleFactory> factory = std::make_unique<RefTensorHandleFactory>(memoryManager);
49 return std::make_unique<RefWorkloadFactory>(PolymorphicPointerDowncast<RefMemoryManager>(memoryManager));
65 return std::make_unique<RefMemoryManager>();
80 std::map<LayerGuid, Layer*> untouched;
85 Layer& base = *(PolymorphicDowncast<Layer*>(*it));
86 untouched.insert({base.
GetGuid(), &base});
93 Layer& base = *(PolymorphicDowncast<Layer*>(*it));
99 Pooling2dLayer* baseLayer = PolymorphicDowncast<Pooling2dLayer*>(&base);
104 PadLayer* padLayer = PolymorphicDowncast<PadLayer*>(
112 FoldPadIntoAveragePool2d<Pooling2dLayer>(optimizationViews, baseLayer,
113 poolingDescriptor, padLayer);
114 untouched.erase(baseLayer->
GetGuid());
115 untouched.erase(padLayer->
GetGuid());
130 return optimizationViews;
140 auto memoryManager = std::make_shared<RefMemoryManager>();
144 std::unique_ptr<RefTensorHandleFactory> factory = std::make_unique<RefTensorHandleFactory>(memoryManager);
154 return std::make_unique<DefaultAllocator>();
160 executionData.
m_Data = &workingMemDescriptor;
161 return executionData;
166 executionData.
m_Data = &workingMemDescriptor;
ExecutionData CreateExecutionData(WorkingMemDescriptor &workingMemDescriptor) const override
Returns ExecutionData for the backend.
IConnectableLayerIterator beginIConnectable()
std::vector< ITensorHandleFactory::FactoryId > GetHandleFactoryPreferences() const override
(Optional) Returns a vector of supported TensorHandleFactory ids in preference order.
std::unique_ptr< IWorkloadFactory > IWorkloadFactoryPtr
constexpr const char * RefBackendId()
std::vector< BackendOptions > ModelOptions
void RegisterFactory(std::unique_ptr< ITensorHandleFactory > allocator)
Register a TensorHandleFactory and transfer ownership.
std::shared_ptr< IMemoryManager > IMemoryManagerSharedPtr
void ReportUntouchedLayers(OptimizationViews &optimizationViews, std::map< LayerGuid, Layer * > untouched)
Copyright (c) 2021 ARM Limited and Contributors.
std::unique_ptr< IMemoryManager > IMemoryManagerUniquePtr
IConnectableLayerIterator endIConnectable()
bool TryFoldPadIntoLayer2d(const PadDescriptor &padDescriptor, Descriptor &layerDescriptor, const TensorInfo &tensorInfo)
std::unique_ptr< ICustomAllocator > GetDefaultAllocator() const override
Returns the default memory allocator for the backend.
const TensorInfo & GetTensorInfo() const override
const OutputSlot & GetOutputSlot(unsigned int index=0) const override
Get the const output slot handle by slot index.
void AddUntouchedSubgraph(SubgraphView &&subgraph)
static const FactoryId & GetIdStatic()
void RegisterCopyAndImportFactoryPair(ITensorHandleFactory::FactoryId copyFactoryId, ITensorHandleFactory::FactoryId importFactoryId)
Register a pair of TensorHandleFactory Id for Memory Copy and TensorHandleFactory Id for Memory Impor...
LayerType GetType() const override
Returns the armnn::LayerType of this layer.
static const BackendId & GetIdStatic()
The SubgraphView class represents a subgraph of a Graph.
void UpdateExecutionData(ExecutionData &executionData, WorkingMemDescriptor &workingMemDescriptor) const override
Update the ExecutionData for a layer.
IBackendInternal::ILayerSupportSharedPtr GetLayerSupport() const override
std::shared_ptr< arm::pipe::IBackendProfilingContext > IBackendProfilingContextPtr
This is the bridge between backend and backend profiling we'll keep it in the backend namespace.
Layer & GetOwningLayer() const
IBackendInternal::IBackendProfilingContextPtr CreateBackendProfilingContext(const IRuntime::CreationOptions &creationOptions, IBackendProfilingPtr &backendProfiling) override
Create context specifically used for profiling interaction from backends.
std::shared_ptr< ILayerSupport > ILayerSupportSharedPtr
void RegisterTensorHandleFactories(class TensorHandleFactoryRegistry ®istry) override
(Optional) Register TensorHandleFactories Either this method or CreateMemoryManager() and IWorkloadFa...
This layer represents a pad operation.
This layer represents a pooling 2d operation.
const InputSlot & GetInputSlot(unsigned int index) const override
Get a const input slot handle by slot index.
LayerGuid GetGuid() const final
Returns the unique id of the layer.
IBackendInternal::IMemoryManagerUniquePtr CreateMemoryManager() const override
A Pooling2dDescriptor for the Pooling2dLayer.
unsigned int GetNumConnections() const override
OptimizationViews OptimizeSubgraphView(const SubgraphView &subgraph, const ModelOptions &modelOptions) const override
std::unique_ptr< IBackendContext > IBackendContextPtr
std::unique_ptr< arm::pipe::IBackendProfiling > IBackendProfilingPtr
const Substitutions & GetSubstitutions() const
void RegisterMemoryManager(std::shared_ptr< IMemoryManager > memoryManger)
Register a memory manager with shared ownership.
IBackendInternal::IWorkloadFactoryPtr CreateWorkloadFactory(const IBackendInternal::IMemoryManagerSharedPtr &memoryManager=nullptr) const override
const Parameters & GetParameters() const override
If the layer has a descriptor return it.
IBackendInternal::IBackendContextPtr CreateBackendContext(const IRuntime::CreationOptions &) const override
Create the runtime context of the backend.