David Monahan | 8a57046 | 2023-11-22 13:24:25 +0000 | [diff] [blame^] | 1 | // |
| 2 | // Copyright © 2022-2023 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 | namespace armnn |
| 11 | { |
| 12 | |
| 13 | template <typename QueueDescriptor> |
| 14 | class GpuFsaBaseWorkload : public BaseWorkload<QueueDescriptor> |
| 15 | { |
| 16 | public: |
| 17 | GpuFsaBaseWorkload(const QueueDescriptor& descriptor, const WorkloadInfo& info) |
| 18 | : BaseWorkload<QueueDescriptor>(descriptor, info) |
| 19 | {} |
| 20 | |
| 21 | virtual bool SupportsTensorHandleReplacement() const override |
| 22 | { |
| 23 | return true; |
| 24 | } |
| 25 | |
| 26 | // Replace input tensor handle with the given TensorHandle |
| 27 | void ReplaceInputTensorHandle(ITensorHandle* tensorHandle, unsigned int slot) override |
| 28 | { |
| 29 | this->m_Data.m_Inputs[slot] = tensorHandle; |
| 30 | } |
| 31 | |
| 32 | // Replace output tensor handle with the given TensorHandle |
| 33 | void ReplaceOutputTensorHandle(ITensorHandle* tensorHandle, unsigned int slot) override |
| 34 | { |
| 35 | this->m_Data.m_Outputs[slot] = tensorHandle; |
| 36 | } |
| 37 | }; |
| 38 | |
| 39 | } //namespace armnn |