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 | |
| 6 | #pragma once |
| 7 | |
| 8 | #include "armnn/backends/Workload.hpp" |
| 9 | |
| 10 | #include <memory> |
| 11 | #include <string> |
| 12 | #include <vector> |
| 13 | |
| 14 | namespace armnn |
| 15 | { |
| 16 | |
| 17 | bool TosaRefPreCompiledWorkloadValidate(std::string* reasonIfUnsupported); |
| 18 | |
| 19 | class TosaRefPreCompiledWorkload : public BaseWorkload<PreCompiledQueueDescriptor> |
| 20 | { |
| 21 | public: |
| 22 | TosaRefPreCompiledWorkload(const PreCompiledQueueDescriptor& descriptor, |
| 23 | const WorkloadInfo& info); |
| 24 | void Execute() const override; |
| 25 | |
| 26 | private: |
| 27 | bool SupportsTensorHandleReplacement() const override |
| 28 | { |
| 29 | return true; |
| 30 | } |
| 31 | |
| 32 | void ReplaceInputTensorHandle(ITensorHandle* tensorHandle, unsigned int slot) override |
| 33 | { |
| 34 | this->m_Data.m_Inputs[slot] = tensorHandle; |
| 35 | } |
| 36 | |
| 37 | void ReplaceOutputTensorHandle(ITensorHandle* tensorHandle, unsigned int slot) override |
| 38 | { |
| 39 | this->m_Data.m_Outputs[slot] = tensorHandle; |
| 40 | } |
| 41 | }; |
| 42 | |
| 43 | } //namespace armnn |