From fd627ffaec8fd8801d980b4c91ee7c0607ab6aaf Mon Sep 17 00:00:00 2001 From: Jan Eilers Date: Thu, 25 Feb 2021 17:44:00 +0000 Subject: IVGCVSW-5687 Update Doxygen Docu * Update Doxygen Documentation for 21.02 release Signed-off-by: Jan Eilers Change-Id: I9ed2f9caab038836ea99d7b378d7899fe431a4e5 --- 21.02/classarmnn_1_1_ref_workload_factory.xhtml | 3710 +++++++++++++++++++++++ 1 file changed, 3710 insertions(+) create mode 100644 21.02/classarmnn_1_1_ref_workload_factory.xhtml (limited to '21.02/classarmnn_1_1_ref_workload_factory.xhtml') diff --git a/21.02/classarmnn_1_1_ref_workload_factory.xhtml b/21.02/classarmnn_1_1_ref_workload_factory.xhtml new file mode 100644 index 0000000000..77ef4bc87d --- /dev/null +++ b/21.02/classarmnn_1_1_ref_workload_factory.xhtml @@ -0,0 +1,3710 @@ + + + + + + + + + + + + + +ArmNN: RefWorkloadFactory Class Reference + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  21.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
RefWorkloadFactory Class Reference
+
+
+ +

#include <RefWorkloadFactory.hpp>

+
+Inheritance diagram for RefWorkloadFactory:
+
+
+ + +IWorkloadFactory + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 RefWorkloadFactory (const std::shared_ptr< RefMemoryManager > &memoryManager)
 
 RefWorkloadFactory ()
 
 ~RefWorkloadFactory ()
 
const BackendIdGetBackendId () const override
 
bool SupportsSubTensors () const override
 
std::unique_ptr< ITensorHandleCreateSubTensorHandle (ITensorHandle &parent, TensorShape const &subTensorShape, unsigned int const *subTensorOrigin) const override
 
std::unique_ptr< ITensorHandleCreateTensorHandle (const TensorInfo &tensorInfo, const bool IsMemoryManaged=true) const override
 
std::unique_ptr< ITensorHandleCreateTensorHandle (const TensorInfo &tensorInfo, DataLayout dataLayout, const bool IsMemoryManaged=true) const override
 
