ArmNN
 25.11
Loading...
Searching...
No Matches
IWorkloadFactory Class Referenceabstract

#include <WorkloadFactory.hpp>

Inheritance diagram for IWorkloadFactory:
[legend]

Public Member Functions

virtual ~IWorkloadFactory ()
virtual void AfterWorkloadsCreated ()
virtual const BackendIdGetBackendId () const =0
virtual bool SupportsSubTensors () const =0
virtual std::unique_ptr< ITensorHandleCreateSubTensorHandle (ITensorHandle &parent, TensorShape const &subTensorShape, unsigned int const *subTensorOrigin) const =0
virtual std::unique_ptr< ITensorHandleCreateTensorHandle (const TensorInfo &tensorInfo, const bool IsMemoryManaged=true) const =0
virtual std::unique_ptr< ITensorHandleCreateTensorHandle (const TensorInfo &tensorInfo, DataLayout dataLayout, const bool IsMemoryManaged=true) const =0
virtual std::unique_ptr< IWorkloadCreateWorkload (LayerType type, const QueueDescriptor &descriptor, const WorkloadInfo &info) const =0
 Backends should implement their own CreateWorkload function with a switch statement.

Static Public Member Functions

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 22 of file WorkloadFactory.hpp.

Constructor & Destructor Documentation

◆ ~IWorkloadFactory()

virtual ~IWorkloadFactory ( )
inlinevirtual

Definition at line 25 of file WorkloadFactory.hpp.

25{ }

Member Function Documentation

◆ AfterWorkloadsCreated()

virtual void AfterWorkloadsCreated ( )
inlinevirtual

Reimplemented in ClWorkloadFactory.

Definition at line 27 of file WorkloadFactory.hpp.

27{};

◆ CreateSubTensorHandle()

virtual std::unique_ptr< ITensorHandle > CreateSubTensorHandle ( ITensorHandle & parent,
TensorShape const & subTensorShape,
unsigned int const * subTensorOrigin ) const
pure virtual

◆ CreateTensorHandle() [1/2]

virtual std::unique_ptr< ITensorHandle > CreateTensorHandle ( const TensorInfo & tensorInfo,
const bool IsMemoryManaged = true ) const
pure virtual

◆ CreateTensorHandle() [2/2]

virtual std::unique_ptr< ITensorHandle > CreateTensorHandle ( const TensorInfo & tensorInfo,
DataLayout dataLayout,
const bool IsMemoryManaged = true ) const
pure virtual

◆ CreateWorkload()

virtual std::unique_ptr< IWorkload > CreateWorkload ( LayerType type,
const QueueDescriptor & descriptor,
const WorkloadInfo & info ) const
pure virtual

Backends should implement their own CreateWorkload function with a switch statement.

The case for the switch should be the LayerType and based on that they will call their specific workload creation functionality.

Implemented in ClWorkloadFactory, NeonWorkloadFactory, RefWorkloadFactory, TosaRefWorkloadFactory, WorkloadFactoryBase, and SampleDynamicWorkloadFactory.

References CreateWorkload(), and armnn::info.

