29 delete static_cast<const T*
>(blob);
41 return std::make_unique<TosaRefWorkloadFactory>(PolymorphicPointerDowncast<TosaRefMemoryManager>(memoryManager));
47 auto memoryManager = std::make_shared<TosaRefMemoryManager>();
51 auto factory = std::make_unique<TosaRefTensorHandleFactory>(memoryManager);
57 return std::make_unique<TosaRefWorkloadFactory>(PolymorphicPointerDowncast<TosaRefMemoryManager>(memoryManager));
73 return std::make_unique<TosaRefMemoryManager>();
86 auto handler = std::make_unique<TosaSerializationHandler>();
95 Layer &base = *(PolymorphicDowncast<Layer*>(*it));
104 handler.get()->GetBlocks().push_back(mappings);
113 std::make_unique<PreCompiledObjectPtr>(handler.release(), DeleteAsType<TosaSerializationHandler>);
117 std::move(*compiledBlob),
119 "TOSA_Pre_Compiled_Layer");
128 return optimizationViews;
139 auto memoryManager = std::make_shared<TosaRefMemoryManager>();
143 auto factory = std::make_unique<TosaRefTensorHandleFactory>(memoryManager);
153 return std::make_unique<DefaultAllocator>();
void RegisterMemoryManager(std::shared_ptr< IMemoryManager > memoryManger)
Register a memory manager with shared ownership.
IConnectableLayerIterator endIConnectable()
std::unique_ptr< IWorkloadFactory > IWorkloadFactoryPtr
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
const BackendId & GetId() const override
std::vector< BackendOptions > ModelOptions
void RegisterFactory(std::unique_ptr< ITensorHandleFactory > allocator)
Register a TensorHandleFactory and transfer ownership.
TosaSerializationBasicBlock * GetTosaMappingFromLayer(Layer *layer, bool isMain=false)
unsigned int GetNumInputSlots() const
IConnectableLayerIterator beginIConnectable()
void AddSubstitution(SubstitutionPair &&substitution)
Copyright (c) 2021 ARM Limited and Contributors.
std::unique_ptr< IMemoryManager > IMemoryManagerUniquePtr
const IOutputSlot * GetIOutputSlot(unsigned int index) const
constexpr const char * TosaRefBackendId()
std::unique_ptr< ICustomAllocator > GetDefaultAllocator() const override
Returns the default memory allocator for the backend.
IBackendInternal::IBackendProfilingContextPtr CreateBackendProfilingContext(const IRuntime::CreationOptions &creationOptions, IBackendProfilingPtr &backendProfiling) override
Create context specifically used for profiling interaction from backends.
The SubgraphView class represents a subgraph of a Graph.
void RegisterCopyAndImportFactoryPair(ITensorHandleFactory::FactoryId copyFactoryId, ITensorHandleFactory::FactoryId importFactoryId)
Register a pair of TensorHandleFactory Id for Memory Copy and TensorHandleFactory Id for Memory Impor...
static const BackendId & GetIdStatic()
IBackendInternal::IWorkloadFactoryPtr CreateWorkloadFactory(const IBackendInternal::IMemoryManagerSharedPtr &memoryManager=nullptr) const override
std::shared_ptr< IMemoryManager > IMemoryManagerSharedPtr
static const FactoryId & GetIdStatic()
IBackendInternal::IMemoryManagerUniquePtr CreateMemoryManager() const override
LayerType GetType() const override
Returns the armnn::LayerType of this layer.
void RegisterTensorHandleFactories(class TensorHandleFactoryRegistry ®istry) override
(Optional) Register TensorHandleFactories Either this method or CreateMemoryManager() and IWorkloadFa...
INetworkPtr & GetINetwork()
std::shared_ptr< arm::pipe::IBackendProfilingContext > IBackendProfilingContextPtr
This is the bridge between backend and backend profiling we'll keep it in the backend namespace...
void DeleteAsType(const void *const blob)
std::shared_ptr< ILayerSupport > ILayerSupportSharedPtr
std::unique_ptr< arm::pipe::IBackendProfiling > IBackendProfilingPtr
IBackendInternal::IBackendContextPtr CreateBackendContext(const IRuntime::CreationOptions &) const override
Create the runtime context of the backend.
IBackendInternal::ILayerSupportSharedPtr GetLayerSupport() const override
OptimizationViews OptimizeSubgraphView(const SubgraphView &subgraph, const ModelOptions &modelOptions) const override
virtual const TensorInfo & GetTensorInfo() const =0
A PreCompiledDescriptor for the PreCompiledLayer.
std::vector< ITensorHandleFactory::FactoryId > GetHandleFactoryPreferences() const override
(Optional) Returns a vector of supported TensorHandleFactory ids in preference order.
unsigned int GetNumOutputSlots() const
std::unique_ptr< IBackendContext > IBackendContextPtr