ArmNN
 21.05
NeonBackend.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> cpuAccCapabilities {
13  // add new capabilities here..
14 };
15 
17 {
18 public:
19  NeonBackend() = default;
20  ~NeonBackend() = 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  const ModelOptions& modelOptions) const override;
35 
37  const ModelOptions& modelOptions) const override;
38 
41  const IRuntime::CreationOptions&, IBackendProfilingPtr& backendProfiling) override;
44  IBackendInternal::ILayerSupportSharedPtr GetLayerSupport(const ModelOptions& modelOptions) const override;
45 
46  OptimizationViews OptimizeSubgraphView(const SubgraphView& subgraph) const override;
47 
48  std::vector<ITensorHandleFactory::FactoryId> GetHandleFactoryPreferences() const override;
49 
50  void RegisterTensorHandleFactories(class TensorHandleFactoryRegistry& registry) override;
51 
53  const ModelOptions& modelOptions) const override;
54 
55  bool HasCapability(BackendCapability capabilityClass) const override;
56 };
57 
58 } // namespace armnn
std::unique_ptr< IWorkloadFactory > IWorkloadFactoryPtr
std::vector< OptimizationPtr > Optimizations
bool HasCapability(BackendCapability capabilityClass) const override
Returns true if backend support the capability false otherwise.
IBackendInternal::IBackendProfilingContextPtr CreateBackendProfilingContext(const IRuntime::CreationOptions &, IBackendProfilingPtr &backendProfiling) override
Create context specifically used for profiling interaction from backends.
Definition: NeonBackend.cpp:99
std::vector< ITensorHandleFactory::FactoryId > GetHandleFactoryPreferences() const override
(Optional) Returns a vector of supported TensorHandleFactory ids in preference order.
OptimizationViews OptimizeSubgraphView(const SubgraphView &subgraph) const override
std::vector< BackendOptions > ModelOptions
IWorkloadFactoryPtr CreateWorkloadFactory(const IBackendInternal::IMemoryManagerSharedPtr &memoryManager=nullptr) const override
Definition: NeonBackend.cpp:54
IBackendInternal::IBackendContextPtr CreateBackendContext(const IRuntime::CreationOptions &) const override
Create the runtime context of the backend.
Definition: NeonBackend.cpp:94
Copyright (c) 2021 ARM Limited and Contributors.
std::unique_ptr< IMemoryManager > IMemoryManagerUniquePtr
The SubgraphView class represents a subgraph of a Graph.
void RegisterTensorHandleFactories(class TensorHandleFactoryRegistry &registry) override
(Optional) Register TensorHandleFactories Either this method or CreateMemoryManager() and IWorkloadFa...
std::unique_ptr< armnn::profiling::IBackendProfiling > IBackendProfilingPtr
std::shared_ptr< IBackendModelContext > IBackendSpecificModelContextPtr
BackendCapability
BackendCapability class.
Definition: Types.hpp:220
std::shared_ptr< IMemoryManager > IMemoryManagerSharedPtr
IBackendInternal::ILayerSupportSharedPtr GetLayerSupport() const override
IBackendInternal::IBackendSpecificModelContextPtr CreateBackendSpecificModelContext(const ModelOptions &modelOptions) const override
NeonBackend()=default
const BackendId & GetId() const override
Definition: NeonBackend.hpp:23
std::shared_ptr< ILayerSupport > ILayerSupportSharedPtr
IBackendInternal::Optimizations GetOptimizations() const override
static const BackendId & GetIdStatic()
Definition: NeonBackend.cpp:42
~NeonBackend()=default
const std::set< armnn::BackendCapability > cpuAccCapabilities
Definition: NeonBackend.hpp:12
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...
IBackendInternal::IMemoryManagerUniquePtr CreateMemoryManager() const override
Definition: NeonBackend.cpp:48
std::unique_ptr< IBackendContext > IBackendContextPtr