ArmNN
 24.02
GpuFsaPreCompiledWorkload.hpp
Go to the documentation of this file.
1 //
2 // Copyright © 2024 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #pragma once
7 
9 
10 #include <arm_compute/core/ITensorInfo.h>
11 #include <arm_compute/core/TensorInfo.h>
12 #include <arm_compute/core/TensorShape.h>
13 #include <arm_compute/core/CL/CLKernelLibrary.h>
14 #include <arm_compute/core/CL/CLCompileContext.h>
15 
16 #include <arm_compute/dynamic_fusion/runtime/gpu/cl/ClWorkloadRuntime.h>
17 #include <arm_compute/dynamic_fusion/sketch/gpu/GpuWorkloadContext.h>
18 #include <arm_compute/dynamic_fusion/sketch/gpu/operators/GpuConv2d.h>
19 #include <arm_compute/dynamic_fusion/sketch/gpu/operators/GpuOutput.h>
20 
21 #include <memory>
22 #include <string>
23 #include <vector>
24 
25 namespace armnn
26 {
27 
28 bool GpuFsaPreCompiledWorkloadValidate(std::string* reasonIfUnsupported);
29 
30 class GpuFsaPreCompiledWorkload : public BaseWorkload<PreCompiledQueueDescriptor>
31 {
32 public:
34  const WorkloadInfo& info);
35  void Execute() const override;
36 
37 private:
38  bool SupportsTensorHandleReplacement() const override
39  {
40  return true;
41  }
42 
43  void ReplaceInputTensorHandle(ITensorHandle* tensorHandle, unsigned int slot) override
44  {
45  this->m_Data.m_Inputs[slot] = tensorHandle;
46  }
47 
48  void ReplaceOutputTensorHandle(ITensorHandle* tensorHandle, unsigned int slot) override
49  {
50  this->m_Data.m_Outputs[slot] = tensorHandle;
51  }
52 
53  WorkloadInfo m_workloadInfo;
54 };
55 
56 } //namespace armnn
armnn::ITensorHandle
Definition: ITensorHandle.hpp:16
armnn::PreCompiledQueueDescriptor
Definition: WorkloadData.hpp:512
armnn::GpuFsaPreCompiledWorkloadValidate
bool GpuFsaPreCompiledWorkloadValidate(std::string *reasonIfUnsupported)
armnn::WorkloadInfo
Contains information about TensorInfos of a layer.
Definition: WorkloadInfo.hpp:16
Workload.hpp
armnn::BoostLogSeverityMapping::info
@ info
armnn::QueueDescriptor::m_Outputs
std::vector< ITensorHandle * > m_Outputs
Definition: WorkloadData.hpp:27
armnn::BaseWorkload
Definition: Workload.hpp:33
armnn::GpuFsaPreCompiledWorkload::GpuFsaPreCompiledWorkload
GpuFsaPreCompiledWorkload(const PreCompiledQueueDescriptor &descriptor, const WorkloadInfo &info)
Definition: GpuFsaPreCompiledWorkload.cpp:31
armnn::BaseWorkload< PreCompiledQueueDescriptor >::m_Data
PreCompiledQueueDescriptor m_Data
Definition: Workload.hpp:89
armnn::GpuFsaPreCompiledWorkload
Definition: GpuFsaPreCompiledWorkload.hpp:30
armnn
Copyright (c) 2021 ARM Limited and Contributors.
Definition: 01_00_quick_start.dox:6
armnn::GpuFsaPreCompiledWorkload::Execute
void Execute() const override
Definition: GpuFsaPreCompiledWorkload.cpp:43
armnn::QueueDescriptor::m_Inputs
std::vector< ITensorHandle * > m_Inputs
Definition: WorkloadData.hpp:26