| 201 | } |
| 202 | |
| 203 | void NEQLSTMLayer::configure_mm(NEGEMMLowpMatrixMultiplyCore &mm, |
| 204 | NEGEMMLowpOutputStage &outstage, |
| 205 | GEMMLowpOutputStageInfo &gemmlowp_info, |
| 206 | const ITensor *mm_input, |
| 207 | const ITensor *mm_weights, |
| 208 | const ITensor *bias, |
| 209 | Tensor *mm_res, |
| 210 | Tensor *outstage_res, |
| 211 | float gemmlowp_scale, |
| 212 | const TensorInfo &mm_res_info, |
| 213 | const TensorInfo &outstage_tensor_info) |
| 214 | { |
| 215 | _memory_group.manage(mm_res); |
| 216 | _memory_group.manage(outstage_res); |
| 217 | |
| 218 | mm_res->allocator()->init(mm_res_info); |
| 219 | outstage_res->allocator()->init(outstage_tensor_info); |
| 220 | |
| 221 | // Configure matrix-multiplication |
| 222 | mm.configure(mm_input, mm_weights, nullptr, mm_res); |
| 223 | |
| 224 | // Configure output stage |
| 225 | quantization::calculate_quantized_multiplier(gemmlowp_scale, &gemmlowp_info.gemmlowp_multiplier, |
| 226 | &gemmlowp_info.gemmlowp_shift); |
| 227 | outstage.configure(mm_res, bias, outstage_res, gemmlowp_info); |
| 228 | mm_res->allocator()->allocate(); |
| 229 | } |
| 230 | |
| 231 | void NEQLSTMLayer::configure(const ITensor *input, |
| 232 | const ITensor *input_to_forget_weights, |