25.02
|
#include <NeonBackend.hpp>
Public Member Functions | |
NeonBackend ()=default | |
~NeonBackend ()=default | |
const BackendId & | GetId () const override |
IBackendInternal::IMemoryManagerUniquePtr | CreateMemoryManager () const override |
IWorkloadFactoryPtr | CreateWorkloadFactory (const IBackendInternal::IMemoryManagerSharedPtr &memoryManager=nullptr) const override |
IWorkloadFactoryPtr | CreateWorkloadFactory (class TensorHandleFactoryRegistry &tensorHandleFactoryRegistry) const override |
IWorkloadFactoryPtr | CreateWorkloadFactory (const IMemoryManagerSharedPtr &memoryManager, const ModelOptions &modelOptions) const override |
IWorkloadFactoryPtr | CreateWorkloadFactory (class TensorHandleFactoryRegistry &tensorHandleFactoryRegistry, const ModelOptions &modelOptions) const override |
IBackendInternal::IBackendContextPtr | CreateBackendContext (const IRuntime::CreationOptions &) const override |
Create the runtime context of the backend. More... | |
IBackendInternal::IBackendProfilingContextPtr | CreateBackendProfilingContext (const IRuntime::CreationOptions &, IBackendProfilingPtr &backendProfiling) override |
Create context specifically used for profiling interaction from backends. More... | |
IBackendInternal::ILayerSupportSharedPtr | GetLayerSupport () const override |
IBackendInternal::ILayerSupportSharedPtr | GetLayerSupport (const ModelOptions &modelOptions) const override |
OptimizationViews | OptimizeSubgraphView (const SubgraphView &subgraph, const ModelOptions &modelOptions) const override |
std::vector< ITensorHandleFactory::FactoryId > | GetHandleFactoryPreferences () const override |
(Optional) Returns a vector of supported TensorHandleFactory ids in preference order. More... | |
void | RegisterTensorHandleFactories (class TensorHandleFactoryRegistry ®istry) override |
(Optional) Register TensorHandleFactories Either this method or CreateMemoryManager() and IWorkloadFactory::CreateTensor() IWorkloadFactory::CreateSubtensor() methods must be implemented. More... | |
IBackendInternal::IBackendSpecificModelContextPtr | CreateBackendSpecificModelContext (const ModelOptions &modelOptions) const override |
BackendCapabilities | GetCapabilities () const override |
Returns a BackendCapability if the backend lists the capability The BackendCapability must then be inspected to check whether or not that BackendCapability is supported Otherwise returns an EmptyOptional if the BackendCapability is unlisted. More... | |
std::unique_ptr< ICustomAllocator > | GetDefaultAllocator () const override |
Returns the default memory allocator for the backend. More... | |
![]() | |
~IBackendInternal () override=default | |
Allow backends created by the factory function to be destroyed through IBackendInternal. More... | |
virtual IWorkloadFactoryPtr | CreateWorkloadFactory (class TensorHandleFactoryRegistry &tensorHandleFactoryRegistry, const ModelOptions &modelOptions, MemorySourceFlags inputFlags, MemorySourceFlags outputFlags) const |
virtual OptimizationViews | OptimizeSubgraphView (const SubgraphView &subgraph) const |
bool | SupportsTensorAllocatorAPI () const |
ITensorHandleFactory::FactoryId | GetBackwardCompatibleFavoriteHandleFactory () |
virtual void | RegisterTensorHandleFactories (class TensorHandleFactoryRegistry ®istry, MemorySourceFlags inputFlags, MemorySourceFlags outputFlags) |
(Optional) Register TensorHandleFactories Either this method or CreateMemoryManager() and IWorkloadFactory::CreateTensor() IWorkloadFactory::CreateSubtensor() methods must be implemented. More... | |
virtual bool | UseCustomMemoryAllocator (std::shared_ptr< ICustomAllocator > allocator, armnn::Optional< std::string & > errMsg) |
Signals the backend to use a custom memory allocator provided by the user. More... | |
virtual unsigned int | GetNumberOfCacheFiles () const |
Returns the number of files cached if backend supports caching. More... | |
Static Public Member Functions | |
static const BackendId & | GetIdStatic () |
![]() | |
static constexpr BackendVersion | GetApiVersion () |
Returns the version of the Backend API. More... | |
Additional Inherited Members | |
![]() | |
using | IWorkloadFactoryPtr = std::unique_ptr< IWorkloadFactory > |
using | IBackendContextPtr = std::unique_ptr< IBackendContext > |
using | IBackendProfilingContextPtr = std::shared_ptr< arm::pipe::IBackendProfilingContext > |
This is the bridge between backend and backend profiling we'll keep it in the backend namespace. More... | |
using | IBackendProfilingPtr = std::unique_ptr< arm::pipe::IBackendProfiling > |
using | ILayerSupportSharedPtr = std::shared_ptr< ILayerSupport > |
using | IBackendSpecificModelContextPtr = std::shared_ptr< IBackendModelContext > |
using | IMemoryManagerUniquePtr = std::unique_ptr< IMemoryManager > |
using | IMemoryManagerSharedPtr = std::shared_ptr< IMemoryManager > |
![]() | |
IBackendInternal ()=default | |
Creation must be done through a specific backend interface. More... | |
![]() | |
IBackend () | |
virtual | ~IBackend () |
Definition at line 29 of file NeonBackend.hpp.
|
default |
|
default |
|
overridevirtual |
Create the runtime context of the backend.
Implementations may return a default-constructed IBackendContextPtr if no context is needed at runtime. Implementations must throw BackendUnavailableException if the backend cannot be used (for example, necessary accelerator hardware is not present). The default implementation always returns a default-constructed pointer.
Reimplemented from IBackendInternal.
Definition at line 109 of file NeonBackend.cpp.
|
overridevirtual |
Create context specifically used for profiling interaction from backends.
Reimplemented from IBackendInternal.
Definition at line 114 of file NeonBackend.cpp.
|
overridevirtual |
Reimplemented from IBackendInternal.
Definition at line 120 of file NeonBackend.cpp.
Referenced by NeonBackend::CreateWorkloadFactory(), and NeonBackend::GetLayerSupport().
|
overridevirtual |
Reimplemented from IBackendInternal.
Definition at line 52 of file NeonBackend.cpp.
References BaseMemoryManager::Offset.
|
overridevirtual |
Reimplemented from IBackendInternal.
Definition at line 72 of file NeonBackend.cpp.
References BaseMemoryManager::Offset, TensorHandleFactoryRegistry::RegisterCopyAndImportFactoryPair(), TensorHandleFactoryRegistry::RegisterFactory(), and TensorHandleFactoryRegistry::RegisterMemoryManager().
|
overridevirtual |
Reimplemented from IBackendInternal.
Definition at line 91 of file NeonBackend.cpp.
References NeonBackend::CreateBackendSpecificModelContext(), BaseMemoryManager::Offset, TensorHandleFactoryRegistry::RegisterCopyAndImportFactoryPair(), TensorHandleFactoryRegistry::RegisterFactory(), and TensorHandleFactoryRegistry::RegisterMemoryManager().
|
overridevirtual |
Implements IBackendInternal.
Definition at line 58 of file NeonBackend.cpp.
|
overridevirtual |
Reimplemented from IBackendInternal.
Definition at line 65 of file NeonBackend.cpp.
References NeonBackend::CreateBackendSpecificModelContext().
|
inlineoverridevirtual |
Returns a BackendCapability if the backend lists the capability The BackendCapability must then be inspected to check whether or not that BackendCapability is supported Otherwise returns an EmptyOptional if the BackendCapability is unlisted.
Reimplemented from IBackendInternal.
Definition at line 68 of file NeonBackend.hpp.
References armnn::cpuAccCapabilities.
|
overridevirtual |
Returns the default memory allocator for the backend.
Reimplemented from IBackendInternal.
Definition at line 643 of file NeonBackend.cpp.
|
overridevirtual |
(Optional) Returns a vector of supported TensorHandleFactory ids in preference order.
Reimplemented from IBackendInternal.
Definition at line 624 of file NeonBackend.cpp.
References NeonTensorHandleFactory::GetIdStatic().
|
inlineoverridevirtual |
Implements IBackend.
Definition at line 36 of file NeonBackend.hpp.
References NeonBackend::GetIdStatic().
|
static |
Definition at line 46 of file NeonBackend.cpp.
References armnn::NeonBackendId().
Referenced by NeonBackend::GetId().
|
overridevirtual |
Implements IBackendInternal.
Definition at line 126 of file NeonBackend.cpp.
|
overridevirtual |
Reimplemented from IBackendInternal.
Definition at line 135 of file NeonBackend.cpp.
References NeonBackend::CreateBackendSpecificModelContext().
|
overridevirtual |
Reimplemented from IBackendInternal.
Definition at line 144 of file NeonBackend.cpp.
References armnn::Activation, armnn::Add, INetwork::AddFusedLayer(), armnn::Addition, armnn::AddMulAdd, OptimizationViews::AddUntouchedSubgraph(), armnn::BatchNormalization, SubgraphView::begin(), Layer::BeginOutputSlots(), armnn::BoundedReLu, armnn::ConnectedToLayerWithNCHW(), armnn::Convolution2d, armnn::DepthwiseConvolution2d, armnn::Div, armnn::Division, armnn::ElementwiseBinary, SubgraphView::end(), Layer::EndOutputSlots(), armnn::FullyConnected, Layer::GetAdditionalInformation(), InputSlot::GetConnectedOutputSlot(), OptimizationViews::GetDeletedSubgraphs(), armnn::GetFusedName(), Layer::GetGuid(), OptimizationViews::GetINetwork(), Layer::GetInputSlot(), Layer::GetName(), LayerWithParameters< Parameters >::GetParameters(), OptimizationViews::GetSubstitutions(), OutputSlot::GetTensorInfo(), Layer::GetType(), BatchNormalizationLayer::m_Beta, FullyConnectedDescriptor::m_BiasEnabled, Convolution2dDescriptor::m_BiasEnabled, DepthwiseConvolution2dDescriptor::m_BiasEnabled, BatchNormalizationLayer::m_Gamma, BatchNormalizationLayer::m_Mean, ElementwiseBinaryDescriptor::m_Operation, BatchNormalizationLayer::m_Variance, ReduceDescriptor::m_vAxis, armnn::Mul, armnn::Multiplication, armnn::NeonAdditionWorkloadValidate(), armnn::NeonBatchNormalizationValidate(), armnn::NeonConvolution2dWorkloadValidate(), armnn::NeonDepthwiseConvolutionWorkloadValidate(), armnn::NeonDivisionWorkloadValidate(), armnn::NeonFullyConnectedWorkloadValidate(), armnn::NeonFusedWorkloadValidate(), armnn::NeonMultiplicationWorkloadValidate(), armnn::NeonSubtractionWorkloadValidate(), armnn::Reduce, armnn::ReLu, armnn::RemoveReshapeLayer(), armnn::ReportUntouchedLayers(), armnn::Reshape, Layer::SetAdditionalInfoForObject(), armnn::Sub, and armnn::Subtraction.
|
overridevirtual |
(Optional) Register TensorHandleFactories Either this method or CreateMemoryManager() and IWorkloadFactory::CreateTensor() IWorkloadFactory::CreateSubtensor() methods must be implemented.
Reimplemented from IBackendInternal.
Definition at line 629 of file NeonBackend.cpp.
References BaseMemoryManager::Offset, TensorHandleFactoryRegistry::RegisterCopyAndImportFactoryPair(), TensorHandleFactoryRegistry::RegisterFactory(), and TensorHandleFactoryRegistry::RegisterMemoryManager().