From ae050524109f1ce827962665436ef7430f2ac479 Mon Sep 17 00:00:00 2001 From: David Monahan Date: Wed, 22 Mar 2023 16:48:58 +0000 Subject: IVGCVSW-7255 Update Doxygen Documentation and publish on GitHub. * Updating Doxygen documentation for 23.02 release. Signed-off-by: David Monahan Change-Id: I545574ff7664b4595d2fe6a91a3c35d2ad55df82 --- ...classarmnn_1_1_cl_quantized_lstm_workload.xhtml | 166 ++++++++++++++++----- 1 file changed, 126 insertions(+), 40 deletions(-) (limited to '23.02/classarmnn_1_1_cl_quantized_lstm_workload.xhtml') diff --git a/23.02/classarmnn_1_1_cl_quantized_lstm_workload.xhtml b/23.02/classarmnn_1_1_cl_quantized_lstm_workload.xhtml index 81742a8a9d..70b8da3e71 100644 --- a/23.02/classarmnn_1_1_cl_quantized_lstm_workload.xhtml +++ b/23.02/classarmnn_1_1_cl_quantized_lstm_workload.xhtml @@ -8,7 +8,7 @@ - + ArmNN: ClQuantizedLstmWorkload Class Reference @@ -19,9 +19,6 @@ - @@ -30,7 +27,8 @@ extensions: ["tex2jax.js"], jax: ["input/TeX","output/HTML-CSS"], }); - + + @@ -51,18 +49,21 @@ - + +/* @license-end */
@@ -76,7 +77,9 @@ $(function() {
@@ -111,13 +114,13 @@ Inheritance diagram for ClQuantizedLstmWorkload:
ClBaseWorkload< QuantizedLstmQueueDescriptor > BaseWorkload< QuantizedLstmQueueDescriptor > -IWorkload - - +IWorkload + + - + @@ -144,6 +147,10 @@ Public Member Functions + + + + @@ -197,27 +204,83 @@ Additional Inherited Members

Definition at line 64 of file ClQuantizedLstmWorkload.cpp.

-
67  : ClBaseWorkload<QuantizedLstmQueueDescriptor>(descriptor, info)
68 {
69  m_InputToInputWeightsTensor = std::make_unique<arm_compute::CLTensor>();
70  BuildArmComputeTensor(*m_InputToInputWeightsTensor, m_Data.m_InputToInputWeights->GetTensorInfo());
71 
72  m_InputToForgetWeightsTensor = std::make_unique<arm_compute::CLTensor>();
73  BuildArmComputeTensor(*m_InputToForgetWeightsTensor, m_Data.m_InputToForgetWeights->GetTensorInfo());
74 
75  m_InputToCellWeightsTensor = std::make_unique<arm_compute::CLTensor>();
76  BuildArmComputeTensor(*m_InputToCellWeightsTensor, m_Data.m_InputToCellWeights->GetTensorInfo());
77 
78  m_InputToOutputWeightsTensor = std::make_unique<arm_compute::CLTensor>();
79  BuildArmComputeTensor(*m_InputToOutputWeightsTensor, m_Data.m_InputToOutputWeights->GetTensorInfo());
80 
81  m_RecurrentToInputWeightsTensor = std::make_unique<arm_compute::CLTensor>();
82  BuildArmComputeTensor(*m_RecurrentToInputWeightsTensor, m_Data.m_RecurrentToInputWeights->GetTensorInfo());
83 
84  m_RecurrentToForgetWeightsTensor = std::make_unique<arm_compute::CLTensor>();
85  BuildArmComputeTensor(*m_RecurrentToForgetWeightsTensor, m_Data.m_RecurrentToForgetWeights->GetTensorInfo());
86 
87  m_RecurrentToCellWeightsTensor = std::make_unique<arm_compute::CLTensor>();
88  BuildArmComputeTensor(*m_RecurrentToCellWeightsTensor, m_Data.m_RecurrentToCellWeights->GetTensorInfo());
89 
90  m_RecurrentToOutputWeightsTensor = std::make_unique<arm_compute::CLTensor>();
91  BuildArmComputeTensor(*m_RecurrentToOutputWeightsTensor, m_Data.m_RecurrentToOutputWeights->GetTensorInfo());
92 
93  m_InputGateBiasTensor = std::make_unique<arm_compute::CLTensor>();
94  BuildArmComputeTensor(*m_InputGateBiasTensor, m_Data.m_InputGateBias->GetTensorInfo());
95 
96  m_ForgetGateBiasTensor = std::make_unique<arm_compute::CLTensor>();
97  BuildArmComputeTensor(*m_ForgetGateBiasTensor, m_Data.m_ForgetGateBias->GetTensorInfo());
98 
99  m_CellBiasTensor = std::make_unique<arm_compute::CLTensor>();
100  BuildArmComputeTensor(*m_CellBiasTensor, m_Data.m_CellBias->GetTensorInfo());
101 
102  m_OutputGateBiasTensor = std::make_unique<arm_compute::CLTensor>();
103  BuildArmComputeTensor(*m_OutputGateBiasTensor, m_Data.m_OutputGateBias->GetTensorInfo());
104 
105  const arm_compute::ICLTensor& inputTensor = static_cast<IClTensorHandle*>(m_Data.m_Inputs[0])->GetTensor();
106  arm_compute::ICLTensor& cellStateInTensor = static_cast<IClTensorHandle*>(m_Data.m_Inputs[1])->GetTensor();
107  const arm_compute::ICLTensor& outputStateInTensor = static_cast<IClTensorHandle*>(m_Data.m_Inputs[2])->GetTensor();
108 
109  arm_compute::ICLTensor& cellStateOutTensor = static_cast<IClTensorHandle*>(m_Data.m_Outputs[0])->GetTensor();
110  arm_compute::ICLTensor& outputStateOutTensor = static_cast<IClTensorHandle*>(m_Data.m_Outputs[1])->GetTensor();
111 
112  {
113  ARMNN_SCOPED_PROFILING_EVENT(Compute::Undefined, "ClQuantizedLstmWorkload_configure");
114  m_QuantizedLstmLayer.configure(clCompileContext, &inputTensor, m_InputToInputWeightsTensor.get(),
115  m_InputToForgetWeightsTensor.get(),
116  m_InputToCellWeightsTensor.get(), m_InputToOutputWeightsTensor.get(),
117  m_RecurrentToInputWeightsTensor.get(), m_RecurrentToForgetWeightsTensor.get(),
118  m_RecurrentToCellWeightsTensor.get(), m_RecurrentToOutputWeightsTensor.get(),
119  m_InputGateBiasTensor.get(), m_ForgetGateBiasTensor.get(),
120  m_CellBiasTensor.get(),
121  m_OutputGateBiasTensor.get(), &cellStateInTensor, &outputStateInTensor,
122  &cellStateOutTensor, &outputStateOutTensor);
123  }
124 
125  InitializeArmComputeClTensorData(*m_InputToInputWeightsTensor, m_Data.m_InputToInputWeights);
126  InitializeArmComputeClTensorData(*m_InputToForgetWeightsTensor, m_Data.m_InputToForgetWeights);
127  InitializeArmComputeClTensorData(*m_InputToCellWeightsTensor, m_Data.m_InputToCellWeights);
128  InitializeArmComputeClTensorData(*m_InputToOutputWeightsTensor, m_Data.m_InputToOutputWeights);
129  InitializeArmComputeClTensorData(*m_RecurrentToInputWeightsTensor, m_Data.m_RecurrentToInputWeights);
130  InitializeArmComputeClTensorData(*m_RecurrentToForgetWeightsTensor, m_Data.m_RecurrentToForgetWeights);
131  InitializeArmComputeClTensorData(*m_RecurrentToCellWeightsTensor, m_Data.m_RecurrentToCellWeights);
132  InitializeArmComputeClTensorData(*m_RecurrentToOutputWeightsTensor, m_Data.m_RecurrentToOutputWeights);
134  InitializeArmComputeClTensorData(*m_ForgetGateBiasTensor, m_Data.m_ForgetGateBias);
136  InitializeArmComputeClTensorData(*m_OutputGateBiasTensor, m_Data.m_OutputGateBias);
137 
138  m_QuantizedLstmLayer.prepare();
139  FreeUnusedTensors();
140 }
const ConstTensorHandle * m_InputGateBias
-
const ConstTensorHandle * m_RecurrentToInputWeights
-
#define ARMNN_SCOPED_PROFILING_EVENT(backendId, name)
Definition: Profiling.hpp:220
-
const TensorInfo & GetTensorInfo() const
-
const ConstTensorHandle * m_InputToForgetWeights
- - -
const ConstTensorHandle * m_RecurrentToCellWeights
-
const ConstTensorHandle * m_ForgetGateBias
-
const ConstTensorHandle * m_RecurrentToOutputWeights
-
const ConstTensorHandle * m_OutputGateBias
-
const ConstTensorHandle * m_RecurrentToForgetWeights
-
const ConstTensorHandle * m_InputToOutputWeights
-
std::vector< ITensorHandle * > m_Outputs
- -
const ConstTensorHandle * m_InputToInputWeights
-
const ConstTensorHandle * m_CellBias
-
void InitializeArmComputeClTensorData(arm_compute::CLTensor &clTensor, const ConstTensorHandle *handle)
-
std::vector< ITensorHandle * > m_Inputs
-
const ConstTensorHandle * m_InputToCellWeights
+
67  : ClBaseWorkload<QuantizedLstmQueueDescriptor>(descriptor, info)
+
68 {
+
69  m_InputToInputWeightsTensor = std::make_unique<arm_compute::CLTensor>();
+
70  BuildArmComputeTensor(*m_InputToInputWeightsTensor, m_Data.m_InputToInputWeights->GetTensorInfo());
+
71 
+
72  m_InputToForgetWeightsTensor = std::make_unique<arm_compute::CLTensor>();
+
73  BuildArmComputeTensor(*m_InputToForgetWeightsTensor, m_Data.m_InputToForgetWeights->GetTensorInfo());
+
74 
+
75  m_InputToCellWeightsTensor = std::make_unique<arm_compute::CLTensor>();
+
76  BuildArmComputeTensor(*m_InputToCellWeightsTensor, m_Data.m_InputToCellWeights->GetTensorInfo());
+
77 
+
78  m_InputToOutputWeightsTensor = std::make_unique<arm_compute::CLTensor>();
+
79  BuildArmComputeTensor(*m_InputToOutputWeightsTensor, m_Data.m_InputToOutputWeights->GetTensorInfo());
+
80 
+
81  m_RecurrentToInputWeightsTensor = std::make_unique<arm_compute::CLTensor>();
+
82  BuildArmComputeTensor(*m_RecurrentToInputWeightsTensor, m_Data.m_RecurrentToInputWeights->GetTensorInfo());
+
83 
+
84  m_RecurrentToForgetWeightsTensor = std::make_unique<arm_compute::CLTensor>();
+
85  BuildArmComputeTensor(*m_RecurrentToForgetWeightsTensor, m_Data.m_RecurrentToForgetWeights->GetTensorInfo());
+
86 
+
87  m_RecurrentToCellWeightsTensor = std::make_unique<arm_compute::CLTensor>();
+
88  BuildArmComputeTensor(*m_RecurrentToCellWeightsTensor, m_Data.m_RecurrentToCellWeights->GetTensorInfo());
+
89 
+
90  m_RecurrentToOutputWeightsTensor = std::make_unique<arm_compute::CLTensor>();
+
91  BuildArmComputeTensor(*m_RecurrentToOutputWeightsTensor, m_Data.m_RecurrentToOutputWeights->GetTensorInfo());
+
92 
+
93  m_InputGateBiasTensor = std::make_unique<arm_compute::CLTensor>();
+
94  BuildArmComputeTensor(*m_InputGateBiasTensor, m_Data.m_InputGateBias->GetTensorInfo());
+
95 
+
96  m_ForgetGateBiasTensor = std::make_unique<arm_compute::CLTensor>();
+
97  BuildArmComputeTensor(*m_ForgetGateBiasTensor, m_Data.m_ForgetGateBias->GetTensorInfo());
+
98 
+
99  m_CellBiasTensor = std::make_unique<arm_compute::CLTensor>();
+
100  BuildArmComputeTensor(*m_CellBiasTensor, m_Data.m_CellBias->GetTensorInfo());
+
101 
+
102  m_OutputGateBiasTensor = std::make_unique<arm_compute::CLTensor>();
+
103  BuildArmComputeTensor(*m_OutputGateBiasTensor, m_Data.m_OutputGateBias->GetTensorInfo());
+
104 
+
105  const arm_compute::ICLTensor& inputTensor = static_cast<IClTensorHandle*>(m_Data.m_Inputs[0])->GetTensor();
+
106  arm_compute::ICLTensor& cellStateInTensor = static_cast<IClTensorHandle*>(m_Data.m_Inputs[1])->GetTensor();
+
107  const arm_compute::ICLTensor& outputStateInTensor = static_cast<IClTensorHandle*>(m_Data.m_Inputs[2])->GetTensor();
+
108 
+
109  arm_compute::ICLTensor& cellStateOutTensor = static_cast<IClTensorHandle*>(m_Data.m_Outputs[0])->GetTensor();
+
110  arm_compute::ICLTensor& outputStateOutTensor = static_cast<IClTensorHandle*>(m_Data.m_Outputs[1])->GetTensor();
+
111 
+
112  {
+
113  ARMNN_SCOPED_PROFILING_EVENT(Compute::Undefined, "ClQuantizedLstmWorkload_configure");
+
114  m_QuantizedLstmLayer.configure(clCompileContext, &inputTensor, m_InputToInputWeightsTensor.get(),
+
115  m_InputToForgetWeightsTensor.get(),
+
116  m_InputToCellWeightsTensor.get(), m_InputToOutputWeightsTensor.get(),
+
117  m_RecurrentToInputWeightsTensor.get(), m_RecurrentToForgetWeightsTensor.get(),
+
118  m_RecurrentToCellWeightsTensor.get(), m_RecurrentToOutputWeightsTensor.get(),
+
119  m_InputGateBiasTensor.get(), m_ForgetGateBiasTensor.get(),
+
120  m_CellBiasTensor.get(),
+
121  m_OutputGateBiasTensor.get(), &cellStateInTensor, &outputStateInTensor,
+
122  &cellStateOutTensor, &outputStateOutTensor);
+
123  }
+
124 
+
125  InitializeArmComputeClTensorData(*m_InputToInputWeightsTensor, m_Data.m_InputToInputWeights);
+
126  InitializeArmComputeClTensorData(*m_InputToForgetWeightsTensor, m_Data.m_InputToForgetWeights);
+
127  InitializeArmComputeClTensorData(*m_InputToCellWeightsTensor, m_Data.m_InputToCellWeights);
+
128  InitializeArmComputeClTensorData(*m_InputToOutputWeightsTensor, m_Data.m_InputToOutputWeights);
+
129  InitializeArmComputeClTensorData(*m_RecurrentToInputWeightsTensor, m_Data.m_RecurrentToInputWeights);
+
130  InitializeArmComputeClTensorData(*m_RecurrentToForgetWeightsTensor, m_Data.m_RecurrentToForgetWeights);
+
131  InitializeArmComputeClTensorData(*m_RecurrentToCellWeightsTensor, m_Data.m_RecurrentToCellWeights);
+
132  InitializeArmComputeClTensorData(*m_RecurrentToOutputWeightsTensor, m_Data.m_RecurrentToOutputWeights);
+ +
134  InitializeArmComputeClTensorData(*m_ForgetGateBiasTensor, m_Data.m_ForgetGateBias);
+ +
136  InitializeArmComputeClTensorData(*m_OutputGateBiasTensor, m_Data.m_OutputGateBias);
+
137 
+
138  m_QuantizedLstmLayer.prepare();
+
139  FreeUnusedTensors();
+
140 }
+

References armnn::info.

+

Member Function Documentation

@@ -247,13 +310,13 @@ Additional Inherited Members

Implements IWorkload.

Definition at line 142 of file ClQuantizedLstmWorkload.cpp.

- -

References ARMNN_SCOPED_PROFILING_EVENT_CL_GUID, CHECK_LOCATION, BaseWorkload< QuantizedLstmQueueDescriptor >::GetGuid(), and armnn::RunClFunction().

-
143 {
144  ARMNN_SCOPED_PROFILING_EVENT_CL_GUID("ClQuantizedLstmWorkload_Execute", this->GetGuid());
145  RunClFunction(m_QuantizedLstmLayer, CHECK_LOCATION());
146 }
#define ARMNN_SCOPED_PROFILING_EVENT_CL_GUID(name, guid)
-
void RunClFunction(arm_compute::IFunction &function, const CheckLocation &location)
-
arm::pipe::ProfilingGuid GetGuid() const final
Definition: Workload.hpp:61
-
#define CHECK_LOCATION()
Definition: Exceptions.hpp:203
+
143 {
+
144  ARMNN_SCOPED_PROFILING_EVENT_CL_GUID("ClQuantizedLstmWorkload_Execute", this->GetGuid());
+
145  RunClFunction(m_QuantizedLstmLayer, CHECK_LOCATION());
+
146 }
+

References ARMNN_SCOPED_PROFILING_EVENT_CL_GUID, CHECK_LOCATION, BaseWorkload< QuantizedLstmQueueDescriptor >::GetGuid(), and armnn::RunClFunction().

+

The documentation for this class was generated from the following files: +
void InitializeArmComputeClTensorData(arm_compute::CLTensor &clTensor, const ConstTensorHandle *handle)
+
arm::pipe::ProfilingGuid GetGuid() const final
Definition: Workload.hpp:61
+
const ConstTensorHandle * m_InputToInputWeights
+
#define CHECK_LOCATION()
Definition: Exceptions.hpp:203
+ +
const ConstTensorHandle * m_CellBias
+
const ConstTensorHandle * m_InputToForgetWeights
+
#define ARMNN_SCOPED_PROFILING_EVENT(backendId, name)
Definition: Profiling.hpp:220
+
const ConstTensorHandle * m_InputToCellWeights
+
void RunClFunction(arm_compute::IFunction &function, const CheckLocation &location)
+
const ConstTensorHandle * m_InputToOutputWeights
+
const ConstTensorHandle * m_RecurrentToOutputWeights
+
const TensorInfo & GetTensorInfo() const
+ +
const ConstTensorHandle * m_OutputGateBias
+
const ConstTensorHandle * m_RecurrentToCellWeights
+
std::vector< ITensorHandle * > m_Outputs
+
const ConstTensorHandle * m_RecurrentToInputWeights
+
const ConstTensorHandle * m_ForgetGateBias
+
const ConstTensorHandle * m_InputGateBias
+
#define ARMNN_SCOPED_PROFILING_EVENT_CL_GUID(name, guid)
+
const ConstTensorHandle * m_RecurrentToForgetWeights
+
std::vector< ITensorHandle * > m_Inputs
-- cgit v1.2.1

Public Member Functions

 ClQuantizedLstmWorkload (const QuantizedLstmQueueDescriptor &descriptor, const WorkloadInfo &info, const arm_compute::CLCompileContext &clCompileContext)
 ClQuantizedLstmWorkload (const QuantizedLstmQueueDescriptor &descriptor, const WorkloadInfo &info, const arm_compute::CLCompileContext &clCompileContext)
 
void Execute () const override
 
- Public Member Functions inherited from IWorkload
virtual ~IWorkload ()
 
virtual arm::pipe::ProfilingGuid GetGuid () const =0
 
virtual bool SupportsTensorHandleReplacement () const =0
 
virtual void RegisterDebugCallback (const DebugCallbackFunction &)
 
virtual armnn::Optional< armnn::MemoryRequirementsGetMemoryRequirements ()