From a983e4699082a0b1ef685bab7354f2ad9cd37a44 Mon Sep 17 00:00:00 2001 From: Colm Donelan Date: Wed, 20 May 2020 16:12:19 +0100 Subject: Updating Doxygen documentation for 20.05 release. Change-Id: I4d624343ed5fd6ae269c3d53532903084508fd14 Signed-off-by: Colm Donelan --- 20.05/classarmnn_1_1_ref_backend.xhtml | 693 +++++++++++++++++++++++++++++++++ 1 file changed, 693 insertions(+) create mode 100644 20.05/classarmnn_1_1_ref_backend.xhtml (limited to '20.05/classarmnn_1_1_ref_backend.xhtml') diff --git a/20.05/classarmnn_1_1_ref_backend.xhtml b/20.05/classarmnn_1_1_ref_backend.xhtml new file mode 100644 index 0000000000..5d45f6de77 --- /dev/null +++ b/20.05/classarmnn_1_1_ref_backend.xhtml @@ -0,0 +1,693 @@ + + + + + + + + + + + + + +ArmNN: RefBackend Class Reference + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  20.05 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ + +
+ +

#include <RefBackend.hpp>

+
+Inheritance diagram for RefBackend:
+
+
+ + +IBackendInternal +IBackend + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 RefBackend ()=default
 
 ~RefBackend ()=default
 
const BackendIdGetId () const override
 
IBackendInternal::IMemoryManagerUniquePtr CreateMemoryManager () const override
 
IBackendInternal::IWorkloadFactoryPtr CreateWorkloadFactory (const IBackendInternal::IMemoryManagerSharedPtr &memoryManager=nullptr) const override
 
IBackendInternal::IWorkloadFactoryPtr CreateWorkloadFactory (class TensorHandleFactoryRegistry &tensorHandleFactoryRegistry) const override
 
IBackendInternal::IBackendContextPtr CreateBackendContext (const IRuntime::CreationOptions &) const override
 Create the runtime context of the backend. More...
 
IBackendInternal::IBackendProfilingContextPtr CreateBackendProfilingContext (const IRuntime::CreationOptions &creationOptions, IBackendProfilingPtr &backendProfiling) override
 Create context specifically used for profiling interaction from backends. More...
 
IBackendInternal::Optimizations GetOptimizations () const override
 
IBackendInternal::ILayerSupportSharedPtr GetLayerSupport () const override
 
OptimizationViews OptimizeSubgraphView (const SubgraphView &subgraph) const override
 
std::vector< ITensorHandleFactory::FactoryIdGetHandleFactoryPreferences () const override
 (Optional) Returns a vector of supported TensorHandleFactory ids in preference order. More...
 
void RegisterTensorHandleFactories (class TensorHandleFactoryRegistry &registry) override
 (Optional) Register TensorHandleFactories Either this method or CreateMemoryManager() and IWorkloadFactory::CreateTensor()/IWorkloadFactory::CreateSubtensor() methods must be implemented. More...
 
- Public Member Functions inherited from IBackendInternal
 ~IBackendInternal () override=default
 Allow backends created by the factory function to be destroyed through IBackendInternal. More...
 
virtual ISubGraphConverterPtr CreateSubGraphConverter (const std::shared_ptr< SubGraph > &subGraph) const
 
virtual SubGraphUniquePtr OptimizeSubGraph (const SubGraph &subGraph, bool &optimizationAttempted) const
 
bool SupportsTensorAllocatorAPI () const
 
ITensorHandleFactory::FactoryId GetBackwardCompatibleFavoriteHandleFactory ()
 
+ + + + + + + +

+Static Public Member Functions

static const BackendIdGetIdStatic ()
 
- Static Public Member Functions inherited from IBackendInternal
static constexpr BackendVersion GetApiVersion ()
 Returns the version of the Backend API. More...
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Additional Inherited Members

- Public Types inherited from IBackendInternal
using IWorkloadFactoryPtr = std::unique_ptr< IWorkloadFactory >
 
using IBackendContextPtr = std::unique_ptr< IBackendContext >
 
