ArmNN
 24.08
ITensorHandleFactory Class Referenceabstract

#include <ITensorHandleFactory.hpp>

Inheritance diagram for ITensorHandleFactory:
[legend]

Public Types

using FactoryId = std::string
 

Public Member Functions

virtual ~ITensorHandleFactory ()
 Some TensorHandleFactory decisions are deferred to run-time. More...
 
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 =0
 
virtual std::unique_ptr< ITensorHandleCreateTensorHandle (const TensorInfo &tensorInfo, DataLayout dataLayout) const =0
 
virtual std::unique_ptr< ITensorHandleCreateTensorHandle (const TensorInfo &tensorInfo, const bool IsMemoryManaged) const
 Utility Functions for backends which require TensorHandles to have unmanaged memory. More...
 
virtual std::unique_ptr< ITensorHandleCreateTensorHandle (const TensorInfo &tensorInfo, DataLayout dataLayout, const bool IsMemoryManaged) const
 
virtual const FactoryIdGetId () const =0
 
virtual bool SupportsInPlaceComputation () const
 
virtual bool SupportsSubTensors () const =0
 
virtual bool SupportsMapUnmap () const
 
virtual MemorySourceFlags GetExportFlags () const
 
virtual MemorySourceFlags GetImportFlags () const
 
virtual std::vector< CapabilityGetCapabilities (const IConnectableLayer *layer, const IConnectableLayer *connectedLayer, CapabilityClass capabilityClass)
 

Static Public Attributes

static const FactoryId LegacyFactoryId = "armnn_legacy_factory"
 
static const FactoryId DeferredFactoryId = "armnn_deferred_factory"
 Use the workload factory to create the tensor handle. More...
 

Detailed Description

Definition at line 46 of file ITensorHandleFactory.hpp.

Member Typedef Documentation

◆ FactoryId

using FactoryId = std::string

Definition at line 49 of file ITensorHandleFactory.hpp.

Constructor & Destructor Documentation

◆ ~ITensorHandleFactory()

virtual ~ITensorHandleFactory ( )
inlinevirtual

Some TensorHandleFactory decisions are deferred to run-time.

Definition at line 53 of file ITensorHandleFactory.hpp.

53 {}

Member Function Documentation

◆ CreateSubTensorHandle()

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

◆ CreateTensorHandle() [1/4]

◆ CreateTensorHandle() [2/4]

virtual std::unique_ptr<ITensorHandle> CreateTensorHandle ( const TensorInfo tensorInfo,
const bool  IsMemoryManaged 
) const
inlinevirtual

Utility Functions for backends which require TensorHandles to have unmanaged memory.

These should be overloaded if required to facilitate direct import of input tensors and direct export of output tensors.

Reimplemented in NeonTensorHandleFactory, ClImportTensorHandleFactory, MockTensorHandleFactory, ClTensorHandleFactory, RefTensorHandleFactory, TosaRefTensorHandleFactory, GpuFsaTensorHandleFactory, and SampleDynamicTensorHandleFactory.

Definition at line 67 of file ITensorHandleFactory.hpp.

69  {
70  IgnoreUnused(IsMemoryManaged);
71  return CreateTensorHandle(tensorInfo);
72  }

References ITensorHandleFactory::CreateTensorHandle(), and armnn::IgnoreUnused().

◆ CreateTensorHandle() [3/4]

◆ CreateTensorHandle() [4/4]

virtual std::unique_ptr<ITensorHandle> CreateTensorHandle ( const TensorInfo tensorInfo,
DataLayout  dataLayout,
const bool  IsMemoryManaged 
) const
inlinevirtual

◆ GetCapabilities()

virtual std::vector<Capability> GetCapabilities ( const IConnectableLayer layer,
const IConnectableLayer connectedLayer,
CapabilityClass  capabilityClass 
)
inlinevirtual

Reimplemented in NeonTensorHandleFactory, and ClImportTensorHandleFactory.

Definition at line 93 of file ITensorHandleFactory.hpp.

96  {
97  IgnoreUnused(layer);
98  IgnoreUnused(connectedLayer);
99  IgnoreUnused(capabilityClass);
100  return std::vector<Capability>();
101  }

References armnn::IgnoreUnused().

Referenced by armnn::CalculateEdgeStrategy(), and armnn::CalculateSlotOption().

◆ GetExportFlags()

◆ GetId()

◆ GetImportFlags()

◆ SupportsInPlaceComputation()

virtual bool SupportsInPlaceComputation ( ) const
inlinevirtual

Reimplemented in NeonTensorHandleFactory.

Definition at line 84 of file ITensorHandleFactory.hpp.

84 { return false; }

◆ SupportsMapUnmap()

virtual bool SupportsMapUnmap ( ) const
inlinevirtual

◆ SupportsSubTensors()

Member Data Documentation

◆ DeferredFactoryId

const ITensorHandleFactory::FactoryId DeferredFactoryId = "armnn_deferred_factory"
static

Use the workload factory to create the tensor handle.

Definition at line 51 of file ITensorHandleFactory.hpp.

Referenced by armnn::CalculateSlotOptionForOutput().

◆ LegacyFactoryId


The documentation for this class was generated from the following files:
armnn::ITensorHandleFactory::CreateTensorHandle
virtual std::unique_ptr< ITensorHandle > CreateTensorHandle(const TensorInfo &tensorInfo) const =0
armnn::IgnoreUnused
void IgnoreUnused(Ts &&...)
Definition: IgnoreUnused.hpp:14