ArmNN
 24.02
ClBaseWorkload< QueueDescriptor > Class Template Reference

#include <ClBaseWorkload.hpp>

Inheritance diagram for ClBaseWorkload< QueueDescriptor >:
[legend]
Collaboration diagram for ClBaseWorkload< QueueDescriptor >:
[legend]

Public Member Functions

 ClBaseWorkload (const QueueDescriptor &descriptor, const WorkloadInfo &info)
 
void ReplaceInputTensorHandle (ITensorHandle *tensorHandle, unsigned int slot) override
 
void ReplaceOutputTensorHandle (ITensorHandle *tensorHandle, unsigned int slot) override
 
- Public Member Functions inherited from BaseWorkload< QueueDescriptor >
 BaseWorkload (const QueueDescriptor &descriptor, const WorkloadInfo &info)
 
virtual const std::string & GetName () const override
 
void ExecuteAsync (ExecutionData &executionData) override
 
void PostAllocationConfigure () override
 
const QueueDescriptorGetData () const
 
arm::pipe::ProfilingGuid GetGuid () const final
 
virtual bool SupportsTensorHandleReplacement () const override
 
- Public Member Functions inherited from IWorkload
virtual ~IWorkload ()
 
virtual void Execute () const =0
 
virtual void RegisterDebugCallback (const DebugCallbackFunction &)
 
virtual armnn::Optional< armnn::MemoryRequirementsGetMemoryRequirements ()
 

Protected Member Functions

virtual void Reconfigure ()
 

Additional Inherited Members

- Protected Attributes inherited from BaseWorkload< QueueDescriptor >
QueueDescriptor m_Data
 
const arm::pipe::ProfilingGuid m_Guid
 
const std::string m_Name
 

Detailed Description

template<typename QueueDescriptor>
class armnn::ClBaseWorkload< QueueDescriptor >

Definition at line 13 of file ClBaseWorkload.hpp.

Constructor & Destructor Documentation

◆ ClBaseWorkload()

ClBaseWorkload ( const QueueDescriptor descriptor,
const WorkloadInfo info 
)
inline

Definition at line 16 of file ClBaseWorkload.hpp.

17  : BaseWorkload<QueueDescriptor>(descriptor, info)
18  {}

Member Function Documentation

◆ Reconfigure()

virtual void Reconfigure ( )
inlineprotectedvirtual

Reimplemented in ClConvolution2dWorkload.

Definition at line 56 of file ClBaseWorkload.hpp.

57  {
58  throw armnn::UnimplementedException("Reconfigure not implemented for this workload");
59  }

Referenced by ClBaseWorkload< Convolution2dQueueDescriptor >::ReplaceInputTensorHandle(), and ClBaseWorkload< Convolution2dQueueDescriptor >::ReplaceOutputTensorHandle().

◆ ReplaceInputTensorHandle()

void ReplaceInputTensorHandle ( ITensorHandle tensorHandle,
unsigned int  slot 
)
inlineoverridevirtual

Reimplemented from BaseWorkload< QueueDescriptor >.

Definition at line 21 of file ClBaseWorkload.hpp.

22  {
23  ITensorHandle* backupHandle = this->m_Data.m_Inputs[slot];
24  this->m_Data.m_Inputs[slot] = tensorHandle;
25  try
26  {
27  Reconfigure();
28  }
30  {
31  // Cannot reconfigure, revert the slot back and throw the exception.
32  this->m_Data.m_Inputs[slot] = backupHandle;
33  throw e;
34  }
35  }

◆ ReplaceOutputTensorHandle()

void ReplaceOutputTensorHandle ( ITensorHandle tensorHandle,
unsigned int  slot 
)
inlineoverridevirtual

Reimplemented from BaseWorkload< QueueDescriptor >.

Definition at line 38 of file ClBaseWorkload.hpp.

39  {
40  ITensorHandle* backupHandle = this->m_Data.m_Outputs[slot];
41  this->m_Data.m_Outputs[slot] = tensorHandle;
42  try
43  {
44  Reconfigure();
45  }
47  {
48  // Cannot reconfigure, revert the slot back and throw the exception.
49  this->m_Data.m_Inputs[slot] = backupHandle;
50  throw e;
51  }
52  }

The documentation for this class was generated from the following file:
armnn::QueueDescriptor::m_Outputs
std::vector< ITensorHandle * > m_Outputs
Definition: WorkloadData.hpp:27
armnn::ClBaseWorkload::Reconfigure
virtual void Reconfigure()
Definition: ClBaseWorkload.hpp:56
armnn::BaseWorkload::m_Data
QueueDescriptor m_Data
Definition: Workload.hpp:89
armnn::UnimplementedException
Definition: Exceptions.hpp:98
armnn::QueueDescriptor::m_Inputs
std::vector< ITensorHandle * > m_Inputs
Definition: WorkloadData.hpp:26