Francis Murtagh | 9270d9e | 2022-08-12 13:54:17 +0100 | [diff] [blame] | 1 | // |
| 2 | // Copyright © 2022 Arm Ltd and Contributors. All rights reserved. |
| 3 | // SPDX-License-Identifier: MIT |
| 4 | // |
| 5 | #pragma once |
| 6 | |
| 7 | #include <armnn/backends/IBackendInternal.hpp> |
| 8 | |
| 9 | namespace armnn |
| 10 | { |
| 11 | |
| 12 | class TosaRefBackend : public IBackendInternal |
| 13 | { |
| 14 | public: |
| 15 | TosaRefBackend() = default; |
| 16 | ~TosaRefBackend() = default; |
| 17 | |
| 18 | static const BackendId& GetIdStatic(); |
| 19 | const BackendId& GetId() const override |
| 20 | { |
| 21 | return GetIdStatic(); |
| 22 | } |
| 23 | |
| 24 | IBackendInternal::IMemoryManagerUniquePtr CreateMemoryManager() const override; |
| 25 | |
| 26 | IBackendInternal::IWorkloadFactoryPtr CreateWorkloadFactory( |
| 27 | const IBackendInternal::IMemoryManagerSharedPtr& memoryManager = nullptr) const override; |
| 28 | |
| 29 | IBackendInternal::IWorkloadFactoryPtr CreateWorkloadFactory( |
| 30 | class TensorHandleFactoryRegistry& tensorHandleFactoryRegistry) const override; |
| 31 | |
| 32 | IBackendInternal::IBackendContextPtr CreateBackendContext(const IRuntime::CreationOptions&) const override; |
| 33 | |
| 34 | IBackendInternal::IBackendProfilingContextPtr |
| 35 | CreateBackendProfilingContext(const IRuntime::CreationOptions& creationOptions, |
| 36 | IBackendProfilingPtr& backendProfiling) override; |
| 37 | |
| 38 | IBackendInternal::ILayerSupportSharedPtr GetLayerSupport() const override; |
| 39 | |
| 40 | OptimizationViews OptimizeSubgraphView(const SubgraphView& subgraph, |
| 41 | const ModelOptions& modelOptions) const override; |
| 42 | |
| 43 | std::vector<ITensorHandleFactory::FactoryId> GetHandleFactoryPreferences() const override; |
| 44 | |
| 45 | void RegisterTensorHandleFactories(class TensorHandleFactoryRegistry& registry) override; |
| 46 | |
| 47 | std::unique_ptr<ICustomAllocator> GetDefaultAllocator() const override; |
| 48 | |
| 49 | private: |
| 50 | // Private members |
| 51 | |
| 52 | protected: |
| 53 | // Protected members |
| 54 | }; |
| 55 | |
| 56 | } // namespace armnn |