using IBackendProfilingContextPtr = std::shared_ptr< armnn::profiling::IBackendProfilingContext >
 This is the bridge between backend and backend profiling we'll keep it in the backend namespace. More...
 
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 >
 
- Protected Member Functions inherited from IBackendInternal
 IBackendInternal ()=default
 Creation must be done through a specific backend interface. More...
 
- Protected Member Functions inherited from IBackend
 IBackend ()
 
virtual ~IBackend ()
 
+

Detailed Description

+
+

Definition at line 12 of file RefBackend.hpp.

+

Constructor & Destructor Documentation

+ +

◆ RefBackend()

+ +
+
+ + + + + +
+ + + + + + + +
RefBackend ()
+
+default
+
+ +
+
+ +

◆ ~RefBackend()

+ +
+
+ + + + + +
+ + + + + + + +
~RefBackend ()
+
+default
+
+ +
+
+

Member Function Documentation

+ +

◆ CreateBackendContext()

+ +
+
+ + + + + +
+ + + + + + + + +
IBackendInternal::IBackendContextPtr CreateBackendContext (const IRuntime::CreationOptions) const
+
+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 44 of file RefBackend.cpp.

+ +

Referenced by RefBackend::GetId().

+
45 {
46  return IBackendContextPtr{};
47 }
std::unique_ptr< IBackendContext > IBackendContextPtr
+
+
+
+ +

◆ CreateBackendProfilingContext()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
IBackendInternal::IBackendProfilingContextPtr CreateBackendProfilingContext (const IRuntime::CreationOptionscreationOptions,
IBackendProfilingPtrbackendProfiling 
)
+
+overridevirtual
+
+ +

Create context specifically used for profiling interaction from backends.

+ +

Reimplemented from IBackendInternal.

+ +

Definition at line 49 of file RefBackend.cpp.

+ +

Referenced by RefBackend::GetId().

+
51 {
53 }
std::shared_ptr< armnn::profiling::IBackendProfilingContext > IBackendProfilingContextPtr
This is the bridge between backend and backend profiling we&#39;ll keep it in the backend namespace...
+
+
+
+ +

◆ CreateMemoryManager()

+ +
+
+ + + + + +
+ + + + + + + +
IBackendInternal::IMemoryManagerUniquePtr CreateMemoryManager () const
+
+overridevirtual
+
+ +

Reimplemented from IBackendInternal.

+ +

Definition at line 55 of file RefBackend.cpp.

+ +

Referenced by RefBackend::GetId().

+
56 {
57  return std::make_unique<RefMemoryManager>();
58 }
+
+
+ +

◆ CreateWorkloadFactory() [1/2]

+ +
+
+ + + + + +
+ + + + + + + + +
IBackendInternal::IWorkloadFactoryPtr CreateWorkloadFactory (const IBackendInternal::IMemoryManagerSharedPtrmemoryManager = nullptr) const
+
+overridevirtual
+
+ +

Implements IBackendInternal.

+ +

Definition at line 28 of file RefBackend.cpp.

+ +

Referenced by RefBackend::GetId().

+
30 {
31  return std::make_unique<RefWorkloadFactory>(PolymorphicPointerDowncast<RefMemoryManager>(memoryManager));
32 }
+
+
+ +

◆ CreateWorkloadFactory() [2/2]

+ +
+
+ + + + + +
+ + + + + + + + +
IBackendInternal::IWorkloadFactoryPtr CreateWorkloadFactory (class TensorHandleFactoryRegistrytensorHandleFactoryRegistry) const
+
+overridevirtual
+
+ +

Reimplemented from IBackendInternal.

+ +

Definition at line 34 of file RefBackend.cpp.

+ +

References TensorHandleFactoryRegistry::RegisterMemoryManager().

+
36 {
37  auto memoryManager = std::make_shared<RefMemoryManager>();
38 
39  tensorHandleFactoryRegistry.RegisterMemoryManager(memoryManager);
40 
41  return std::make_unique<RefWorkloadFactory>(PolymorphicPointerDowncast<RefMemoryManager>(memoryManager));
42 }
+
+
+ +

◆ GetHandleFactoryPreferences()

