From 6940dd720ebb6b3d1df8ca203ab696daefe58189 Mon Sep 17 00:00:00 2001 From: Jim Flynn Date: Fri, 20 Mar 2020 12:25:56 +0000 Subject: renamed Documentation folder 20.02 and added .nojekyll file Signed-off-by: Jim Flynn --- ...assarmnn_1_1_neon_quantized_lstm_workload.xhtml | 244 +++++++++++++++++++++ 1 file changed, 244 insertions(+) create mode 100644 20.02/classarmnn_1_1_neon_quantized_lstm_workload.xhtml (limited to '20.02/classarmnn_1_1_neon_quantized_lstm_workload.xhtml') diff --git a/20.02/classarmnn_1_1_neon_quantized_lstm_workload.xhtml b/20.02/classarmnn_1_1_neon_quantized_lstm_workload.xhtml new file mode 100644 index 0000000000..825d037175 --- /dev/null +++ b/20.02/classarmnn_1_1_neon_quantized_lstm_workload.xhtml @@ -0,0 +1,244 @@ + + + + + + + + + + + + + +ArmNN: NeonQuantizedLstmWorkload Class Reference + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  20.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
NeonQuantizedLstmWorkload Class Reference
+
+
+ +

#include <NeonQuantizedLstmWorkload.hpp>

+
+Inheritance diagram for NeonQuantizedLstmWorkload:
+
+
+ + +BaseWorkload< QuantizedLstmQueueDescriptor > +IWorkload + +
+ + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 NeonQuantizedLstmWorkload (const QuantizedLstmQueueDescriptor &descriptor, const WorkloadInfo &info)
 
virtual void Execute () const override
 
- Public Member Functions inherited from BaseWorkload< QuantizedLstmQueueDescriptor >
 BaseWorkload (const QuantizedLstmQueueDescriptor &descriptor, const WorkloadInfo &info)
 
void PostAllocationConfigure () override
 
const QuantizedLstmQueueDescriptorGetData () const
 
profiling::ProfilingGuid GetGuid () const final
 
- Public Member Functions inherited from IWorkload
virtual ~IWorkload ()
 
virtual void RegisterDebugCallback (const DebugCallbackFunction &)
 
+ + + + + + +

+Additional Inherited Members

- Protected Attributes inherited from BaseWorkload< QuantizedLstmQueueDescriptor >
const QuantizedLstmQueueDescriptor m_Data
 
const profiling::ProfilingGuid m_Guid
 
+

Detailed Description

+
+

Definition at line 18 of file NeonQuantizedLstmWorkload.hpp.

+

Constructor & Destructor Documentation

+ +

◆ NeonQuantizedLstmWorkload()

+ +
+
+ + + + + + + + + + + + + + + + + + +
NeonQuantizedLstmWorkload (const QuantizedLstmQueueDescriptordescriptor,
const WorkloadInfoinfo 
)
+
+ +

Definition at line 17 of file NeonQuantizedLstmWorkload.cpp.

