ArmNN
NotReleased
|
#include <IBackendInternal.hpp>
Public Types | |
using | IWorkloadFactoryPtr = std::unique_ptr< IWorkloadFactory > |
using | IBackendContextPtr = std::unique_ptr< IBackendContext > |
using | IBackendProfilingContextPtr = std::shared_ptr< armnn::profiling::IBackendProfilingContext > |
using | IBackendProfilingPtr = std::unique_ptr< armnn::profiling::IBackendProfiling > |
using | OptimizationPtr = std::unique_ptr< Optimization > |
using | Optimizations = std::vector< OptimizationPtr > |
using | ILayerSupportSharedPtr = std::shared_ptr< ILayerSupport > |
using | IMemoryManagerUniquePtr = std::unique_ptr< IMemoryManager > |
using | IMemoryManagerSharedPtr = std::shared_ptr< IMemoryManager > |
using | GraphUniquePtr = std::unique_ptr< Graph > |
using | SubgraphViewUniquePtr = std::unique_ptr< SubgraphView > |
using | supported = std::unique_ptr< ISubGraphConverter > |
using | instead = std::unique_ptr< SubGraph > |
Public Member Functions | |
~IBackendInternal () override=default | |
virtual ISubGraphConverterPtr | CreateSubGraphConverter (const std::shared_ptr< SubGraph > &subGraph) const |
virtual Optimizations | GetOptimizations () const |
virtual SubGraphUniquePtr | OptimizeSubGraph (const SubGraph &subGraph, bool &optimizationAttempted) const |
virtual ARMNN_NO_DEPRECATE_WARN_END IMemoryManagerUniquePtr | CreateMemoryManager () const |
virtual IWorkloadFactoryPtr | CreateWorkloadFactory (const IMemoryManagerSharedPtr &memoryManager=nullptr) const =0 |
virtual IWorkloadFactoryPtr | CreateWorkloadFactory (class TensorHandleFactoryRegistry &tensorHandleFactoryRegistry) const |
virtual IBackendContextPtr | CreateBackendContext (const IRuntime::CreationOptions &) const |
virtual IBackendProfilingContextPtr | CreateBackendProfilingContext (const IRuntime::CreationOptions &creationOptions, IBackendProfilingPtr &backendProfiling) |
Create context specifically used for profiling interaction from backends. More... | |
virtual ILayerSupportSharedPtr | GetLayerSupport () const =0 |
virtual OptimizationViews | OptimizeSubgraphView (const SubgraphView &subgraph) const |
bool | SupportsTensorAllocatorAPI () const |
ITensorHandleFactory::FactoryId | GetBackwardCompatibleFavoriteHandleFactory () |
virtual std::vector< ITensorHandleFactory::FactoryId > | GetHandleFactoryPreferences () const |
(Optional) Returns a vector of supported TensorHandleFactory ids in preference order. More... | |
virtual void | RegisterTensorHandleFactories (class TensorHandleFactoryRegistry &) |
Public Member Functions inherited from IBackend | |
virtual const BackendId & | GetId () const =0 |
Static Public Member Functions | |
static constexpr BackendVersion | GetApiVersion () |
Returns the version of the Backend API. More... | |
Protected Member Functions | |
IBackendInternal ()=default | |
Protected Member Functions inherited from IBackend | |
IBackend () | |
virtual | ~IBackend () |
Definition at line 68 of file IBackendInternal.hpp.
using GraphUniquePtr = std::unique_ptr<Graph> |
Definition at line 92 of file IBackendInternal.hpp.
using IBackendContextPtr = std::unique_ptr<IBackendContext> |
Definition at line 81 of file IBackendInternal.hpp.
using IBackendProfilingContextPtr = std::shared_ptr<armnn::profiling::IBackendProfilingContext> |
Definition at line 83 of file IBackendInternal.hpp.
using IBackendProfilingPtr = std::unique_ptr<armnn::profiling::IBackendProfiling> |
Definition at line 84 of file IBackendInternal.hpp.
using ILayerSupportSharedPtr = std::shared_ptr<ILayerSupport> |
Definition at line 87 of file IBackendInternal.hpp.
using IMemoryManagerSharedPtr = std::shared_ptr<IMemoryManager> |
Definition at line 90 of file IBackendInternal.hpp.
using IMemoryManagerUniquePtr = std::unique_ptr<IMemoryManager> |
Definition at line 89 of file IBackendInternal.hpp.
using instead = std::unique_ptr<SubGraph> |
Definition at line 99 of file IBackendInternal.hpp.
using IWorkloadFactoryPtr = std::unique_ptr<IWorkloadFactory> |
Definition at line 80 of file IBackendInternal.hpp.
using OptimizationPtr = std::unique_ptr<Optimization> |
Definition at line 85 of file IBackendInternal.hpp.
using Optimizations = std::vector<OptimizationPtr> |
Definition at line 86 of file IBackendInternal.hpp.
using SubgraphViewUniquePtr = std::unique_ptr<SubgraphView> |
Definition at line 93 of file IBackendInternal.hpp.
using supported = std::unique_ptr<ISubGraphConverter> |
Definition at line 97 of file IBackendInternal.hpp.
|
protecteddefault |
|
overridedefault |
|
virtual |
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 in MockBackend, ClBackend, NeonBackend, and RefBackend.
Definition at line 42 of file IBackendInternal.cpp.
|
virtual |
Create context specifically used for profiling interaction from backends.
Reimplemented in MockBackend, ClBackend, RefBackend, and NeonBackend.
Definition at line 47 of file IBackendInternal.cpp.
|
virtual |
Reimplemented in MockBackend, ClBackend, NeonBackend, and RefBackend.
Definition at line 31 of file IBackendInternal.cpp.
Referenced by LoadedNetwork::MakeLoadedNetwork().
|
virtual |
Definition at line 12 of file IBackendInternal.cpp.
|
pure virtual |
Implemented in MockBackend, ClBackend, NeonBackend, and RefBackend.
Referenced by LoadedNetwork::MakeLoadedNetwork(), and TestDynamicBackendId().
|
virtual |
Reimplemented in ClBackend, NeonBackend, and RefBackend.
Definition at line 36 of file IBackendInternal.cpp.
|
inlinestatic |
Returns the version of the Backend API.
Definition at line 149 of file IBackendInternal.hpp.
References BackendVersion::BackendVersion().
Referenced by DynamicBackend::DynamicBackend(), GetVersion(), and DynamicBackendUtils::IsBackendCompatible().
ITensorHandleFactory::FactoryId GetBackwardCompatibleFavoriteHandleFactory | ( | ) |
Definition at line 85 of file IBackendInternal.cpp.
References IBackendInternal::GetHandleFactoryPreferences(), and ITensorHandleFactory::LegacyFactoryId.
|
virtual |
(Optional) Returns a vector of supported TensorHandleFactory ids in preference order.
Reimplemented in RefBackend, NeonBackend, and ClBackend.
Definition at line 96 of file IBackendInternal.cpp.
Referenced by armnn::CalculateSlotOption(), IBackendInternal::GetBackwardCompatibleFavoriteHandleFactory(), and IBackendInternal::SupportsTensorAllocatorAPI().
|
pure virtual |
Implemented in MockBackend, ClBackend, RefBackend, and NeonBackend.
Referenced by TestDynamicBackendId().
|
virtual |
Reimplemented in MockBackend, ClBackend, RefBackend, and NeonBackend.
Definition at line 18 of file IBackendInternal.cpp.
|
virtual |
Definition at line 23 of file IBackendInternal.cpp.
References ARMNN_NO_DEPRECATE_WARN_END.
Referenced by IBackendInternal::OptimizeSubgraphView().
|
virtual |
Reimplemented in MockBackend, ClBackend, RefBackend, and NeonBackend.
Definition at line 55 of file IBackendInternal.cpp.
References OptimizationViews::AddUntouchedSubgraph(), ARMNN_NO_DEPRECATE_WARN_BEGIN, ARMNN_NO_DEPRECATE_WARN_END, and IBackendInternal::OptimizeSubGraph().
|
inlinevirtual |
(Optional) Register TensorHandleFactories Either this method or CreateMemoryManager() and IWorkloadFactory::CreateTensor()/IWorkloadFactory::CreateSubtensor() methods must be implemented.
Reimplemented in RefBackend, NeonBackend, and ClBackend.
Definition at line 146 of file IBackendInternal.hpp.
Referenced by LoadedNetwork::MakeLoadedNetwork().
bool SupportsTensorAllocatorAPI | ( | ) | const |
Definition at line 80 of file IBackendInternal.cpp.
References IBackendInternal::GetHandleFactoryPreferences().
Referenced by LoadedNetwork::MakeLoadedNetwork().