24 template <
typename F32Workload,
typename U8Workload,
typename QueueDescriptorType>
25 std::unique_ptr<IWorkload> TosaRefWorkloadFactory::MakeWorkload(
const QueueDescriptorType& descriptor,
26 const WorkloadInfo& info)
const
28 return MakeWorkloadHelper<NullWorkload, F32Workload, U8Workload, NullWorkload, NullWorkload, NullWorkload>
32 template <DataType ArmnnType>
35 auto checkType = [](
const TensorInfo& tensorInfo) {
return tensorInfo.GetDataType() == ArmnnType;};
36 auto it = std::find_if(std::begin(
info.m_InputTensorInfos), std::end(
info.m_InputTensorInfos), checkType);
37 if (it != std::end(
info.m_InputTensorInfos))
41 it = std::find_if(std::begin(
info.m_OutputTensorInfos), std::end(
info.m_OutputTensorInfos), checkType);
42 if (it != std::end(
info.m_OutputTensorInfos))
50 : m_MemoryManager(memoryManager)
66 std::string& outReasonIfUnsupported)
73 std::string& outReasonIfUnsupported,
80 const bool isMemoryManaged)
const
84 return std::make_unique<TosaRefTensorHandle>(tensorInfo, m_MemoryManager);
88 return std::make_unique<TosaRefTensorHandle>(tensorInfo,
static_cast<unsigned int>(
MemorySource::Malloc));
94 const bool isMemoryManaged)
const
102 return std::make_unique<TosaRefTensorHandle>(tensorInfo, m_MemoryManager);
106 return std::make_unique<TosaRefTensorHandle>(tensorInfo,
static_cast<unsigned int>(
MemorySource::Malloc));
118 auto precompiledQueueDescriptor = PolymorphicDowncast<const PreCompiledQueueDescriptor*>(&descriptor);
119 return std::make_unique<TosaRefPreCompiledWorkload>(*precompiledQueueDescriptor,
info);