blob: 9e2563a3a5ce9fa3daf7fbd2bf8695110c4e906c [file] [log] [blame]
telsoa01c577f2c2018-08-31 09:22:23 +01001//
2// Copyright © 2017 Arm Ltd. All rights reserved.
David Beckecb56cd2018-09-05 12:52:57 +01003// SPDX-License-Identifier: MIT
telsoa01c577f2c2018-08-31 09:22:23 +01004//
5
arovir019e53a352018-08-31 15:26:35 +01006#include "ClLstmFloatWorkload.hpp"
David Beck711fa312018-09-24 10:46:38 +01007#include <backends/ClTensorHandle.hpp>
8#include <backends/CpuTensorHandle.hpp>
9#include <backends/ClLayerSupport.hpp>
10#include <backends/aclCommon/ArmComputeTensorUtils.hpp>
Matthew Bentham14e46692018-09-20 15:35:30 +010011
12#include <arm_compute/runtime/CL/functions/CLLSTMLayer.h>
13
14#include "ClWorkloadUtils.hpp"
telsoa01c577f2c2018-08-31 09:22:23 +010015
16namespace armnn
17{
18using namespace armcomputetensorutils;
19
arovir019e53a352018-08-31 15:26:35 +010020ClLstmFloatWorkload::ClLstmFloatWorkload(const LstmQueueDescriptor &descriptor, const WorkloadInfo &info)
telsoa01c577f2c2018-08-31 09:22:23 +010021 : FloatWorkload<LstmQueueDescriptor>(descriptor, info)
22{
23 arm_compute::LSTMParams<arm_compute::ICLTensor> lstm_param;
24
25 // Basic parameters
26 m_InputToForgetWeightsTensor = std::make_unique<arm_compute::CLTensor>();
27 BuildArmComputeTensor(*m_InputToForgetWeightsTensor, m_Data.m_InputToForgetWeights->GetTensorInfo());
28
29 m_InputToCellWeightsTensor = std::make_unique<arm_compute::CLTensor>();
30 BuildArmComputeTensor(*m_InputToCellWeightsTensor, m_Data.m_InputToCellWeights->GetTensorInfo());
31
32 m_InputToOutputWeightsTensor = std::make_unique<arm_compute::CLTensor>();
33 BuildArmComputeTensor(*m_InputToOutputWeightsTensor, m_Data.m_InputToOutputWeights->GetTensorInfo());
34
35 m_RecurrentToForgetWeightsTensor = std::make_unique<arm_compute::CLTensor>();
36 BuildArmComputeTensor(*m_RecurrentToForgetWeightsTensor, m_Data.m_RecurrentToForgetWeights->GetTensorInfo());
37
38 m_RecurrentToCellWeightsTensor = std::make_unique<arm_compute::CLTensor>();
39 BuildArmComputeTensor(*m_RecurrentToCellWeightsTensor, m_Data.m_RecurrentToCellWeights->GetTensorInfo());
40
41 m_RecurrentToOutputWeightsTensor = std::make_unique<arm_compute::CLTensor>();
42 BuildArmComputeTensor(*m_RecurrentToOutputWeightsTensor, m_Data.m_RecurrentToOutputWeights->GetTensorInfo());
43
44 m_ForgetGateBiasTensor = std::make_unique<arm_compute::CLTensor>();
45 BuildArmComputeTensor(*m_ForgetGateBiasTensor, m_Data.m_ForgetGateBias->GetTensorInfo());
46
47 m_CellBiasTensor = std::make_unique<arm_compute::CLTensor>();
48 BuildArmComputeTensor(*m_CellBiasTensor, m_Data.m_CellBias->GetTensorInfo());
49
50 m_OutputGateBiasTensor = std::make_unique<arm_compute::CLTensor>();
51 BuildArmComputeTensor(*m_OutputGateBiasTensor, m_Data.m_OutputGateBias->GetTensorInfo());
52
53 // for future reference: check the AndroidNN API for the logic here
54 if (!m_Data.m_Parameters.m_CifgEnabled)
55 {
56 m_InputToInputWeightsTensor = std::make_unique<arm_compute::CLTensor>();
57 BuildArmComputeTensor(*m_InputToInputWeightsTensor, m_Data.m_InputToInputWeights->GetTensorInfo());
58
59 m_RecurrentToInputWeightsTensor = std::make_unique<arm_compute::CLTensor>();
60 BuildArmComputeTensor(*m_RecurrentToInputWeightsTensor, m_Data.m_RecurrentToInputWeights->GetTensorInfo());
61
62 m_CellToInputWeightsTensor = std::make_unique<arm_compute::CLTensor>();
63 if (m_Data.m_CellToInputWeights != nullptr)
64 {
65 BuildArmComputeTensor(*m_CellToInputWeightsTensor, m_Data.m_CellToInputWeights->GetTensorInfo());
66 }
67
68 m_InputGateBiasTensor = std::make_unique<arm_compute::CLTensor>();
69 BuildArmComputeTensor(*m_InputGateBiasTensor, m_Data.m_InputGateBias->GetTensorInfo());
70
71 lstm_param.set_cifg_params(m_InputToInputWeightsTensor.get(),
72 m_RecurrentToInputWeightsTensor.get(),
73 m_Data.m_CellToInputWeights != nullptr ? m_CellToInputWeightsTensor.get() : nullptr,
74 m_InputGateBiasTensor.get());
75 }
76
77 if (m_Data.m_Parameters.m_ProjectionEnabled)
78 {
79 m_ProjectionWeightsTensor = std::make_unique<arm_compute::CLTensor>();
80 BuildArmComputeTensor(*m_ProjectionWeightsTensor, m_Data.m_ProjectionWeights->GetTensorInfo());
81
82 m_ProjectionBiasTensor = std::make_unique<arm_compute::CLTensor>();
83 if (m_Data.m_ProjectionBias != nullptr)
84 {
85 BuildArmComputeTensor(*m_ProjectionBiasTensor, m_Data.m_ProjectionBias->GetTensorInfo());
86 }
87
88 lstm_param.set_projection_params(m_ProjectionWeightsTensor.get(),
89 m_Data.m_ProjectionBias != nullptr ? m_ProjectionBiasTensor.get() : nullptr);
90 }
91
92 if (m_Data.m_Parameters.m_PeepholeEnabled)
93 {
94 m_CellToForgetWeightsTensor = std::make_unique<arm_compute::CLTensor>();
95 BuildArmComputeTensor(*m_CellToForgetWeightsTensor, m_Data.m_CellToForgetWeights->GetTensorInfo());
96
97 m_CellToOutputWeightsTensor = std::make_unique<arm_compute::CLTensor>();
98 BuildArmComputeTensor(*m_CellToOutputWeightsTensor, m_Data.m_CellToOutputWeights->GetTensorInfo());
99
100 lstm_param.set_peephole_params(m_CellToForgetWeightsTensor.get(), m_CellToOutputWeightsTensor.get());
101 }
102
103 const arm_compute::ICLTensor& input = static_cast<IClTensorHandle*>(m_Data.m_Inputs[0])->GetTensor();
104 const arm_compute::ICLTensor& output_state_in = static_cast<IClTensorHandle*>(m_Data.m_Inputs[1])->GetTensor();
105 const arm_compute::ICLTensor& cell_state_in = static_cast<IClTensorHandle*>(m_Data.m_Inputs[2])->GetTensor();
106
107 arm_compute::ICLTensor& output_state_out = static_cast<IClTensorHandle*>(m_Data.m_Outputs[1])->GetTensor();
108 arm_compute::ICLTensor& cell_state_out = static_cast<IClTensorHandle*>(m_Data.m_Outputs[2])->GetTensor();
109 arm_compute::ICLTensor& output = static_cast<IClTensorHandle*>(m_Data.m_Outputs[3])->GetTensor();
110
111 // Get the batch_size and the num_units from the cellStateIn dimensions
112 const TensorInfo& inputTensorInfo = info.m_InputTensorInfos[2];
113 const unsigned int batch_size = boost::numeric_cast<unsigned int>(inputTensorInfo.GetShape()[0]);
114 const unsigned int num_units = boost::numeric_cast<unsigned int>(inputTensorInfo.GetShape()[1]);
115
116 m_ScratchBuffer = std::make_unique<arm_compute::CLTensor>();
117 if (m_Data.m_Parameters.m_CifgEnabled)
118 {
119 // 2D tensor with dimensions [num_units * 4, batch_size] with CIFG
120 armnn::TensorInfo scratchBuffer1({ batch_size, num_units * 4 }, DataType::Float32);
121 BuildArmComputeTensor(*m_ScratchBuffer, scratchBuffer1);
122 }
123 else
124 {
125 // scratch_buffer [num_units * 3, batch_size] without CIFG
126 armnn::TensorInfo scratchBuffer2({ batch_size, num_units * 3 }, DataType::Float32);
127 BuildArmComputeTensor(*m_ScratchBuffer, scratchBuffer2);
128 }
129
130 float cell_threshold = m_Data.m_Parameters.m_ClippingThresCell;
131 float projection_threshold = m_Data.m_Parameters.m_ClippingThresProj;
132
133 // for preparing the object for the class ActivationLayerInfo, we need to consider 5 situations
134 arm_compute::ActivationLayerInfo activationLayerInfo;
135 if (m_Data.m_Parameters.m_ActivationFunc == 0)
136 {
137 // no activation, do nothing
138 }
139 else if (m_Data.m_Parameters.m_ActivationFunc == 1)
140 {
141 activationLayerInfo = arm_compute::ActivationLayerInfo(
142 arm_compute::ActivationLayerInfo::ActivationFunction::RELU);
143 }
144 else if (m_Data.m_Parameters.m_ActivationFunc == 3)
145 {
146 activationLayerInfo = arm_compute::ActivationLayerInfo(
147 arm_compute::ActivationLayerInfo::ActivationFunction::BOUNDED_RELU, 6.0);
148 }
149 else if (m_Data.m_Parameters.m_ActivationFunc == 4)
150 {
151 activationLayerInfo = arm_compute::ActivationLayerInfo(
152 arm_compute::ActivationLayerInfo::ActivationFunction::TANH, 1.0, 1.0);
153 }
154 else if (m_Data.m_Parameters.m_ActivationFunc == 6)
155 {
156 activationLayerInfo = arm_compute::ActivationLayerInfo(
157 arm_compute::ActivationLayerInfo::ActivationFunction::LOGISTIC);
158 }
159 else
160 {
161 throw armnn::Exception("Wrong Type of Activation Function!");
162 }
163
164
165 m_LstmLayer.configure(&input, m_InputToForgetWeightsTensor.get(), m_InputToCellWeightsTensor.get(),
166 m_InputToOutputWeightsTensor.get(), m_RecurrentToForgetWeightsTensor.get(),
167 m_RecurrentToCellWeightsTensor.get(), m_RecurrentToOutputWeightsTensor.get(),
168 m_ForgetGateBiasTensor.get(), m_CellBiasTensor.get(), m_OutputGateBiasTensor.get(),
169 &output_state_in, &cell_state_in, m_ScratchBuffer.get(), &output_state_out,
170 &cell_state_out, &output, lstm_param, activationLayerInfo,
171 cell_threshold, projection_threshold);
172
173 armcomputetensorutils::InitialiseArmComputeTensorEmpty(*m_ScratchBuffer);
174
Matthew Bentham785df502018-09-21 10:29:58 +0100175 InitializeArmComputeClTensorData(*m_InputToForgetWeightsTensor, m_Data.m_InputToForgetWeights);
176 InitializeArmComputeClTensorData(*m_InputToCellWeightsTensor, m_Data.m_InputToCellWeights);
177 InitializeArmComputeClTensorData(*m_InputToOutputWeightsTensor, m_Data.m_InputToOutputWeights);
178 InitializeArmComputeClTensorData(*m_RecurrentToForgetWeightsTensor, m_Data.m_RecurrentToForgetWeights);
179 InitializeArmComputeClTensorData(*m_RecurrentToCellWeightsTensor, m_Data.m_RecurrentToCellWeights);
180 InitializeArmComputeClTensorData(*m_RecurrentToOutputWeightsTensor, m_Data.m_RecurrentToOutputWeights);
181 InitializeArmComputeClTensorData(*m_ForgetGateBiasTensor, m_Data.m_ForgetGateBias);
182 InitializeArmComputeClTensorData(*m_CellBiasTensor, m_Data.m_CellBias);
183 InitializeArmComputeClTensorData(*m_OutputGateBiasTensor, m_Data.m_OutputGateBias);
telsoa01c577f2c2018-08-31 09:22:23 +0100184
185 if (!m_Data.m_Parameters.m_CifgEnabled)
186 {
Matthew Bentham785df502018-09-21 10:29:58 +0100187 InitializeArmComputeClTensorData(*m_InputToInputWeightsTensor, m_Data.m_InputToInputWeights);
188 InitializeArmComputeClTensorData(*m_RecurrentToInputWeightsTensor, m_Data.m_RecurrentToInputWeights);
telsoa01c577f2c2018-08-31 09:22:23 +0100189 if (m_Data.m_CellToInputWeights != nullptr)
190 {
Matthew Bentham785df502018-09-21 10:29:58 +0100191 InitializeArmComputeClTensorData(*m_CellToInputWeightsTensor, m_Data.m_CellToInputWeights);
telsoa01c577f2c2018-08-31 09:22:23 +0100192 }
Matthew Bentham785df502018-09-21 10:29:58 +0100193 InitializeArmComputeClTensorData(*m_InputGateBiasTensor, m_Data.m_InputGateBias);
telsoa01c577f2c2018-08-31 09:22:23 +0100194 }
195
196 if (m_Data.m_Parameters.m_ProjectionEnabled)
197 {
Matthew Bentham785df502018-09-21 10:29:58 +0100198 InitializeArmComputeClTensorData(*m_ProjectionWeightsTensor, m_Data.m_ProjectionWeights);
telsoa01c577f2c2018-08-31 09:22:23 +0100199 if (m_Data.m_ProjectionBias != nullptr)
200 {
Matthew Bentham785df502018-09-21 10:29:58 +0100201 InitializeArmComputeClTensorData(*m_ProjectionBiasTensor, m_Data.m_ProjectionBias);
telsoa01c577f2c2018-08-31 09:22:23 +0100202 }
203 }
204
205 if (m_Data.m_Parameters.m_PeepholeEnabled)
206 {
Matthew Bentham785df502018-09-21 10:29:58 +0100207 InitializeArmComputeClTensorData(*m_CellToForgetWeightsTensor, m_Data.m_CellToForgetWeights);
208 InitializeArmComputeClTensorData(*m_CellToOutputWeightsTensor, m_Data.m_CellToOutputWeights);
telsoa01c577f2c2018-08-31 09:22:23 +0100209 }
210
211 // Force Compute Library to perform the necessary copying and reshaping, after which
212 // delete all the input tensors that will no longer be needed
213 m_LstmLayer.prepare();
214 FreeUnusedTensors();
215}
216
arovir019e53a352018-08-31 15:26:35 +0100217void ClLstmFloatWorkload::Execute() const
telsoa01c577f2c2018-08-31 09:22:23 +0100218{
219 m_LstmLayer.run();
220}
221
arovir019e53a352018-08-31 15:26:35 +0100222arm_compute::Status ClLstmFloatWorkloadValidate(const TensorInfo& input, const TensorInfo& outputStateIn,
223 const TensorInfo& cellStateIn, const TensorInfo& scratchBuffer,
224 const TensorInfo& outputStateOut, const TensorInfo& cellStateOut,
225 const TensorInfo& output, const LstmDescriptor& descriptor,
226 const TensorInfo& inputToForgetWeights,
227 const TensorInfo& inputToCellWeights,
228 const TensorInfo& inputToOutputWeights,
229 const TensorInfo& recurrentToForgetWeights,
230 const TensorInfo& recurrentToCellWeights,
231 const TensorInfo& recurrentToOutputWeights,
232 const TensorInfo& forgetGateBias, const TensorInfo& cellBias,
233 const TensorInfo& outputGateBias,
234 const TensorInfo* inputToInputWeights,
235 const TensorInfo* recurrentToInputWeights,
236 const TensorInfo* cellToInputWeights,
237 const TensorInfo* inputGateBias,
238 const TensorInfo* projectionWeights,
239 const TensorInfo* projectionBias,
240 const TensorInfo* cellToForgetWeights,
241 const TensorInfo* cellToOutputWeights)
telsoa01c577f2c2018-08-31 09:22:23 +0100242{
243 arm_compute::LSTMParams<arm_compute::ITensorInfo> lstm_params_info;
244
245 // The inputs and the outputs
246 const arm_compute::TensorInfo aclInputInfo = BuildArmComputeTensorInfo(input);
247 const arm_compute::TensorInfo aclOutputStateInInfo = BuildArmComputeTensorInfo(outputStateIn);
248 const arm_compute::TensorInfo aclCellStateInInfo = BuildArmComputeTensorInfo(cellStateIn);
249 const arm_compute::TensorInfo aclScratchBufferInfo = BuildArmComputeTensorInfo(scratchBuffer);
250 const arm_compute::TensorInfo aclOutputStateOutInfo = BuildArmComputeTensorInfo(outputStateOut);
251 const arm_compute::TensorInfo aclCellStateOutInfo = BuildArmComputeTensorInfo(cellStateOut);
252 const arm_compute::TensorInfo aclOutputInfo = BuildArmComputeTensorInfo(output);
253
254 // Basic parameters
255 const arm_compute::TensorInfo aclInputToForgetWeightsInfo = BuildArmComputeTensorInfo(inputToForgetWeights);
256 const arm_compute::TensorInfo aclInputToCellWeightsInfo = BuildArmComputeTensorInfo(inputToCellWeights);
257 const arm_compute::TensorInfo aclInputToOutputWeightsInfo = BuildArmComputeTensorInfo(inputToOutputWeights);
258 const arm_compute::TensorInfo aclRecurrentToForgetWeightsInfo
259 = BuildArmComputeTensorInfo(recurrentToForgetWeights);
260 const arm_compute::TensorInfo aclRecurrentToCellWeightsInfo
261 = BuildArmComputeTensorInfo(recurrentToCellWeights);
262 const arm_compute::TensorInfo aclRecurrentToOutputWeightsInfo
263 = BuildArmComputeTensorInfo(recurrentToOutputWeights);
264 const arm_compute::TensorInfo aclForgetGateBiasInfo = BuildArmComputeTensorInfo(forgetGateBias);
265 const arm_compute::TensorInfo aclCellBiasInfo = BuildArmComputeTensorInfo(cellBias);
266 const arm_compute::TensorInfo aclOutputGateBiasInfo = BuildArmComputeTensorInfo(outputGateBias);
267
268 arm_compute::TensorInfo aclInputToInputWeightsInfo;
269 arm_compute::TensorInfo aclRecurrentToInputWeightsInfo;
270 arm_compute::TensorInfo aclCellToInputWeightsInfo;
271 arm_compute::TensorInfo aclInputGateBiasInfo;
272 arm_compute::TensorInfo aclProjectionWeightsInfo;
273 arm_compute::TensorInfo aclProjectionBiasInfo;
274 arm_compute::TensorInfo aclCellToForgetWeightsInfo;
275 arm_compute::TensorInfo aclCellToOutputWeightsInfo;
276
277 if (!descriptor.m_CifgEnabled)
278 {
279 armnn::TensorInfo inputToInputWInfo = *inputToInputWeights;
280 aclInputToInputWeightsInfo = BuildArmComputeTensorInfo(inputToInputWInfo);
281 armnn::TensorInfo recurrentToInputWInfo = *recurrentToInputWeights;
282 aclRecurrentToInputWeightsInfo = BuildArmComputeTensorInfo(recurrentToInputWInfo);
283
284 if (cellToInputWeights != nullptr)
285 {
286 armnn::TensorInfo cellToInputWInfo = *cellToInputWeights;
287 aclCellToInputWeightsInfo = BuildArmComputeTensorInfo(cellToInputWInfo);
288 }
289 armnn::TensorInfo inputGateBiasInfo = *inputGateBias;
290 aclInputGateBiasInfo = BuildArmComputeTensorInfo(inputGateBiasInfo);
291 lstm_params_info.set_cifg_params(&aclInputToInputWeightsInfo, &aclRecurrentToInputWeightsInfo,
292 cellToInputWeights != nullptr ? &aclCellToInputWeightsInfo: nullptr,
293 &aclInputGateBiasInfo);
294 }
295
296 if (descriptor.m_ProjectionEnabled)
297 {
298 const armnn::TensorInfo& projectionWInfo = *projectionWeights;
299 aclProjectionWeightsInfo = BuildArmComputeTensorInfo(projectionWInfo);
300
301 if (projectionBias != nullptr)
302 {
303 const armnn::TensorInfo& projectionBiasInfo = *projectionBias;
304 aclProjectionBiasInfo = BuildArmComputeTensorInfo(projectionBiasInfo);
305 }
306 lstm_params_info.set_projection_params(&aclProjectionWeightsInfo,
307 projectionBias != nullptr ? &aclProjectionBiasInfo: nullptr);
308 }
309
310 if (descriptor.m_PeepholeEnabled)
311 {
312 const armnn::TensorInfo& cellToForgetWInfo = *cellToForgetWeights;
313 aclCellToForgetWeightsInfo = BuildArmComputeTensorInfo(cellToForgetWInfo);
314 const armnn::TensorInfo& cellToOutputWInfo = *cellToOutputWeights;
315 aclCellToOutputWeightsInfo = BuildArmComputeTensorInfo(cellToOutputWInfo);
316 lstm_params_info.set_peephole_params(&aclCellToForgetWeightsInfo, &aclCellToOutputWeightsInfo);
317 }
318
319 float cell_threshold = descriptor.m_ClippingThresCell;
320 float projection_threshold = descriptor.m_ClippingThresProj;
321
322 // for preparing the object for the class ActivationLayerInfo, we need to consider 5 situations
323 arm_compute::ActivationLayerInfo activationLayerInfo;
324 if (descriptor.m_ActivationFunc == 0)
325 {
326 // no activation, do nothing
327 }
328 else if (descriptor.m_ActivationFunc == 1)
329 {
330 activationLayerInfo = arm_compute::ActivationLayerInfo(
331 arm_compute::ActivationLayerInfo::ActivationFunction::RELU);
332 }
333 else if (descriptor.m_ActivationFunc == 3)
334 {
335 activationLayerInfo = arm_compute::ActivationLayerInfo(
336 arm_compute::ActivationLayerInfo::ActivationFunction::BOUNDED_RELU, 6.0);
337 }
338 else if (descriptor.m_ActivationFunc == 4)
339 {
340 activationLayerInfo = arm_compute::ActivationLayerInfo(
341 arm_compute::ActivationLayerInfo::ActivationFunction::TANH, 1.0, 1.0);
342 }
343 else if (descriptor.m_ActivationFunc == 6)
344 {
345 activationLayerInfo = arm_compute::ActivationLayerInfo(
346 arm_compute::ActivationLayerInfo::ActivationFunction::LOGISTIC);
347 }
348 else
349 {
350 throw armnn::Exception("Wrong Type of Activation Function!");
351 }
352
353 return arm_compute::CLLSTMLayer::validate(&aclInputInfo, &aclInputToForgetWeightsInfo,
354 &aclInputToCellWeightsInfo,
355 &aclInputToOutputWeightsInfo,
356 &aclRecurrentToForgetWeightsInfo,
357 &aclRecurrentToCellWeightsInfo,
358 &aclRecurrentToOutputWeightsInfo,
359 &aclForgetGateBiasInfo,
360 &aclCellBiasInfo,
361 &aclOutputGateBiasInfo,
362 &aclOutputStateInInfo, &aclCellStateInInfo,
363 &aclScratchBufferInfo, &aclOutputStateOutInfo,
364 &aclCellStateOutInfo, &aclOutputInfo,
365 lstm_params_info, activationLayerInfo,
366 cell_threshold, projection_threshold);
367}
368
arovir019e53a352018-08-31 15:26:35 +0100369void ClLstmFloatWorkload::FreeUnusedTensors()
telsoa01c577f2c2018-08-31 09:22:23 +0100370{
371 FreeTensorIfUnused(m_InputToInputWeightsTensor);
372 FreeTensorIfUnused(m_InputToForgetWeightsTensor);
373 FreeTensorIfUnused(m_InputToCellWeightsTensor);
374 FreeTensorIfUnused(m_InputToOutputWeightsTensor);
375 FreeTensorIfUnused(m_RecurrentToInputWeightsTensor);
376 FreeTensorIfUnused(m_RecurrentToForgetWeightsTensor);
377 FreeTensorIfUnused(m_RecurrentToCellWeightsTensor);
378 FreeTensorIfUnused(m_RecurrentToOutputWeightsTensor);
379 FreeTensorIfUnused(m_CellToInputWeightsTensor);
380 FreeTensorIfUnused(m_CellToForgetWeightsTensor);
381 FreeTensorIfUnused(m_CellToOutputWeightsTensor);
382 FreeTensorIfUnused(m_InputGateBiasTensor);
383 FreeTensorIfUnused(m_ForgetGateBiasTensor);
384 FreeTensorIfUnused(m_CellBiasTensor);
385 FreeTensorIfUnused(m_OutputGateBiasTensor);
386 FreeTensorIfUnused(m_ProjectionWeightsTensor);
387 FreeTensorIfUnused(m_ProjectionBiasTensor);
388 FreeTensorIfUnused(m_ScratchBuffer);
389}
390
391} //namespace armnn