| 139 | } |
| 140 | |
| 141 | void CLQLSTMLayer::configure_mm(const CLCompileContext &compile_context, |
| 142 | CLGEMMLowpMatrixMultiplyCore &mm, |
| 143 | CLGEMMLowpOutputStage &outstage, |
| 144 | GEMMLowpOutputStageInfo &gemmlowp_info, |
| 145 | const ICLTensor *mm_input, |
| 146 | const ICLTensor *mm_weights, |
| 147 | const ICLTensor *bias, |
| 148 | CLTensor *mm_res, |
| 149 | CLTensor *outstage_res, |
| 150 | float gemmlowp_scale, |
| 151 | const TensorInfo &mm_res_info, |
| 152 | const TensorInfo &outstage_tensor_info) |
| 153 | { |
| 154 | _memory_group.manage(mm_res); |
| 155 | _memory_group.manage(outstage_res); |
| 156 | |
| 157 | mm_res->allocator()->init(mm_res_info); |
| 158 | outstage_res->allocator()->init(outstage_tensor_info); |
| 159 | |
| 160 | // Configure matrix-multiplication |
| 161 | mm.configure(compile_context, mm_input, mm_weights, nullptr, mm_res); |
| 162 | |
| 163 | // Configure output stage |
| 164 | quantization::calculate_quantized_multiplier(gemmlowp_scale, &gemmlowp_info.gemmlowp_multiplier, |
| 165 | &gemmlowp_info.gemmlowp_shift); |
| 166 | outstage.configure(compile_context, mm_res, bias, outstage_res, gemmlowp_info); |
| 167 | mm_res->allocator()->allocate(); |
| 168 | } |
| 169 | |
| 170 | void CLQLSTMLayer::configure(const ICLTensor *input, |
| 171 | const ICLTensor *input_to_forget_weights, |