+ +
+
+ + + + + +
+ + + + + + + +
std::vector< ITensorHandleFactory::FactoryId > GetHandleFactoryPreferences () const
+
+overridevirtual
+
+ +

(Optional) Returns a vector of supported TensorHandleFactory ids in preference order.

+ +

Reimplemented from IBackendInternal.

+ +

Definition at line 80 of file RefBackend.cpp.

+ +

References RefTensorHandleFactory::GetIdStatic().

+ +

Referenced by RefBackend::GetId().

+
81 {
82  return std::vector<ITensorHandleFactory::FactoryId> { RefTensorHandleFactory::GetIdStatic() };
83 }
static const FactoryId & GetIdStatic()
+
+
+
+ +

◆ GetId()

+ + + +

◆ GetIdStatic()

+ +
+
+ + + + + +
+ + + + + + + +
const BackendId & GetIdStatic ()
+
+static
+
+ +

Definition at line 22 of file RefBackend.cpp.

+ +

References armnn::RefBackendId().

+ +

Referenced by GetBackendId(), and RefBackend::GetId().

+
23 {
24  static const BackendId s_Id{RefBackendId()};
25  return s_Id;
26 }
constexpr const char * RefBackendId()
+
+
+
+ +

◆ GetLayerSupport()

+ +
+
+ + + + + +
+ + + + + + + +
IBackendInternal::ILayerSupportSharedPtr GetLayerSupport () const
+
+overridevirtual
+
+ +

Implements IBackendInternal.

+ +

Definition at line 65 of file RefBackend.cpp.

+ +

Referenced by RefBackend::GetId().

+
66 {
67  static ILayerSupportSharedPtr layerSupport{new RefLayerSupport};
68  return layerSupport;
69 }
std::shared_ptr< ILayerSupport > ILayerSupportSharedPtr
+
+
+
+ +

◆ GetOptimizations()

+ +
+
+ + + + + +
+ + + + + + + +
IBackendInternal::Optimizations GetOptimizations () const
+
+overridevirtual
+
+ +

Reimplemented from IBackendInternal.

+ +

Definition at line 60 of file RefBackend.cpp.

+ +

Referenced by RefBackend::GetId().

+
61 {
62  return Optimizations{};
63 }
std::vector< OptimizationPtr > Optimizations
+
+
+
+ +

◆ OptimizeSubgraphView()

+ +
+
+ + + + + +
+ + + + + + + + +
OptimizationViews OptimizeSubgraphView (const SubgraphViewsubgraph) const
+
+overridevirtual
+
+ +

Reimplemented from IBackendInternal.

+ +

Definition at line 71 of file RefBackend.cpp.

+ +

References OptimizationViews::AddUntouchedSubgraph().

+ +

Referenced by RefBackend::GetId().

+
72 {
73  OptimizationViews optimizationViews;
74 
75  optimizationViews.AddUntouchedSubgraph(SubgraphView(subgraph));
76 
77  return optimizationViews;
78 }
+
+
+ +

◆ RegisterTensorHandleFactories()

+ +
+
+ + + + + +
+ + + + + + + + +
void RegisterTensorHandleFactories (class TensorHandleFactoryRegistry)
+
+overridevirtual
+
+ +

(Optional) Register TensorHandleFactories Either this method or CreateMemoryManager() and IWorkloadFactory::CreateTensor()/IWorkloadFactory::CreateSubtensor() methods must be implemented.

+ +

Reimplemented from IBackendInternal.

+ +

Definition at line 85 of file RefBackend.cpp.

+ +

References TensorHandleFactoryRegistry::RegisterFactory(), and TensorHandleFactoryRegistry::RegisterMemoryManager().

+ +

Referenced by RefBackend::GetId().

+
86 {
87  auto memoryManager = std::make_shared<RefMemoryManager>();
88 
89  registry.RegisterMemoryManager(memoryManager);
90  registry.RegisterFactory(std::make_unique<RefTensorHandleFactory>(memoryManager));
91 }
+
+
+
The documentation for this class was generated from the following files: +
+
+ + + + -- cgit v1.2.1