Referenced by AbsLayer::CreateWorkload(), ActivationLayer::CreateWorkload(), AdditionLayer::CreateWorkload(), ArgMinMaxLayer::CreateWorkload(), BatchMatMulLayer::CreateWorkload(), BatchNormalizationLayer::CreateWorkload(), BatchToSpaceNdLayer::CreateWorkload(), BroadcastToLayer::CreateWorkload(), CastLayer::CreateWorkload(), ChannelShuffleLayer::CreateWorkload(), ComparisonLayer::CreateWorkload(), ConcatLayer::CreateWorkload(), ConstantLayer::CreateWorkload(), ConvertFp16ToFp32Layer::CreateWorkload(), ConvertFp32ToFp16Layer::CreateWorkload(), Convolution2dLayer::CreateWorkload(), Convolution3dLayer::CreateWorkload(), DebugLayer::CreateWorkload(), DepthToSpaceLayer::CreateWorkload(), DepthwiseConvolution2dLayer::CreateWorkload(), DequantizeLayer::CreateWorkload(), DetectionPostProcessLayer::CreateWorkload(), DivisionLayer::CreateWorkload(), ElementwiseBinaryLayer::CreateWorkload(), ElementwiseUnaryLayer::CreateWorkload(), FakeQuantizationLayer::CreateWorkload(), FillLayer::CreateWorkload(), FloorLayer::CreateWorkload(), FullyConnectedLayer::CreateWorkload(), FusedLayer::CreateWorkload(), GatherLayer::CreateWorkload(), GatherNdLayer::CreateWorkload(), InstanceNormalizationLayer::CreateWorkload(), CreateWorkload(), L2NormalizationLayer::CreateWorkload(), LogicalBinaryLayer::CreateWorkload(), LogSoftmaxLayer::CreateWorkload(), LstmLayer::CreateWorkload(), MaximumLayer::CreateWorkload(), MeanLayer::CreateWorkload(), MinimumLayer::CreateWorkload(), MultiplicationLayer::CreateWorkload(), NormalizationLayer::CreateWorkload(), PadLayer::CreateWorkload(), PermuteLayer::CreateWorkload(), Pooling2dLayer::CreateWorkload(), Pooling3dLayer::CreateWorkload(), PreCompiledLayer::CreateWorkload(), PreluLayer::CreateWorkload(), QLstmLayer::CreateWorkload(), QuantizedLstmLayer::CreateWorkload(), QuantizeLayer::CreateWorkload(), RankLayer::CreateWorkload(), ReduceLayer::CreateWorkload(), ReshapeLayer::CreateWorkload(), ResizeLayer::CreateWorkload(), ReverseV2Layer::CreateWorkload(), RsqrtLayer::CreateWorkload(), ScatterNdLayer::CreateWorkload(), ShapeLayer::CreateWorkload(), SliceLayer::CreateWorkload(), SoftmaxLayer::CreateWorkload(), SpaceToBatchNdLayer::CreateWorkload(), SpaceToDepthLayer::CreateWorkload(), SplitterLayer::CreateWorkload(), StackLayer::CreateWorkload(), StridedSliceLayer::CreateWorkload(), SubtractionLayer::CreateWorkload(), SwitchLayer::CreateWorkload(), TileLayer::CreateWorkload(), TransposeConvolution2dLayer::CreateWorkload(), TransposeLayer::CreateWorkload(), and UnidirectionalSequenceLstmLayer::CreateWorkload().

◆ GetBackendId()

virtual const BackendId & GetBackendId ( ) const
pure virtual

◆ IsLayerSupported() [1/4]

bool IsLayerSupported ( const BackendId & backendId,
const IConnectableLayer & layer,
Optional< DataType > dataType,
std::string & outReasonIfUnsupported )
static

◆ IsLayerSupported() [2/4]

bool IsLayerSupported ( const BackendId & backendId,
const IConnectableLayer & layer,
Optional< DataType > dataType,
std::string & outReasonIfUnsupported,
const ModelOptions & modelOptions )
static

Definition at line 1658 of file WorkloadFactory.cpp.

1663{
1664 return IsLayerConfigurationSupported(backendId,
1665 connectableLayer,
1666 dataType,
1667 outReasonIfUnsupported,
1668 modelOptions);
1669}

◆ IsLayerSupported() [3/4]

bool IsLayerSupported ( const IConnectableLayer & layer,
Optional< DataType > dataType,
std::string & outReasonIfUnsupported )
static

Definition at line 1637 of file WorkloadFactory.cpp.

1640{
1641 auto layer = PolymorphicDowncast<const Layer*>(&connectableLayer);
1642 return IsLayerConfigurationSupported(layer->GetBackendId(), connectableLayer, dataType, outReasonIfUnsupported);
1643}

References armnn::PolymorphicDowncast().

◆ IsLayerSupported() [4/4]

bool IsLayerSupported ( const IConnectableLayer & layer,
Optional< DataType > dataType,
std::string & outReasonIfUnsupported,
const ModelOptions & modelOptions )
static

Definition at line 1645 of file WorkloadFactory.cpp.

1649{
1650 auto layer = PolymorphicDowncast<const Layer*>(&connectableLayer);
1651 return IsLayerConfigurationSupported(layer->GetBackendId(),
1652 connectableLayer,
1653 dataType,
1654 outReasonIfUnsupported,
1655 modelOptions);
1656}

References armnn::PolymorphicDowncast().

◆ SupportsSubTensors()

virtual bool SupportsSubTensors ( ) const
pure virtual

The documentation for this class was generated from the following files: