17 #include <client/include/IProfilingService.hpp> 32 template <
typename QueueDescriptor>
39 m_Guid(
arm::pipe::IProfilingService::GetNextGuid())
41 m_Data.Validate(info);
46 ARMNN_LOG(
info) <<
"Using default async workload execution, this will network affect performance";
47 #if !defined(ARMNN_DISABLE_THREADS) 48 std::lock_guard<std::mutex> lockGuard(m_AsyncWorkloadMutex);
52 m_Data.m_Outputs = workingMemDescriptor->
m_Outputs;
61 arm::pipe::ProfilingGuid
GetGuid() const final {
return m_Guid; }
84 const arm::pipe::ProfilingGuid
m_Guid;
87 #if !defined(ARMNN_DISABLE_THREADS) 88 std::mutex m_AsyncWorkloadMutex;
101 std::vector<armnn::DataType> dataTypes = {DataTypes...};
108 if (std::find(dataTypes.begin(), dataTypes.end(), expectedInputType) == dataTypes.end())
115 return it.GetDataType() == expectedInputType;
117 "Trying to create workload with incorrect type");
127 if (expectedOutputType != expectedInputType)
132 else if (std::find(dataTypes.begin(), dataTypes.end(), expectedOutputType) == dataTypes.end())
139 return it.GetDataType() == expectedOutputType;
141 "Trying to create workload with incorrect type");
146 template <
typename QueueDescriptor, armnn::DataType InputDataType, armnn::DataType OutputDataType>
157 return it.GetDataType() == InputDataType;
159 "Trying to create workload with incorrect type");
164 return it.GetDataType() == OutputDataType;
166 "Trying to create workload with incorrect type");
171 template <
typename QueueDescriptor, armnn::DataType DataType>
182 "Trying to create workload with incorrect type");
188 return it.GetDataType() ==
DataType;
190 "Trying to create workload with incorrect type");
194 template <
typename QueueDescriptor>
199 template <
typename QueueDescriptor>
202 template <
typename QueueDescriptor>
205 template <
typename QueueDescriptor>
208 template <
typename QueueDescriptor>
211 template <
typename QueueDescriptor>
216 template <
typename QueueDescriptor>
221 template <
typename QueueDescriptor>
224 armnn::DataType::Float32>;
226 template <
typename QueueDescriptor>
229 armnn::DataType::BFloat16>;
231 template <
typename QueueDescriptor>
234 armnn::DataType::Float32>;
236 template <
typename QueueDescriptor>
239 armnn::DataType::Float16>;
241 template <
typename QueueDescriptor>
244 armnn::DataType::Float32>;
arm::pipe::ProfilingGuid GetGuid() const final
void ExecuteAsync(ExecutionData &executionData) override
#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 &&...)
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