16 #include <client/include/IProfilingService.hpp> 31 template <
typename QueueDescriptor>
38 m_Guid(
arm::pipe::IProfilingService::GetNextGuid())
40 m_Data.Validate(info);
45 ARMNN_LOG(
info) <<
"Using default async workload execution, this will network affect performance";
46 #if !defined(ARMNN_DISABLE_THREADS) 47 std::lock_guard<std::mutex> lockGuard(m_AsyncWorkloadMutex);
49 m_Data.m_Inputs = workingMemDescriptor.
m_Inputs;
50 m_Data.m_Outputs = workingMemDescriptor.
m_Outputs;
59 arm::pipe::ProfilingGuid
GetGuid() const final {
return m_Guid; }
82 const arm::pipe::ProfilingGuid
m_Guid;
85 #if !defined(ARMNN_DISABLE_THREADS) 86 std::mutex m_AsyncWorkloadMutex;
99 std::vector<armnn::DataType> dataTypes = {DataTypes...};
106 if (std::find(dataTypes.begin(), dataTypes.end(), expectedInputType) == dataTypes.end())
113 return it.GetDataType() == expectedInputType;
115 "Trying to create workload with incorrect type");
125 if (expectedOutputType != expectedInputType)
130 else if (std::find(dataTypes.begin(), dataTypes.end(), expectedOutputType) == dataTypes.end())
137 return it.GetDataType() == expectedOutputType;
139 "Trying to create workload with incorrect type");
144 template <
typename QueueDescriptor, armnn::DataType InputDataType, armnn::DataType OutputDataType>
155 return it.GetDataType() == InputDataType;
157 "Trying to create workload with incorrect type");
162 return it.GetDataType() == OutputDataType;
164 "Trying to create workload with incorrect type");
169 template <
typename QueueDescriptor, armnn::DataType DataType>
180 "Trying to create workload with incorrect type");
186 return it.GetDataType() ==
DataType;
188 "Trying to create workload with incorrect type");
192 template <
typename QueueDescriptor>
197 template <
typename QueueDescriptor>
200 template <
typename QueueDescriptor>
203 template <
typename QueueDescriptor>
206 template <
typename QueueDescriptor>
209 template <
typename QueueDescriptor>
214 template <
typename QueueDescriptor>
219 template <
typename QueueDescriptor>
222 armnn::DataType::Float32>;
224 template <
typename QueueDescriptor>
227 armnn::DataType::BFloat16>;
229 template <
typename QueueDescriptor>
232 armnn::DataType::Float32>;
234 template <
typename QueueDescriptor>
237 armnn::DataType::Float16>;
239 template <
typename QueueDescriptor>
242 armnn::DataType::Float32>;
arm::pipe::ProfilingGuid GetGuid() const final
#define ARMNN_LOG(severity)
MultiTypedWorkload(const QueueDescriptor &descriptor, const WorkloadInfo &info)
const arm::pipe::ProfilingGuid m_Guid
void ReplaceInputTensorHandle(ITensorHandle *tensorHandle, unsigned int slot) override
Copyright (c) 2021 ARM Limited and Contributors.
void IgnoreUnused(Ts &&...)
void ExecuteAsync(WorkingMemDescriptor &workingMemDescriptor) override
std::vector< ITensorHandle * > m_Inputs
BaseWorkload(const QueueDescriptor &descriptor, const WorkloadInfo &info)
void ReplaceOutputTensorHandle(ITensorHandle *tensorHandle, unsigned int slot) override
std::vector< TensorInfo > m_InputTensorInfos
const QueueDescriptor & GetData() const
#define ARMNN_ASSERT_MSG(COND, MSG)
void PostAllocationConfigure() override
virtual bool SupportsTensorHandleReplacement() const override
std::vector< TensorInfo > m_OutputTensorInfos
Workload interface to enqueue a layer computation.
TypedWorkload(const QueueDescriptor &descriptor, const WorkloadInfo &info)
std::vector< ITensorHandle * > m_Outputs
Contains information about TensorInfos of a layer.
virtual void Execute() const =0