std::unique_ptr< IWorkloadCreateAbs (const AbsQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateActivation (const ActivationQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateAddition (const AdditionQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateArgMinMax (const ArgMinMaxQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateBatchNormalization (const BatchNormalizationQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateBatchToSpaceNd (const BatchToSpaceNdQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateComparison (const ComparisonQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateConcat (const ConcatQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateConstant (const ConstantQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateConvertBf16ToFp32 (const ConvertBf16ToFp32QueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateConvertFp16ToFp32 (const ConvertFp16ToFp32QueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateConvertFp32ToBf16 (const ConvertFp32ToBf16QueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateConvertFp32ToFp16 (const ConvertFp32ToFp16QueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateConvolution2d (const Convolution2dQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateDebug (const DebugQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateDepthToSpace (const DepthToSpaceQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateDepthwiseConvolution2d (const DepthwiseConvolution2dQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateDequantize (const DequantizeQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateDetectionPostProcess (const DetectionPostProcessQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateDivision (const DivisionQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateElementwiseUnary (const ElementwiseUnaryQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateEqual (const EqualQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateFakeQuantization (const FakeQuantizationQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateFill (const FillQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateFloor (const FloorQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateFullyConnected (const FullyConnectedQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateGather (const GatherQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateGreater (const GreaterQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateInput (const InputQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateInstanceNormalization (const InstanceNormalizationQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateL2Normalization (const L2NormalizationQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateLogicalBinary (const LogicalBinaryQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateLogSoftmax (const LogSoftmaxQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateLstm (const LstmQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateMaximum (const MaximumQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateMean (const MeanQueueDescriptor &descriptor, const WorkloadInfo &Info) const override
 
std::unique_ptr< IWorkloadCreateMemCopy (const MemCopyQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateMemImport (const MemImportQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateMerger (const MergerQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateMinimum (const MinimumQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateMultiplication (const MultiplicationQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateNormalization (const NormalizationQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateOutput (const OutputQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreatePad (const PadQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreatePermute (const PermuteQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreatePooling2d (const Pooling2dQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreatePreCompiled (const PreCompiledQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreatePrelu (const PreluQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateQLstm (const QLstmQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateQuantize (const QuantizeQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateRank (const RankQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateReduce (const ReduceQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateReshape (const ReshapeQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateResize (const ResizeQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateResizeBilinear (const ResizeBilinearQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateRsqrt (const RsqrtQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateSlice (const SliceQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateSoftmax (const SoftmaxQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateSpaceToBatchNd (const SpaceToBatchNdQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateSpaceToDepth (const SpaceToDepthQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateSplitter (const SplitterQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateStack (const StackQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateStridedSlice (const StridedSliceQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateSubtraction (const SubtractionQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateTranspose (const TransposeQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
std::unique_ptr< IWorkloadCreateTransposeConvolution2d (const TransposeConvolution2dQueueDescriptor &descriptor, const WorkloadInfo &info) const override
 
- Public Member Functions inherited from IWorkloadFactory
virtual ~IWorkloadFactory ()
 
virtual void AfterWorkloadsCreated ()
 
virtual std::unique_ptr< IWorkloadCreateLogicalUnary (const ElementwiseUnaryQueueDescriptor &descriptor, const WorkloadInfo &Info) const
 
virtual std::unique_ptr< IWorkloadCreateMerge (const MergeQueueDescriptor &descriptor, const WorkloadInfo &info) const
 
virtual std::unique_ptr< IWorkloadCreateQuantizedLstm (const QuantizedLstmQueueDescriptor &descriptor, const WorkloadInfo &info) const
 
virtual std::unique_ptr< IWorkloadCreateSwitch (const SwitchQueueDescriptor &descriptor, const WorkloadInfo &Info) const
 
+ + + + + + + + + + + + + + +

+Static Public Member Functions

static bool IsLayerSupported (const Layer &layer, Optional< DataType > dataType, std::string &outReasonIfUnsupported)
 
static bool IsLayerSupported (const IConnectableLayer &layer, Optional< DataType > dataType, std::string &outReasonIfUnsupported, const ModelOptions &modelOptions)
 
- Static Public Member Functions inherited from IWorkloadFactory
static bool IsLayerSupported (const BackendId &backendId, const IConnectableLayer &layer, Optional< DataType > dataType, std::string &outReasonIfUnsupported)
 
static bool IsLayerSupported (const IConnectableLayer &layer, Optional< DataType > dataType, std::string &outReasonIfUnsupported)
 
static bool IsLayerSupported (const IConnectableLayer &layer, Optional< DataType > dataType, std::string &outReasonIfUnsupported, const ModelOptions &modelOptions)
 
static bool IsLayerSupported (const BackendId &backendId, const IConnectableLayer &layer, Optional< DataType > dataType, std::string &outReasonIfUnsupported, const ModelOptions &modelOptions)
 
+

Detailed Description

+
+

Definition at line 30 of file RefWorkloadFactory.hpp.

+

Constructor & Destructor Documentation

+ +

◆ RefWorkloadFactory() [1/2]

+ +
+
+ + + + + +
+ + + + + + + + +
RefWorkloadFactory (const std::shared_ptr< RefMemoryManager > & memoryManager)
+
+explicit
+
+ +

Definition at line 84 of file RefWorkloadFactory.cpp.

+
85  : m_MemoryManager(memoryManager)
86 {
87 }
+
+
+ +

◆ RefWorkloadFactory() [2/2]

+ +
+
+ + + + + + + +
RefWorkloadFactory ()
+
+ +

Definition at line 89 of file RefWorkloadFactory.cpp.

+
90  : m_MemoryManager(new RefMemoryManager())
91 {
92 }
+
+
+ +

◆ ~RefWorkloadFactory()

+ +
+
+ + + + + +
+ + + + + + + +
~RefWorkloadFactory ()
+
+inline
+
+ +

Definition at line 36 of file RefWorkloadFactory.hpp.

+ +

References RefWorkloadFactory::GetBackendId(), and RefWorkloadFactory::IsLayerSupported().

+
36 {}
+
+
+

Member Function Documentation

+ +

◆ CreateAbs()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateAbs (const AbsQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 133 of file RefWorkloadFactory.cpp.

+ +

References armnn::Abs, RefWorkloadFactory::CreateElementwiseUnary(), armnn::IgnoreUnused(), ElementwiseUnaryDescriptor::m_Operation, and QueueDescriptorWithParameters< LayerDescriptor >::m_Parameters.

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
135 {
136  IgnoreUnused(descriptor);
137  ElementwiseUnaryQueueDescriptor elementwiseUnaryDescriptor;
138  elementwiseUnaryDescriptor.m_Parameters.m_Operation = UnaryOperation::Abs;
139 
140  return CreateElementwiseUnary(elementwiseUnaryDescriptor, info);
141 }
+
std::unique_ptr< IWorkload > CreateElementwiseUnary(const ElementwiseUnaryQueueDescriptor &descriptor, const WorkloadInfo &info) const override
+
void IgnoreUnused(Ts &&...)
+ +
+
+
+ +

◆ CreateActivation()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateActivation (const ActivationQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 143 of file RefWorkloadFactory.cpp.

+ +

References armnn::info.

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
145 {
146  return std::make_unique<RefActivationWorkload>(descriptor, info);
147 }
+
+
+
+ +

◆ CreateAddition()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateAddition (const AdditionQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 149 of file RefWorkloadFactory.cpp.

+ +

References armnn::info, WorkloadInfo::m_InputTensorInfos, and armnn::Signed32.

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
151 {
152  if (info.m_InputTensorInfos[0].GetDataType() == armnn::DataType::Signed32)
153  {
154  return std::make_unique<RefAdditionWorkload<int32_t>>(descriptor, info);
155  }
156  else
157  {
158  return std::make_unique<RefAdditionWorkload<float>>(descriptor, info);
159  }
160 }
+ +
+
+
+ +

◆ CreateArgMinMax()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateArgMinMax (const ArgMinMaxQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 162 of file RefWorkloadFactory.cpp.

+ +

References armnn::info.

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
164 {
165  return std::make_unique<RefArgMinMaxWorkload>(descriptor, info);
166 }
+
+
+
+ +

◆ CreateBatchNormalization()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateBatchNormalization (const BatchNormalizationQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 168 of file RefWorkloadFactory.cpp.

+ +

References armnn::info.

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
171 {
172  return std::make_unique<RefBatchNormalizationWorkload>(descriptor, info);
173 }
+
+
+
+ +

◆ CreateBatchToSpaceNd()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateBatchToSpaceNd (const BatchToSpaceNdQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 175 of file RefWorkloadFactory.cpp.

+ +

References armnn::info.

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
177 {
178  return std::make_unique<RefBatchToSpaceNdWorkload>(descriptor, info);
179 }
+
+
+
+ +

◆ CreateComparison()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateComparison (const ComparisonQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 181 of file RefWorkloadFactory.cpp.

+ +

References armnn::info.

+ +

Referenced by RefWorkloadFactory::CreateEqual(), RefWorkloadFactory::CreateGreater(), and RefWorkloadFactory::CreateSubTensorHandle().

+
183 {
184  return std::make_unique<RefComparisonWorkload>(descriptor, info);
185 }
+
+
+
+ +

◆ CreateConcat()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateConcat (const ConcatQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 187 of file RefWorkloadFactory.cpp.

+ +

References armnn::info.

+ +

Referenced by RefWorkloadFactory::CreateMerger(), and RefWorkloadFactory::CreateSubTensorHandle().

+
189 {
190  return std::make_unique<RefConcatWorkload>(descriptor, info);
191 }
+
+
+
+ +

◆ CreateConstant()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateConstant (const ConstantQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 193 of file RefWorkloadFactory.cpp.

+ +

References armnn::info.

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
195 {
196  return std::make_unique<RefConstantWorkload>(descriptor, info);
197 }
+
+
+
+ +

◆ CreateConvertBf16ToFp32()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateConvertBf16ToFp32 (const ConvertBf16ToFp32QueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 199 of file RefWorkloadFactory.cpp.

+ +

References armnn::info.

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
202 {
203  return std::make_unique<RefConvertBf16ToFp32Workload>(descriptor, info);
204 }
+
+
+
+ +

◆ CreateConvertFp16ToFp32()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateConvertFp16ToFp32 (const ConvertFp16ToFp32QueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 206 of file RefWorkloadFactory.cpp.

+ +

References armnn::info.

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
209 {
210  return std::make_unique<RefConvertFp16ToFp32Workload>(descriptor, info);
211 }
+
+
+
+ +

◆ CreateConvertFp32ToBf16()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateConvertFp32ToBf16 (const ConvertFp32ToBf16QueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 213 of file RefWorkloadFactory.cpp.

+ +

References armnn::info.

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
216 {
217  return std::make_unique<RefConvertFp32ToBf16Workload>(descriptor, info);
218 }
+
+
+
+ +

◆ CreateConvertFp32ToFp16()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateConvertFp32ToFp16 (const ConvertFp32ToFp16QueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 220 of file RefWorkloadFactory.cpp.

+ +

References armnn::info.

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
223 {
224  return std::make_unique<RefConvertFp32ToFp16Workload>(descriptor, info);
225 }
+
+
+
+ +

◆ CreateConvolution2d()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateConvolution2d (const Convolution2dQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 227 of file RefWorkloadFactory.cpp.

+ +

References armnn::info.

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
229 {
230  return std::make_unique<RefConvolution2dWorkload>(descriptor, info);
231 }
+
+
+
+ +

◆ CreateDebug()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateDebug (const DebugQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 233 of file RefWorkloadFactory.cpp.

+ +

References armnn::info, armnn::IsBFloat16(), armnn::IsFloat16(), armnn::IsQAsymmS8(), armnn::IsQAsymmU8(), armnn::IsQSymmS16(), armnn::IsQSymmS8(), and armnn::IsSigned32().

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
235 {
236  if (IsBFloat16(info))
237  {
238  return std::make_unique<RefDebugBFloat16Workload>(descriptor, info);
239  }
240  if (IsFloat16(info))
241  {
242  return std::make_unique<RefDebugFloat16Workload>(descriptor, info);
243  }
244  if (IsQSymmS16(info))
245  {
246  return std::make_unique<RefDebugQSymmS16Workload>(descriptor, info);
247  }
248  if (IsQSymmS8(info))
249  {
250  return std::make_unique<RefDebugQSymmS8Workload>(descriptor, info);
251  }
252  if (IsQAsymmU8(info))
253  {
254  return std::make_unique<RefDebugQAsymmU8Workload>(descriptor, info);
255  }
256  if (IsQAsymmS8(info))
257  {
258  return std::make_unique<RefDebugQAsymmS8Workload>(descriptor, info);
259  }
260  if (IsSigned32(info))
261  {
262  return std::make_unique<RefDebugSigned32Workload>(descriptor, info);
263  }
264 
265  return MakeWorkload<RefDebugFloat32Workload, RefDebugQAsymmU8Workload>(descriptor, info);
266 }
bool IsQAsymmS8(const WorkloadInfo &info)
+
bool IsQAsymmU8(const WorkloadInfo &info)
+
bool IsQSymmS8(const WorkloadInfo &info)
+
bool IsBFloat16(const WorkloadInfo &info)
+
bool IsFloat16(const WorkloadInfo &info)
+
bool IsSigned32(const WorkloadInfo &info)
+ +
bool IsQSymmS16(const WorkloadInfo &info)
+
+
+
+ +

◆ CreateDepthToSpace()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateDepthToSpace (const DepthToSpaceQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 268 of file RefWorkloadFactory.cpp.

+ +

References armnn::info.

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
270 {
271  return std::make_unique<RefDepthToSpaceWorkload>(descriptor, info);
272 }
+
+
+
+ +

◆ CreateDepthwiseConvolution2d()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateDepthwiseConvolution2d (const DepthwiseConvolution2dQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 274 of file RefWorkloadFactory.cpp.

+ +

References armnn::info.

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
277 {
278  return std::make_unique<RefDepthwiseConvolution2dWorkload>(descriptor, info);
279 }
+
+
+
+ +

◆ CreateDequantize()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateDequantize (const DequantizeQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 281 of file RefWorkloadFactory.cpp.

+ +

References armnn::info.

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
283 {
284  return std::make_unique<RefDequantizeWorkload>(descriptor, info);
285 }
+
+
+
+ +

◆ CreateDetectionPostProcess()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateDetectionPostProcess (const DetectionPostProcessQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 287 of file RefWorkloadFactory.cpp.

+ +

References armnn::info.

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
290 {
291  return std::make_unique<RefDetectionPostProcessWorkload>(descriptor, info);
292 }
+
+
+
+ +

◆ CreateDivision()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateDivision (const DivisionQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 294 of file RefWorkloadFactory.cpp.

+ +

References armnn::info, WorkloadInfo::m_InputTensorInfos, and armnn::Signed32.

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
296 {
297  if (info.m_InputTensorInfos[0].GetDataType() == armnn::DataType::Signed32)
298  {
299  return std::make_unique<RefDivisionWorkload<int32_t>>(descriptor, info);
300  }
301  else
302  {
303  return std::make_unique<RefDivisionWorkload<float>>(descriptor, info);
304  }
305 }
+ +
+
+
+ +

◆ CreateElementwiseUnary()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateElementwiseUnary (const ElementwiseUnaryQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 307 of file RefWorkloadFactory.cpp.

+ +

References armnn::info, armnn::LogicalNot, ElementwiseUnaryDescriptor::m_Operation, and QueueDescriptorWithParameters< LayerDescriptor >::m_Parameters.

+ +

Referenced by RefWorkloadFactory::CreateAbs(), RefWorkloadFactory::CreateRsqrt(), and RefWorkloadFactory::CreateSubTensorHandle().

+
309 {
310  if (descriptor.m_Parameters.m_Operation == UnaryOperation::LogicalNot)
311  {
312  return std::make_unique<RefLogicalUnaryWorkload>(descriptor, info);
313  }
314  return std::make_unique<RefElementwiseUnaryWorkload>(descriptor, info);
315 }
+ +
+
+
+ +

◆ CreateEqual()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateEqual (const EqualQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 317 of file RefWorkloadFactory.cpp.

+ +

References RefWorkloadFactory::CreateComparison(), armnn::Equal, armnn::IgnoreUnused(), ComparisonDescriptor::m_Operation, and QueueDescriptorWithParameters< LayerDescriptor >::m_Parameters.

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
319 {
320  IgnoreUnused(descriptor);
321  ComparisonQueueDescriptor comparisonDescriptor;
322  comparisonDescriptor.m_Parameters.m_Operation = ComparisonOperation::Equal;
323 
324  return CreateComparison(comparisonDescriptor, info);
325 }
+
std::unique_ptr< IWorkload > CreateComparison(const ComparisonQueueDescriptor &descriptor, const WorkloadInfo &info) const override
+
void IgnoreUnused(Ts &&...)
+ +
+
+
+ +

◆ CreateFakeQuantization()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateFakeQuantization (const FakeQuantizationQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 327 of file RefWorkloadFactory.cpp.

+ +

References armnn::info.

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
329 {
330  return MakeWorkload<RefFakeQuantizationFloat32Workload, NullWorkload>(descriptor, info);
331 }
+
+
+
+ +

◆ CreateFill()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateFill (const FillQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 333 of file RefWorkloadFactory.cpp.

+ +

References armnn::info.

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
335 {
336  return std::make_unique<RefFillWorkload>(descriptor, info);
337 }
+
+
+
+ +

◆ CreateFloor()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateFloor (const FloorQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 339 of file RefWorkloadFactory.cpp.

+ +

References armnn::info, armnn::IsQuantizedType(), and WorkloadInfo::m_InputTensorInfos.

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
341 {
342  if(IsQuantizedType(info.m_InputTensorInfos[0].GetDataType()))
343  {
344  return nullptr;
345  }
346  else
347  {
348  return std::make_unique<RefFloorWorkload>(descriptor, info);
349  }
350 }
constexpr bool IsQuantizedType()
Definition: TypesUtils.hpp:249
+ +
+
+
+ +

◆ CreateFullyConnected()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateFullyConnected (const FullyConnectedQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 352 of file RefWorkloadFactory.cpp.

+ +

References armnn::info.

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
355 {
356  return std::make_unique<RefFullyConnectedWorkload>(descriptor, info);
357 }
+
+
+
+ +

◆ CreateGather()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateGather (const GatherQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 359 of file RefWorkloadFactory.cpp.

+ +

References armnn::info.

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
361 {
362  return std::make_unique<RefGatherWorkload>(descriptor, info);
363 }
+
+
+
+ +

◆ CreateGreater()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateGreater (const GreaterQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 365 of file RefWorkloadFactory.cpp.

+ +

References RefWorkloadFactory::CreateComparison(), armnn::Greater, armnn::IgnoreUnused(), ComparisonDescriptor::m_Operation, and QueueDescriptorWithParameters< LayerDescriptor >::m_Parameters.

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
367 {
368  IgnoreUnused(descriptor);
369  ComparisonQueueDescriptor comparisonDescriptor;
370  comparisonDescriptor.m_Parameters.m_Operation = ComparisonOperation::Greater;
371 
372  return CreateComparison(comparisonDescriptor, info);
373 }
+
std::unique_ptr< IWorkload > CreateComparison(const ComparisonQueueDescriptor &descriptor, const WorkloadInfo &info) const override
+
void IgnoreUnused(Ts &&...)
+ +
+
+
+ +

◆ CreateInput()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateInput (const InputQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Implements IWorkloadFactory.

+ +

Definition at line 375 of file RefWorkloadFactory.cpp.

+ +

References armnn::info, WorkloadInfo::m_InputTensorInfos, and WorkloadInfo::m_OutputTensorInfos.

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
377 {
378  if (info.m_InputTensorInfos.empty() )
379  {
380  throw InvalidArgumentException("RefWorkloadFactory::CreateInput: Input cannot be zero length");
381  }
382  if (info.m_OutputTensorInfos.empty())
383  {
384  throw InvalidArgumentException("RefWorkloadFactory::CreateInput: Output cannot be zero length");
385  }
386 
387  if (info.m_InputTensorInfos[0].GetNumBytes() != info.m_OutputTensorInfos[0].GetNumBytes())
388  {
389  throw InvalidArgumentException("RefWorkloadFactory::CreateInput: data input and output differ in byte count.");
390  }
391 
392  return std::make_unique<CopyMemGenericWorkload>(descriptor, info);
393 }
+
+
+
+ +

◆ CreateInstanceNormalization()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateInstanceNormalization (const InstanceNormalizationQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 395 of file RefWorkloadFactory.cpp.

+ +

References armnn::info.

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
398 {
399  return std::make_unique<RefInstanceNormalizationWorkload>(descriptor, info);
400 }
+
+
+
+ +

◆ CreateL2Normalization()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateL2Normalization (const L2NormalizationQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 402 of file RefWorkloadFactory.cpp.

+ +

References armnn::info.

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
404 {
405  return std::make_unique<RefL2NormalizationWorkload>(descriptor, info);
406 }
+
+
+
+ +

◆ CreateLogicalBinary()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateLogicalBinary (const LogicalBinaryQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 408 of file RefWorkloadFactory.cpp.

+ +

References armnn::info.

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
410 {
411  return std::make_unique<RefLogicalBinaryWorkload>(descriptor, info);
412 }
+
+
+
+ +

◆ CreateLogSoftmax()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateLogSoftmax (const LogSoftmaxQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 414 of file RefWorkloadFactory.cpp.

+ +

References armnn::info.

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
416 {
417  return std::make_unique<RefLogSoftmaxWorkload>(descriptor, info);
418 }
+
+
+
+ +

◆ CreateLstm()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateLstm (const LstmQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 420 of file RefWorkloadFactory.cpp.

+ +

References armnn::info.

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
422 {
423  return std::make_unique<RefLstmWorkload>(descriptor, info);
424 }
+
+
+
+ +

◆ CreateMaximum()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateMaximum (const MaximumQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 426 of file RefWorkloadFactory.cpp.

+ +

References armnn::info, WorkloadInfo::m_InputTensorInfos, and armnn::Signed32.

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
428 {
429  if (info.m_InputTensorInfos[0].GetDataType() == armnn::DataType::Signed32)
430  {
431  return std::make_unique<RefMaximumWorkload<int32_t>>(descriptor, info);
432  }
433  else
434  {
435  return std::make_unique<RefMaximumWorkload<float>>(descriptor, info);
436  }
437 }
+ +
+
+
+ +

◆ CreateMean()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateMean (const MeanQueueDescriptordescriptor,
const WorkloadInfoInfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 439 of file RefWorkloadFactory.cpp.

+ +

References armnn::info.

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
441 {
442  return std::make_unique<RefMeanWorkload>(descriptor, info);
443 }
+
+
+
+ +

◆ CreateMemCopy()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateMemCopy (const MemCopyQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 445 of file RefWorkloadFactory.cpp.

+ +

References armnn::info, and QueueDescriptor::m_Inputs.

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
447 {
448  if (descriptor.m_Inputs.empty())
449  {
450  throw InvalidArgumentException("RefWorkloadFactory: CreateMemCopy() expected an input tensor.");
451  }
452  return std::make_unique<CopyMemGenericWorkload>(descriptor, info);
453 }
+
+
+
+ +

◆ CreateMemImport()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateMemImport (const MemImportQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 455 of file RefWorkloadFactory.cpp.

+ +

References armnn::info, and QueueDescriptor::m_Inputs.

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
457 {
458  if (descriptor.m_Inputs.empty())
459  {
460  throw InvalidArgumentException("RefWorkloadFactory: CreateMemImport() expected an input tensor.");
461  }
462  return std::make_unique<ImportMemGenericWorkload>(descriptor, info);
463 }
+
+
+
+ +

◆ CreateMerger()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateMerger (const MergerQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 465 of file RefWorkloadFactory.cpp.

+ +

References RefWorkloadFactory::CreateConcat().

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
467 {
468  return CreateConcat(descriptor, info);
469 }
std::unique_ptr< IWorkload > CreateConcat(const ConcatQueueDescriptor &descriptor, const WorkloadInfo &info) const override
+ +
+
+
+ +

◆ CreateMinimum()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateMinimum (const MinimumQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 471 of file RefWorkloadFactory.cpp.

+ +

References armnn::info, WorkloadInfo::m_InputTensorInfos, and armnn::Signed32.

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
473 {
474  if (info.m_InputTensorInfos[0].GetDataType() == armnn::DataType::Signed32)
475  {
476  return std::make_unique<RefMinimumWorkload<int32_t>>(descriptor, info);
477  }
478  else
479  {
480  return std::make_unique<RefMinimumWorkload<float>>(descriptor, info);
481  }
482 }
+ +
+
+
+ +

◆ CreateMultiplication()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateMultiplication (const MultiplicationQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 484 of file RefWorkloadFactory.cpp.

+ +

References armnn::info, WorkloadInfo::m_InputTensorInfos, and armnn::Signed32.

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
486 {
487  if (info.m_InputTensorInfos[0].GetDataType() == armnn::DataType::Signed32)
488  {
489  return std::make_unique<RefMultiplicationWorkload<int32_t>>(descriptor, info);
490  }
491  else
492  {
493  return std::make_unique<RefMultiplicationWorkload<float>>(descriptor, info);
494  }
495 }
+ +
+
+
+ +

◆ CreateNormalization()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateNormalization (const NormalizationQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 497 of file RefWorkloadFactory.cpp.

+ +

References armnn::info.

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
499 {
500  return std::make_unique<RefNormalizationWorkload>(descriptor, info);
501 }
+
+
+
+ +

◆ CreateOutput()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateOutput (const OutputQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 503 of file RefWorkloadFactory.cpp.

+ +

References armnn::info, WorkloadInfo::m_InputTensorInfos, and WorkloadInfo::m_OutputTensorInfos.

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
505 {
506  if (info.m_InputTensorInfos.empty() )
507  {
508  throw InvalidArgumentException("RefWorkloadFactory::CreateOutput: Input cannot be zero length");
509  }
510  if (info.m_OutputTensorInfos.empty())
511  {
512  throw InvalidArgumentException("RefWorkloadFactory::CreateOutput: Output cannot be zero length");
513  }
514  if (info.m_InputTensorInfos[0].GetNumBytes() != info.m_OutputTensorInfos[0].GetNumBytes())
515  {
516  throw InvalidArgumentException("RefWorkloadFactory::CreateOutput: data input and output differ in byte count.");
517  }
518 
519  return std::make_unique<CopyMemGenericWorkload>(descriptor, info);
520 }
+
+
+
+ +

◆ CreatePad()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreatePad (const PadQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 522 of file RefWorkloadFactory.cpp.

+ +

References armnn::info.

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
524 {
525  return std::make_unique<RefPadWorkload>(descriptor, info);
526 }
+
+
+
+ +

◆ CreatePermute()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreatePermute (const PermuteQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 528 of file RefWorkloadFactory.cpp.

+ +

References armnn::info, armnn::IsBFloat16(), armnn::IsQAsymmS8(), and armnn::IsQSymmS16().

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
530 {
531  if (IsQSymmS16(info))
532  {
533  return std::make_unique<RefPermuteQSymm16Workload>(descriptor, info);
534  }
535  else if (IsBFloat16(info))
536  {
537  return std::make_unique<RefPermuteBFloat16Workload>(descriptor, info);
538  }
539  else if (IsQAsymmS8(info))
540  {
541  return std::make_unique<RefPermuteQAsymmS8Workload>(descriptor, info);
542  }
544  NullWorkload, NullWorkload, NullWorkload>(descriptor, info);
545 }
RefPermuteWorkload< DataType::Float16 > RefPermuteFloat16Workload
+
bool IsQAsymmS8(const WorkloadInfo &info)
+
RefPermuteWorkload< DataType::Float32 > RefPermuteFloat32Workload
+
bool IsBFloat16(const WorkloadInfo &info)
+ +
RefPermuteWorkload< DataType::QAsymmU8 > RefPermuteQAsymm8Workload
+
bool IsQSymmS16(const WorkloadInfo &info)
+
+
+
+ +

◆ CreatePooling2d()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreatePooling2d (const Pooling2dQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 547 of file RefWorkloadFactory.cpp.

+ +

References armnn::info.

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
549 {
550  return std::make_unique<RefPooling2dWorkload>(descriptor, info);
551 }
+
+
+
+ +

◆ CreatePreCompiled()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreatePreCompiled (const PreCompiledQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 553 of file RefWorkloadFactory.cpp.

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
555 {
556  return nullptr;
557 }
+
+
+ +

◆ CreatePrelu()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreatePrelu (const PreluQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 559 of file RefWorkloadFactory.cpp.

+ +

References armnn::info.

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
561 {
562  return std::make_unique<RefPreluWorkload>(descriptor, info);
563 }
+
+
+
+ +

◆ CreateQLstm()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateQLstm (const QLstmQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 565 of file RefWorkloadFactory.cpp.

+ +

References armnn::info.

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
567 {
568  return std::make_unique<RefQLstmWorkload>(descriptor, info);
569 }
+
+
+
+ +

◆ CreateQuantize()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateQuantize (const QuantizeQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 571 of file RefWorkloadFactory.cpp.

+ +

References armnn::info.

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
573 {
574  return std::make_unique<RefQuantizeWorkload>(descriptor, info);
575 }
+
+
+
+ +

◆ CreateRank()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateRank (const RankQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 577 of file RefWorkloadFactory.cpp.

+ +

References armnn::info.

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
579 {
580  return std::make_unique<RefRankWorkload>(descriptor, info);
581 }
+
+
+
+ +

◆ CreateReduce()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateReduce (const ReduceQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 583 of file RefWorkloadFactory.cpp.

+ +

References armnn::info.

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
585 {
586  return std::make_unique<RefReduceWorkload>(descriptor, info);
587 }
+
+
+
+ +

◆ CreateReshape()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateReshape (const ReshapeQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 589 of file RefWorkloadFactory.cpp.

+ +

References armnn::info.

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
591 {
592  return std::make_unique<RefReshapeWorkload>(descriptor, info);
593 }
+
+
+
+ +

◆ CreateResize()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateResize (const ResizeQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 595 of file RefWorkloadFactory.cpp.

+ +

References armnn::info.

+ +

Referenced by RefWorkloadFactory::CreateResizeBilinear(), and RefWorkloadFactory::CreateSubTensorHandle().

+
597 {
598  return std::make_unique<RefResizeWorkload>(descriptor, info);
599 }
+
+
+
+ +

◆ CreateResizeBilinear()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateResizeBilinear (const ResizeBilinearQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 601 of file RefWorkloadFactory.cpp.

+ +

References armnn::Bilinear, RefWorkloadFactory::CreateResize(), ResizeBilinearDescriptor::m_DataLayout, ResizeDescriptor::m_DataLayout, ResizeDescriptor::m_Method, QueueDescriptorWithParameters< LayerDescriptor >::m_Parameters, ResizeBilinearDescriptor::m_TargetHeight, ResizeDescriptor::m_TargetHeight, ResizeBilinearDescriptor::m_TargetWidth, and ResizeDescriptor::m_TargetWidth.

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
603 {
604  ResizeQueueDescriptor resizeDescriptor;
605  resizeDescriptor.m_Parameters.m_Method = ResizeMethod::Bilinear;
606  resizeDescriptor.m_Parameters.m_DataLayout = descriptor.m_Parameters.m_DataLayout;
607  resizeDescriptor.m_Parameters.m_TargetWidth = descriptor.m_Parameters.m_TargetWidth;
608  resizeDescriptor.m_Parameters.m_TargetHeight = descriptor.m_Parameters.m_TargetHeight;
609 
610  return CreateResize(resizeDescriptor, info);
611 }
std::unique_ptr< IWorkload > CreateResize(const ResizeQueueDescriptor &descriptor, const WorkloadInfo &info) const override
+ + +
+
+
+ +

◆ CreateRsqrt()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateRsqrt (const RsqrtQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 613 of file RefWorkloadFactory.cpp.

+ +

References RefWorkloadFactory::CreateElementwiseUnary(), armnn::IgnoreUnused(), ElementwiseUnaryDescriptor::m_Operation, QueueDescriptorWithParameters< LayerDescriptor >::m_Parameters, and armnn::Rsqrt.

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
615 {
616  IgnoreUnused(descriptor);
617  ElementwiseUnaryQueueDescriptor elementwiseUnaryDescriptor;
618  elementwiseUnaryDescriptor.m_Parameters.m_Operation = UnaryOperation::Rsqrt;
619 
620  return CreateElementwiseUnary(elementwiseUnaryDescriptor, info);
621 }
std::unique_ptr< IWorkload > CreateElementwiseUnary(const ElementwiseUnaryQueueDescriptor &descriptor, const WorkloadInfo &info) const override
+
void IgnoreUnused(Ts &&...)
+ + +
+
+
+ +

◆ CreateSlice()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateSlice (const SliceQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 623 of file RefWorkloadFactory.cpp.

+ +

References armnn::info.

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
625 {
626  return std::make_unique<RefSliceWorkload>(descriptor, info);
627 }
+
+
+
+ +

◆ CreateSoftmax()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateSoftmax (const SoftmaxQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 629 of file RefWorkloadFactory.cpp.

+ +

References armnn::info.

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
631 {
632  return std::make_unique<RefSoftmaxWorkload>(descriptor, info);
633 }
+
+
+
+ +

◆ CreateSpaceToBatchNd()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateSpaceToBatchNd (const SpaceToBatchNdQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 635 of file RefWorkloadFactory.cpp.

+ +

References armnn::info.

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
637 {
638  return std::make_unique<RefSpaceToBatchNdWorkload>(descriptor, info);
639 }
+
+
+
+ +

◆ CreateSpaceToDepth()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateSpaceToDepth (const SpaceToDepthQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 641 of file RefWorkloadFactory.cpp.

+ +

References armnn::info.

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
643 {
644  return std::make_unique<RefSpaceToDepthWorkload>(descriptor, info);
645 }
+
+
+
+ +

◆ CreateSplitter()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateSplitter (const SplitterQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 647 of file RefWorkloadFactory.cpp.

+ +

References armnn::info.

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
649 {
650  return std::make_unique<RefSplitterWorkload>(descriptor, info);
651 }
+
+
+
+ +

◆ CreateStack()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateStack (const StackQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 653 of file RefWorkloadFactory.cpp.

+ +

References armnn::info.

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
655 {
656  return std::make_unique<RefStackWorkload>(descriptor, info);
657 }
+
+
+
+ +

◆ CreateStridedSlice()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateStridedSlice (const StridedSliceQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 659 of file RefWorkloadFactory.cpp.

+ +

References armnn::info.

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
661 {
662  return std::make_unique<RefStridedSliceWorkload>(descriptor, info);
663 }
+
+
+
+ +

◆ CreateSubTensorHandle()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
std::unique_ptr<ITensorHandle> CreateSubTensorHandle (ITensorHandleparent,
TensorShape const & subTensorShape,
unsigned int const * subTensorOrigin 
) const
+
+inlineoverridevirtual
+
+ +

Implements IWorkloadFactory.

+ +

Definition at line 52 of file RefWorkloadFactory.hpp.

+ +

References ARMNN_DEPRECATED_MSG, RefWorkloadFactory::CreateAbs(), RefWorkloadFactory::CreateActivation(), RefWorkloadFactory::CreateAddition(), RefWorkloadFactory::CreateArgMinMax(), RefWorkloadFactory::CreateBatchNormalization(), RefWorkloadFactory::CreateBatchToSpaceNd(), RefWorkloadFactory::CreateComparison(), RefWorkloadFactory::CreateConcat(), RefWorkloadFactory::CreateConstant(), RefWorkloadFactory::CreateConvertBf16ToFp32(), RefWorkloadFactory::CreateConvertFp16ToFp32(), RefWorkloadFactory::CreateConvertFp32ToBf16(), RefWorkloadFactory::CreateConvertFp32ToFp16(), RefWorkloadFactory::CreateConvolution2d(), RefWorkloadFactory::CreateDebug(), RefWorkloadFactory::CreateDepthToSpace(), RefWorkloadFactory::CreateDepthwiseConvolution2d(), RefWorkloadFactory::CreateDequantize(), RefWorkloadFactory::CreateDetectionPostProcess(), RefWorkloadFactory::CreateDivision(), RefWorkloadFactory::CreateElementwiseUnary(), RefWorkloadFactory::CreateEqual(), RefWorkloadFactory::CreateFakeQuantization(), RefWorkloadFactory::CreateFill(), RefWorkloadFactory::CreateFloor(), RefWorkloadFactory::CreateFullyConnected(), RefWorkloadFactory::CreateGather(), RefWorkloadFactory::CreateGreater(), RefWorkloadFactory::CreateInput(), RefWorkloadFactory::CreateInstanceNormalization(), RefWorkloadFactory::CreateL2Normalization(), RefWorkloadFactory::CreateLogicalBinary(), RefWorkloadFactory::CreateLogSoftmax(), RefWorkloadFactory::CreateLstm(), RefWorkloadFactory::CreateMaximum(), RefWorkloadFactory::CreateMean(), RefWorkloadFactory::CreateMemCopy(), RefWorkloadFactory::CreateMemImport(), RefWorkloadFactory::CreateMerger(), RefWorkloadFactory::CreateMinimum(), RefWorkloadFactory::CreateMultiplication(), RefWorkloadFactory::CreateNormalization(), RefWorkloadFactory::CreateOutput(), RefWorkloadFactory::CreatePad(), RefWorkloadFactory::CreatePermute(), RefWorkloadFactory::CreatePooling2d(), RefWorkloadFactory::CreatePreCompiled(), RefWorkloadFactory::CreatePrelu(), RefWorkloadFactory::CreateQLstm(), RefWorkloadFactory::CreateQuantize(), RefWorkloadFactory::CreateRank(), RefWorkloadFactory::CreateReduce(), RefWorkloadFactory::CreateReshape(), RefWorkloadFactory::CreateResize(), RefWorkloadFactory::CreateResizeBilinear(), RefWorkloadFactory::CreateRsqrt(), RefWorkloadFactory::CreateSlice(), RefWorkloadFactory::CreateSoftmax(), RefWorkloadFactory::CreateSpaceToBatchNd(), RefWorkloadFactory::CreateSpaceToDepth(), RefWorkloadFactory::CreateSplitter(), RefWorkloadFactory::CreateStack(), RefWorkloadFactory::CreateStridedSlice(), RefWorkloadFactory::CreateSubtraction(), RefWorkloadFactory::CreateTensorHandle(), RefWorkloadFactory::CreateTranspose(), RefWorkloadFactory::CreateTransposeConvolution2d(), armnn::IgnoreUnused(), armnn::Info, and armnn::info.

+
55  {
56  IgnoreUnused(parent, subTensorShape, subTensorOrigin);
57  return nullptr;
58  }
void IgnoreUnused(Ts &&...)
+
+
+
+ +

◆ CreateSubtraction()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateSubtraction (const SubtractionQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 665 of file RefWorkloadFactory.cpp.

+ +

References armnn::info, WorkloadInfo::m_InputTensorInfos, and armnn::Signed32.

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
667 {
668  if (info.m_InputTensorInfos[0].GetDataType() == armnn::DataType::Signed32)
669  {
670  return std::make_unique<RefSubtractionWorkload<int32_t>>(descriptor, info);
671  }
672  else
673  {
674  return std::make_unique<RefSubtractionWorkload<float>>(descriptor, info);
675  }
676 }
+ +
+
+
+ +

◆ CreateTensorHandle() [1/2]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< ITensorHandle > CreateTensorHandle (const TensorInfotensorInfo,
const bool IsMemoryManaged = true 
) const
+
+overridevirtual
+
+ +

Implements IWorkloadFactory.

+ +

Definition at line 114 of file RefWorkloadFactory.cpp.

+ +

References armnn::IgnoreUnused().

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
116 {
117  // For Ref it is okay to make the TensorHandle memory managed as it can also store a pointer
118  // to unmanaged memory. This also ensures memory alignment.
119  IgnoreUnused(isMemoryManaged);
120  return std::make_unique<RefTensorHandle>(tensorInfo, m_MemoryManager);
121 }
void IgnoreUnused(Ts &&...)
+
+
+
+ +

◆ CreateTensorHandle() [2/2]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
std::unique_ptr< ITensorHandle > CreateTensorHandle (const TensorInfotensorInfo,
DataLayout dataLayout,
const bool IsMemoryManaged = true 
) const
+
+overridevirtual
+
+ +

Implements IWorkloadFactory.

+ +

Definition at line 123 of file RefWorkloadFactory.cpp.

+ +

References armnn::IgnoreUnused().

+
126 {
127  // For Ref it is okay to make the TensorHandle memory managed as it can also store a pointer
128  // to unmanaged memory. This also ensures memory alignment.
129  IgnoreUnused(isMemoryManaged, dataLayout);
130  return std::make_unique<RefTensorHandle>(tensorInfo, m_MemoryManager);
131 }
void IgnoreUnused(Ts &&...)
+
+
+
+ +

◆ CreateTranspose()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateTranspose (const TransposeQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 678 of file RefWorkloadFactory.cpp.

+ +

References armnn::info, armnn::IsBFloat16(), armnn::IsQAsymmS8(), and armnn::IsQSymmS16().

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
680 {
681  if (IsQSymmS16(info))
682  {
683  return std::make_unique<RefTransposeQSymm16Workload>(descriptor, info);
684  }
685  else if (IsBFloat16(info))
686  {
687  return std::make_unique<RefTransposeBFloat16Workload>(descriptor, info);
688  }
689  else if (IsQAsymmS8(info))
690  {
691  return std::make_unique<RefTransposeQAsymmS8Workload>(descriptor, info);
692  }
694  NullWorkload, NullWorkload, NullWorkload>(descriptor, info);
695 }
RefTransposeWorkload< DataType::Float16 > RefTransposeFloat16Workload
+
bool IsQAsymmS8(const WorkloadInfo &info)
+
bool IsBFloat16(const WorkloadInfo &info)
+
RefTransposeWorkload< DataType::Float32 > RefTransposeFloat32Workload
+
RefTransposeWorkload< DataType::QAsymmU8 > RefTransposeQAsymm8Workload
+ +
bool IsQSymmS16(const WorkloadInfo &info)
+
+
+
+ +

◆ CreateTransposeConvolution2d()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::unique_ptr< IWorkload > CreateTransposeConvolution2d (const TransposeConvolution2dQueueDescriptordescriptor,
const WorkloadInfoinfo 
) const
+
+overridevirtual
+
+ +

Reimplemented from IWorkloadFactory.

+ +

Definition at line 697 of file RefWorkloadFactory.cpp.

+ +

References armnn::info.

+ +

Referenced by RefWorkloadFactory::CreateSubTensorHandle().

+
700 {
701  return std::make_unique<RefTransposeConvolution2dWorkload>(descriptor, info);
702 }
+
+
+
+ +

◆ GetBackendId()

+ +
+
+ + + + + +
+ + + + + + + +
const BackendId & GetBackendId () const
+
+overridevirtual
+
+ +

Implements IWorkloadFactory.

+ +

Definition at line 94 of file RefWorkloadFactory.cpp.

+ +

Referenced by RefWorkloadFactory::~RefWorkloadFactory().

+
95 {
96  return s_Id;
97 }
+
+
+ +

◆ IsLayerSupported() [1/2]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool IsLayerSupported (const Layerlayer,
Optional< DataTypedataType,
std::string & outReasonIfUnsupported 
)
+
+static
+
+ +

Definition at line 99 of file RefWorkloadFactory.cpp.

+ +

References IWorkloadFactory::IsLayerSupported().

+ +

Referenced by RefWorkloadFactory::~RefWorkloadFactory().

+
102 {
103  return IWorkloadFactory::IsLayerSupported(s_Id, layer, dataType, outReasonIfUnsupported);
104 }
static bool IsLayerSupported(const BackendId &backendId, const IConnectableLayer &layer, Optional< DataType > dataType, std::string &outReasonIfUnsupported)
+
+
+
+ +

◆ IsLayerSupported() [2/2]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool IsLayerSupported (const IConnectableLayerlayer,
Optional< DataTypedataType,
std::string & outReasonIfUnsupported,
const ModelOptionsmodelOptions 
)
+
+static
+
+ +

Definition at line 106 of file RefWorkloadFactory.cpp.

+ +

References IWorkloadFactory::IsLayerSupported().

+
110 {
111  return IWorkloadFactory::IsLayerSupported(s_Id, layer, dataType, outReasonIfUnsupported, modelOptions);
112 }
static bool IsLayerSupported(const BackendId &backendId, const IConnectableLayer &layer, Optional< DataType > dataType, std::string &outReasonIfUnsupported)
+
+
+
+ +

◆ SupportsSubTensors()

+ +
+
+ + + + + +
+ + + + + + + +
bool SupportsSubTensors () const
+
+inlineoverridevirtual
+
+ +

Implements IWorkloadFactory.

+ +

Definition at line 49 of file RefWorkloadFactory.hpp.

+ +

References ARMNN_DEPRECATED_MSG.

+
49 { return false; }
+
+
+
The documentation for this class was generated from the following files: +
+
+ + + + -- cgit v1.2.1