ArmNN
 24.02
RefLstmWorkload Class Reference

#include <RefLstmWorkload.hpp>

Inheritance diagram for RefLstmWorkload:
[legend]
Collaboration diagram for RefLstmWorkload:
[legend]

Public Member Functions

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

Additional Inherited Members

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

Detailed Description

Definition at line 16 of file RefLstmWorkload.hpp.

Constructor & Destructor Documentation

◆ RefLstmWorkload()

RefLstmWorkload ( const LstmQueueDescriptor descriptor,
const WorkloadInfo info 
)
explicit

Definition at line 17 of file RefLstmWorkload.cpp.

18  : RefBaseWorkload<LstmQueueDescriptor>(descriptor, info)
19  , m_InputToInputWeightsTensor (AssignScopedTensorHandle(descriptor.m_InputToInputWeights))
20  , m_InputToForgetWeightsTensor (AssignScopedTensorHandle(descriptor.m_InputToForgetWeights))
21  , m_InputToCellWeightsTensor (AssignScopedTensorHandle(descriptor.m_InputToCellWeights))
22  , m_InputToOutputWeightsTensor (AssignScopedTensorHandle(descriptor.m_InputToOutputWeights))
23  , m_RecurrentToInputWeightsTensor (AssignScopedTensorHandle(descriptor.m_RecurrentToInputWeights))
24  , m_RecurrentToForgetWeightsTensor(AssignScopedTensorHandle(descriptor.m_RecurrentToForgetWeights))
25  , m_RecurrentToCellWeightsTensor (AssignScopedTensorHandle(descriptor.m_RecurrentToCellWeights))
26  , m_RecurrentToOutputWeightsTensor(AssignScopedTensorHandle(descriptor.m_RecurrentToOutputWeights))
27  , m_CellToInputWeightsTensor (AssignScopedTensorHandle(descriptor.m_CellToInputWeights))
28  , m_CellToForgetWeightsTensor (AssignScopedTensorHandle(descriptor.m_CellToForgetWeights))
29  , m_CellToOutputWeightsTensor (AssignScopedTensorHandle(descriptor.m_CellToOutputWeights))
30  , m_InputGateBiasTensor (AssignScopedTensorHandle(descriptor.m_InputGateBias))
31  , m_ForgetGateBiasTensor (AssignScopedTensorHandle(descriptor.m_ForgetGateBias))
32  , m_CellBiasTensor (AssignScopedTensorHandle(descriptor.m_CellBias))
33  , m_OutputGateBiasTensor (AssignScopedTensorHandle(descriptor.m_OutputGateBias))
34  , m_ProjectionWeightsTensor (AssignScopedTensorHandle(descriptor.m_ProjectionWeights))
35  , m_ProjectionBiasTensor (AssignScopedTensorHandle(descriptor.m_ProjectionBias))
36  , m_InputLayerNormWeights (AssignScopedTensorHandle(descriptor.m_InputLayerNormWeights))
37  , m_ForgetLayerNormWeights (AssignScopedTensorHandle(descriptor.m_ForgetLayerNormWeights))
38  , m_CellLayerNormWeights (AssignScopedTensorHandle(descriptor.m_CellLayerNormWeights))
39  , m_OutputLayerNormWeights (AssignScopedTensorHandle(descriptor.m_OutputLayerNormWeights))
40 {}

References armnn::info.

Member Function Documentation

◆ Execute()

void Execute ( ) const
overridevirtual

◆ ExecuteAsync()

void ExecuteAsync ( ExecutionData executionData)
overridevirtual

Implements IWorkload.

Definition at line 47 of file RefLstmWorkload.cpp.

48 {
49  WorkingMemDescriptor* workingMemDescriptor = static_cast<WorkingMemDescriptor*>(executionData.m_Data);
50  Execute(workingMemDescriptor->m_Inputs, workingMemDescriptor->m_Outputs);
51 }

References RefLstmWorkload::Execute(), ExecutionData::m_Data, WorkingMemDescriptor::m_Inputs, and WorkingMemDescriptor::m_Outputs.


The documentation for this class was generated from the following files:
AssignScopedTensorHandle
std::unique_ptr< armnn::ScopedTensorHandle > AssignScopedTensorHandle(const armnn::ConstTensorHandle *ptr)
Definition: LstmUtils.cpp:299
armnn::QueueDescriptor::m_Outputs
std::vector< ITensorHandle * > m_Outputs
Definition: WorkloadData.hpp:27
armnn::BaseWorkload< LstmQueueDescriptor >::m_Data
LstmQueueDescriptor m_Data
Definition: Workload.hpp:89
armnn::RefLstmWorkload::Execute
void Execute() const override
Definition: RefLstmWorkload.cpp:42
armnn::QueueDescriptor::m_Inputs
std::vector< ITensorHandle * > m_Inputs
Definition: WorkloadData.hpp:26