MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / prepare

Method prepare

src/gpu/cl/operators/ClWinogradConv2d.cpp:296–321  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

294}
295
296void 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
323experimental::MemoryRequirements ClWinogradConv2d::workspace() const
324{

Callers

nothing calls this directly

Calls 8

offset_int_vecFunction · 0.85
get_const_tensorMethod · 0.80
enqueue_opMethod · 0.80
mark_as_unusedMethod · 0.80
get_tensorMethod · 0.45
getMethod · 0.45
add_tensorMethod · 0.45
finishMethod · 0.45

Tested by

no test coverage detected