37 auto memoryManager = std::make_shared<RefMemoryManager>();
41 std::unique_ptr<RefTensorHandleFactory> factory = std::make_unique<RefTensorHandleFactory>(memoryManager);
63 return std::make_unique<RefMemoryManager>();
77 auto it = subgraph.
end();
78 std::map<LayerGuid, Layer*> untouched;
80 while (it != subgraph.
begin())
84 untouched.insert({base.
GetGuid(), &base});
88 while (it != subgraph.
begin())
111 poolingDescriptor, padLayer);
112 untouched.erase(baseLayer->
GetGuid());
113 untouched.erase(padLayer->
GetGuid());
133 convDescriptor, padLayer);
135 untouched.erase(baseLayer->
GetGuid());
136 untouched.erase(padLayer->
GetGuid());
160 untouched.erase(baseLayer->
GetGuid());
161 untouched.erase(padLayer->
GetGuid());
183 return optimizationViews;
193 auto memoryManager = std::make_shared<RefMemoryManager>();
197 std::unique_ptr<RefTensorHandleFactory> factory = std::make_unique<RefTensorHandleFactory>(memoryManager);
207 return std::make_unique<DefaultAllocator>();
This layer represents a convolution 2d operation.
This layer represents a depthwise convolution 2d operation.
std::shared_ptr< ILayerSupport > ILayerSupportSharedPtr
std::unique_ptr< IMemoryManager > IMemoryManagerUniquePtr
std::unique_ptr< arm::pipe::IBackendProfiling > IBackendProfilingPtr
std::shared_ptr< IMemoryManager > IMemoryManagerSharedPtr
std::unique_ptr< IWorkloadFactory > IWorkloadFactoryPtr
std::unique_ptr< IBackendContext > IBackendContextPtr
std::shared_ptr< arm::pipe::IBackendProfilingContext > IBackendProfilingContextPtr
This is the bridge between backend and backend profiling we'll keep it in the backend namespace.
const InputSlot & GetInputSlot(unsigned int index) const override
Get a const input slot handle by slot index.
const OutputSlot & GetOutputSlot(unsigned int index=0) const override
Get the const output slot handle by slot index.
LayerGuid GetGuid() const final
Returns the unique id of the layer.
LayerType GetType() const override
Returns the armnn::LayerType of this layer.
const Parameters & GetParameters() const override
If the layer has a descriptor return it.
void AddUntouchedSubgraph(SubgraphView &&subgraph)
const Subgraphs & GetDeletedSubgraphs() const
const Substitutions & GetSubstitutions() const
unsigned int GetNumConnections() const override
Layer & GetOwningLayer() const
const TensorInfo & GetTensorInfo() const override
This layer represents a pad operation.
This layer represents a pooling 2d operation.
static const BackendId & GetIdStatic()
OptimizationViews OptimizeSubgraphView(const SubgraphView &subgraph, const ModelOptions &modelOptions) const override
void RegisterTensorHandleFactories(class TensorHandleFactoryRegistry ®istry) override
(Optional) Register TensorHandleFactories Either this method or CreateMemoryManager() and IWorkloadFa...
std::vector< ITensorHandleFactory::FactoryId > GetHandleFactoryPreferences() const override
(Optional) Returns a vector of supported TensorHandleFactory ids in preference order.
IBackendInternal::IBackendContextPtr CreateBackendContext(const IRuntime::CreationOptions &) const override
Create the runtime context of the backend.
IBackendInternal::IWorkloadFactoryPtr CreateWorkloadFactory(const IBackendInternal::IMemoryManagerSharedPtr &memoryManager=nullptr) const override
IBackendInternal::ILayerSupportSharedPtr GetLayerSupport() const override
IBackendInternal::IMemoryManagerUniquePtr CreateMemoryManager() const override
IBackendInternal::IBackendProfilingContextPtr CreateBackendProfilingContext(const IRuntime::CreationOptions &creationOptions, IBackendProfilingPtr &backendProfiling) override
Create context specifically used for profiling interaction from backends.
std::unique_ptr< ICustomAllocator > GetDefaultAllocator() const override
Returns the default memory allocator for the backend.
static const FactoryId & GetIdStatic()
This layer represents a reshape operation.
The SubgraphView class represents a subgraph of a Graph.
IConnectableLayerIterator begin()
IConnectableLayerIterator end()
void RegisterFactory(std::unique_ptr< ITensorHandleFactory > allocator)
Register a TensorHandleFactory and transfer ownership.
void RegisterMemoryManager(std::shared_ptr< IMemoryManager > memoryManger)
Register a memory manager with shared ownership.
void RegisterCopyAndImportFactoryPair(ITensorHandleFactory::FactoryId copyFactoryId, ITensorHandleFactory::FactoryId importFactoryId)
Register a pair of TensorHandleFactory Id for Memory Copy and TensorHandleFactory Id for Memory Impor...
bool TryFoldPadIntoLayer2d(const PadDescriptor &padDescriptor, Descriptor &layerDescriptor, const TensorInfo &tensorInfo)
Copyright (c) 2021 ARM Limited and Contributors.
auto PolymorphicPointerDowncast(const SourceType &value)
Polymorphic downcast for shared pointers and build in pointers.
std::vector< BackendOptions > ModelOptions
void RemoveReshapeLayer(ReshapeLayer *baseLayer, std::map< LayerGuid, Layer * > &untouched, OptimizationViews &optimizationViews)
void ReportUntouchedLayers(OptimizationViews &optimizationViews, std::map< LayerGuid, Layer * > untouched)
constexpr const char * RefBackendId()
void FoldPadLayer2d(OptimizationViews &optimizationViews, LayerT *baseLayer, Descriptor &descriptor, PadLayer *padLayer)
DestType PolymorphicDowncast(SourceType *value)
Polymorphic downcast for build in pointers only.
A Convolution2dDescriptor for the Convolution2dLayer.
A DepthwiseConvolution2dDescriptor for the DepthwiseConvolution2dLayer.
A Pooling2dDescriptor for the Pooling2dLayer.