| 294 | } |
| 295 | |
| 296 | void ClWinogradConv2d::prepare(ITensorPack &tensors) |
| 297 | { |
| 298 | if (!_is_prepared) |
| 299 | { |
| 300 | auto weights = |
| 301 | utils::cast::polymorphic_downcast<const ICLTensor *>(tensors.get_const_tensor(TensorType::ACL_SRC_1)); |
| 302 | ICLTensor *in1_aux = utils::cast::polymorphic_downcast<ICLTensor *>(tensors.get_tensor(offset_int_vec(3))); |
| 303 | |
| 304 | CLAuxTensorHandler input1(_input1, *in1_aux); |
| 305 | ITensorPack pack_ft{ |
| 306 | {TensorType::ACL_SRC, weights}, |
| 307 | {TensorType::ACL_DST, input1.get()}, |
| 308 | }; |
| 309 | // Run filter transform and mark original weights as unused |
| 310 | CLScheduler::get().enqueue_op(*_filter_transform, pack_ft, false); |
| 311 | weights->mark_as_unused(); |
| 312 | |
| 313 | // Prepare GEMM and release reshaped weights if marked unused by ClGemm |
| 314 | ITensorPack mm_prepare_pack = tensors; |
| 315 | mm_prepare_pack.add_tensor(ACL_SRC_1, input1.get()); |
| 316 | _batched_mm.prepare(mm_prepare_pack); |
| 317 | |
| 318 | CLScheduler::get().queue().finish(); |
| 319 | _is_prepared = true; |
| 320 | } |
| 321 | } |
| 322 | |
| 323 | experimental::MemoryRequirements ClWinogradConv2d::workspace() const |
| 324 | { |
nothing calls this directly
no test coverage detected