ArmNN
 25.11
Loading...
Searching...
No Matches
TosaRefBackend.hpp
Go to the documentation of this file.
1//
2// Copyright © 2022 2025 Arm Ltd and Contributors. All rights reserved.
3// SPDX-License-Identifier: MIT
4//
5#pragma once
6
8
9namespace armnn
10{
11
13{
14public:
15 TosaRefBackend() = default;
16 ~TosaRefBackend() = default;
17
18 static const BackendId& GetIdStatic();
19 const BackendId& GetId() const override
20 {
21 return GetIdStatic();
22 }
23
25
27 const IBackendInternal::IMemoryManagerSharedPtr& memoryManager = nullptr) const override;
28
30 class TensorHandleFactoryRegistry& tensorHandleFactoryRegistry) const override;
31
33
36 IBackendProfilingPtr& backendProfiling) override;
37
39
41 const ModelOptions& modelOptions) const override;
42
43 std::vector<ITensorHandleFactory::FactoryId> GetHandleFactoryPreferences() const override;
44
46
47 std::unique_ptr<ICustomAllocator> GetDefaultAllocator() const override;
48
49 BackendCapabilities GetCapabilities() const override;
50
51private:
52 // Private members
53
54protected:
55 // Protected members
56};
57
58} // namespace armnn
std::shared_ptr< ILayerSupport > ILayerSupportSharedPtr
std::unique_ptr< IMemoryManager > IMemoryManagerUniquePtr
std::unique_ptr< arm::pipe::IBackendProfiling > IBackendProfilingPtr
IBackendInternal()=default
Creation must be done through a specific backend interface.
std::shared_ptr< IMemoryManager > IMemoryManagerSharedPtr
std::unique_ptr< IWorkloadFactory > IWorkloadFactoryPtr
std::unique_ptr< IBackendContext > IBackendContextPtr
std::shared_ptr< arm::pipe::IBackendProfilingContext > IBackendProfilingContextPtr
This is the bridge between backend and backend profiling we'll keep it in the backend namespace.
The SubgraphView class represents a subgraph of a Graph.
static const BackendId & GetIdStatic()
const BackendId & GetId() const override
OptimizationViews OptimizeSubgraphView(const SubgraphView &subgraph, const ModelOptions &modelOptions) const override
void RegisterTensorHandleFactories(class TensorHandleFactoryRegistry &registry) override
(Optional) Register TensorHandleFactories Either this method or CreateMemoryManager() and IWorkloadFa...
std::vector< ITensorHandleFactory::FactoryId > GetHandleFactoryPreferences() const override
(Optional) Returns a vector of supported TensorHandleFactory ids in preference order.
IBackendInternal::IBackendContextPtr CreateBackendContext(const IRuntime::CreationOptions &) const override
Create the runtime context of the backend.
IBackendInternal::IWorkloadFactoryPtr CreateWorkloadFactory(const IBackendInternal::IMemoryManagerSharedPtr &memoryManager=nullptr) const override
IBackendInternal::ILayerSupportSharedPtr GetLayerSupport() const override
IBackendInternal::IMemoryManagerUniquePtr CreateMemoryManager() const override
BackendCapabilities GetCapabilities() const override
Returns a BackendCapability if the backend lists the capability The BackendCapability must then be in...
IBackendInternal::IBackendProfilingContextPtr CreateBackendProfilingContext(const IRuntime::CreationOptions &creationOptions, IBackendProfilingPtr &backendProfiling) override
Create context specifically used for profiling interaction from backends.
std::unique_ptr< ICustomAllocator > GetDefaultAllocator() const override
Returns the default memory allocator for the backend.
Copyright (c) 2021 ARM Limited and Contributors.
std::vector< BackendOptions > ModelOptions
BackendOptions BackendCapabilities