ArmNN
 24.02
GpuFsaBaseWorkload.hpp
Go to the documentation of this file.
1 //
2 // Copyright © 2022-2023 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #pragma once
7 
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
armnn::ITensorHandle
Definition: ITensorHandle.hpp:16
armnn::WorkloadInfo
Contains information about TensorInfos of a layer.
Definition: WorkloadInfo.hpp:16
Workload.hpp
armnn::QueueDescriptor
Definition: WorkloadData.hpp:24
armnn::GpuFsaBaseWorkload::ReplaceOutputTensorHandle
void ReplaceOutputTensorHandle(ITensorHandle *tensorHandle, unsigned int slot) override
Definition: GpuFsaBaseWorkload.hpp:33
armnn::GpuFsaBaseWorkload::ReplaceInputTensorHandle
void ReplaceInputTensorHandle(ITensorHandle *tensorHandle, unsigned int slot) override
Definition: GpuFsaBaseWorkload.hpp:27
armnn::GpuFsaBaseWorkload
Definition: GpuFsaBaseWorkload.hpp:14
armnn::BoostLogSeverityMapping::info
@ info
armnn::QueueDescriptor::m_Outputs
std::vector< ITensorHandle * > m_Outputs
Definition: WorkloadData.hpp:27
armnn::GpuFsaBaseWorkload::SupportsTensorHandleReplacement
virtual bool SupportsTensorHandleReplacement() const override
Definition: GpuFsaBaseWorkload.hpp:21
armnn::BaseWorkload
Definition: Workload.hpp:33
armnn::BaseWorkload::m_Data
QueueDescriptor m_Data
Definition: Workload.hpp:89
armnn
Copyright (c) 2021 ARM Limited and Contributors.
Definition: 01_00_quick_start.dox:6
armnn::GpuFsaBaseWorkload::GpuFsaBaseWorkload
GpuFsaBaseWorkload(const QueueDescriptor &descriptor, const WorkloadInfo &info)
Definition: GpuFsaBaseWorkload.hpp:17
armnn::QueueDescriptor::m_Inputs
std::vector< ITensorHandle * > m_Inputs
Definition: WorkloadData.hpp:26