+
19  : BaseWorkload<QuantizedLstmQueueDescriptor>(descriptor, info)
20 {
21  // Basic parameters
22  m_InputToInputWeightsTensor = std::make_unique<arm_compute::Tensor>();
23  BuildArmComputeTensor(*m_InputToInputWeightsTensor, m_Data.m_InputToInputWeights->GetTensorInfo());
24 
25  m_InputToForgetWeightsTensor = std::make_unique<arm_compute::Tensor>();
26  BuildArmComputeTensor(*m_InputToForgetWeightsTensor, m_Data.m_InputToForgetWeights->GetTensorInfo());
27 
28  m_InputToCellWeightsTensor = std::make_unique<arm_compute::Tensor>();
29  BuildArmComputeTensor(*m_InputToCellWeightsTensor, m_Data.m_InputToCellWeights->GetTensorInfo());
30 
31  m_InputToOutputWeightsTensor = std::make_unique<arm_compute::Tensor>();
32  BuildArmComputeTensor(*m_InputToOutputWeightsTensor, m_Data.m_InputToOutputWeights->GetTensorInfo());
33 
34  m_RecurrentToInputWeightsTensor = std::make_unique<arm_compute::Tensor>();
35  BuildArmComputeTensor(*m_RecurrentToInputWeightsTensor, m_Data.m_RecurrentToInputWeights->GetTensorInfo());
36 
37  m_RecurrentToForgetWeightsTensor = std::make_unique<arm_compute::Tensor>();
38  BuildArmComputeTensor(*m_RecurrentToForgetWeightsTensor, m_Data.m_RecurrentToForgetWeights->GetTensorInfo());
39 
40  m_RecurrentToCellWeightsTensor = std::make_unique<arm_compute::Tensor>();
41  BuildArmComputeTensor(*m_RecurrentToCellWeightsTensor, m_Data.m_RecurrentToCellWeights->GetTensorInfo());
42 
43  m_RecurrentToOutputWeightsTensor = std::make_unique<arm_compute::Tensor>();
44  BuildArmComputeTensor(*m_RecurrentToOutputWeightsTensor, m_Data.m_RecurrentToOutputWeights->GetTensorInfo());
45 
46  m_InputGateBiasTensor = std::make_unique<arm_compute::Tensor>();
47  BuildArmComputeTensor(*m_InputGateBiasTensor, m_Data.m_InputGateBias->GetTensorInfo());
48 
49  m_ForgetGateBiasTensor = std::make_unique<arm_compute::Tensor>();
50  BuildArmComputeTensor(*m_ForgetGateBiasTensor, m_Data.m_ForgetGateBias->GetTensorInfo());
51 
52  m_CellBiasTensor = std::make_unique<arm_compute::Tensor>();
53  BuildArmComputeTensor(*m_CellBiasTensor, m_Data.m_CellBias->GetTensorInfo());
54 
55  m_OutputGateBiasTensor = std::make_unique<arm_compute::Tensor>();
56  BuildArmComputeTensor(*m_OutputGateBiasTensor, m_Data.m_OutputGateBias->GetTensorInfo());
57 
58  const arm_compute::ITensor& input = static_cast<IAclTensorHandle*>(m_Data.m_Inputs[0])->GetTensor();
59  arm_compute::ITensor& cell_state_in = static_cast<IAclTensorHandle*>(m_Data.m_Inputs[1])->GetTensor();
60  const arm_compute::ITensor& output_state_in = static_cast<IAclTensorHandle*>(m_Data.m_Inputs[2])->GetTensor();
61 
62  arm_compute::ITensor& cell_state_out = static_cast<IAclTensorHandle*>(m_Data.m_Outputs[0])->GetTensor();
63  arm_compute::ITensor& output_state_out = static_cast<IAclTensorHandle*>(m_Data.m_Outputs[1])->GetTensor();
64 
65  m_QuantizedLstmLayer.configure(&input,
66  m_InputToInputWeightsTensor.get(),
67  m_InputToForgetWeightsTensor.get(),
68  m_InputToCellWeightsTensor.get(),
69  m_InputToOutputWeightsTensor.get(),
70  m_RecurrentToInputWeightsTensor.get(),
71  m_RecurrentToForgetWeightsTensor.get(),
72  m_RecurrentToCellWeightsTensor.get(),
73  m_RecurrentToOutputWeightsTensor.get(),
74  m_InputGateBiasTensor.get(),
75  m_ForgetGateBiasTensor.get(),
76  m_CellBiasTensor.get(),
77  m_OutputGateBiasTensor.get(),
78  &cell_state_in,
79  &output_state_in,
80  &cell_state_out,
81  &output_state_out);
82 
83  InitializeArmComputeTensorData(*m_InputToInputWeightsTensor,
85 
86  InitializeArmComputeTensorData(*m_InputToForgetWeightsTensor,
88 
89  InitializeArmComputeTensorData(*m_InputToCellWeightsTensor,
91 
92  InitializeArmComputeTensorData(*m_InputToOutputWeightsTensor,
94 
95  InitializeArmComputeTensorData(*m_RecurrentToInputWeightsTensor,
97 
98  InitializeArmComputeTensorData(*m_RecurrentToForgetWeightsTensor,
100 
101  InitializeArmComputeTensorData(*m_RecurrentToCellWeightsTensor,
103 
104  InitializeArmComputeTensorData(*m_RecurrentToOutputWeightsTensor,
106 
107  InitializeArmComputeTensorData(*m_InputGateBiasTensor,
109 
110  InitializeArmComputeTensorData(*m_ForgetGateBiasTensor,
112 
113  InitializeArmComputeTensorData(*m_CellBiasTensor,
115 
116  InitializeArmComputeTensorData(*m_OutputGateBiasTensor,
118 
119  // Force Compute Library to perform the necessary copying and reshaping, after which
120  // delete all the input tensors that will no longer be needed
121  m_QuantizedLstmLayer.prepare();
122  FreeUnusedTensors();
123 }
const ConstCpuTensorHandle * m_RecurrentToForgetWeights
+
const ConstCpuTensorHandle * m_InputGateBias
+
const ConstCpuTensorHandle * m_InputToCellWeights
+
const QuantizedLstmQueueDescriptor m_Data
Definition: Workload.hpp:46
+
const ConstCpuTensorHandle * m_ForgetGateBias
+
const ConstCpuTensorHandle * m_RecurrentToInputWeights
+
const ConstCpuTensorHandle * m_RecurrentToCellWeights
+
const ConstCpuTensorHandle * m_RecurrentToOutputWeights
+
void InitializeArmComputeTensorData(arm_compute::Tensor &tensor, const ConstCpuTensorHandle *handle)
+
const ConstCpuTensorHandle * m_CellBias
+
std::vector< ITensorHandle * > m_Outputs
+ +
const ConstCpuTensorHandle * m_OutputGateBias
+
const ConstCpuTensorHandle * m_InputToForgetWeights
+
std::vector< ITensorHandle * > m_Inputs
+
const ConstCpuTensorHandle * m_InputToOutputWeights
+
const ConstCpuTensorHandle * m_InputToInputWeights
+
const TensorInfo & GetTensorInfo() const
+
+
+
+

Member Function Documentation

+ +

◆ Execute()

+ +
+
+ + + + + +
+ + + + + + + +
void Execute () const
+
+overridevirtual
+
+ +

Implements IWorkload.

+ +

Definition at line 125 of file NeonQuantizedLstmWorkload.cpp.

+
126 {
127  m_QuantizedLstmLayer.run();
128 }
+
+
+
The documentation for this class was generated from the following files: +
+
+ + + + -- cgit v1.2.1