ArmNN
 21.05
RefBackend.hpp
Go to the documentation of this file.
1 //
2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 #pragma once
6 
8 
9 namespace armnn
10 {
11 
12 const std::set<armnn::BackendCapability> cpuRefCapabilities {
14 };
15 
17 {
18 public:
19  RefBackend() = default;
20  ~RefBackend() = default;
21 
22  static const BackendId& GetIdStatic();
23  const BackendId& GetId() const override { return GetIdStatic(); }
24 
26 
28  const IBackendInternal::IMemoryManagerSharedPtr& memoryManager = nullptr) const override;
29 
31  class TensorHandleFactoryRegistry& tensorHandleFactoryRegistry) const override;
32 
34 
36  const IRuntime::CreationOptions& creationOptions, IBackendProfilingPtr& backendProfiling) override;
37 
40 
41  OptimizationViews OptimizeSubgraphView(const SubgraphView& subgraph) const override;
42 
43  std::vector<ITensorHandleFactory::FactoryId> GetHandleFactoryPreferences() const override;
44 
45  void RegisterTensorHandleFactories(class TensorHandleFactoryRegistry& registry) override;
46 
47  bool HasCapability(BackendCapability capabilityClass) const override;
48 };
49 
50 } // namespace armnn
std::unique_ptr< IWorkloadFactory > IWorkloadFactoryPtr
std::vector< OptimizationPtr > Optimizations
IBackendInternal::IMemoryManagerUniquePtr CreateMemoryManager() const override
Definition: RefBackend.cpp:56
bool HasCapability(BackendCapability capabilityClass) const override
Returns true if backend support the capability false otherwise.
Definition: RefBackend.cpp:72
const BackendId & GetId() const override
Definition: RefBackend.hpp:23
IBackendInternal::ILayerSupportSharedPtr GetLayerSupport() const override
Definition: RefBackend.cpp:66
static const BackendId & GetIdStatic()
Definition: RefBackend.cpp:22
void RegisterTensorHandleFactories(class TensorHandleFactoryRegistry &registry) override
(Optional) Register TensorHandleFactories Either this method or CreateMemoryManager() and IWorkloadFa...
Definition: RefBackend.cpp:96
Copyright (c) 2021 ARM Limited and Contributors.
std::unique_ptr< IMemoryManager > IMemoryManagerUniquePtr
IBackendInternal::IBackendContextPtr CreateBackendContext(const IRuntime::CreationOptions &) const override
Create the runtime context of the backend.
Definition: RefBackend.cpp:45
const std::set< armnn::BackendCapability > cpuRefCapabilities
Definition: RefBackend.hpp:12
IBackendInternal::IBackendProfilingContextPtr CreateBackendProfilingContext(const IRuntime::CreationOptions &creationOptions, IBackendProfilingPtr &backendProfiling) override
Create context specifically used for profiling interaction from backends.
Definition: RefBackend.cpp:50
The SubgraphView class represents a subgraph of a Graph.
OptimizationViews OptimizeSubgraphView(const SubgraphView &subgraph) const override
Definition: RefBackend.cpp:82
Constant weights can be accessed through the descriptors, On the other hand, non-const weights can be...
std::unique_ptr< armnn::profiling::IBackendProfiling > IBackendProfilingPtr
BackendCapability
BackendCapability class.
Definition: Types.hpp:220
std::shared_ptr< IMemoryManager > IMemoryManagerSharedPtr
IBackendInternal::IWorkloadFactoryPtr CreateWorkloadFactory(const IBackendInternal::IMemoryManagerSharedPtr &memoryManager=nullptr) const override
Definition: RefBackend.cpp:28
std::shared_ptr< ILayerSupport > ILayerSupportSharedPtr
RefBackend()=default
IBackendInternal::Optimizations GetOptimizations() const override
Definition: RefBackend.cpp:61
std::vector< ITensorHandleFactory::FactoryId > GetHandleFactoryPreferences() const override
(Optional) Returns a vector of supported TensorHandleFactory ids in preference order.
Definition: RefBackend.cpp:91
~RefBackend()=default
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...
std::unique_ptr< IBackendContext > IBackendContextPtr