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

Method prepare

src/gpu/cl/operators/ClGemmConv2d.cpp:642–665  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

640}
641
642void ClGemmConv2d::prepare(ITensorPack &tensors)
643{
644 if (!_is_prepared)
645 {
646 // Run weights reshaping and mark original weights tensor as unused
647 ICLTensor *weights_reshaped_p =
648 utils::cast::polymorphic_downcast<ICLTensor *>(tensors.get_tensor(offset_int_vec(WeightsReshaped)));
649 CLAuxTensorHandler weights_reshaped(_weights_reshaped, *weights_reshaped_p);
650 auto weights = tensors.get_const_tensor(TensorType::ACL_SRC_1);
651 ITensorPack pack = {{TensorType::ACL_SRC, weights}, {TensorType::ACL_DST, weights_reshaped.get()}};
652
653 if (_append_bias)
654 {
655 const auto biases = tensors.get_const_tensor(TensorType::ACL_SRC_2);
656 pack.add_const_tensor(TensorType::ACL_BIAS, biases);
657 }
658 CLScheduler::get().enqueue_op(*_weights_reshape_kernel.get(), pack, true);
659 tensors.add_const_tensor(TensorType::ACL_SRC_1, weights_reshaped.get());
660
661 // Prepare GEMM
662 _is_quantized ? _mm_gemmlowp->prepare(tensors) : _mm_gemm->prepare(tensors);
663 _is_prepared = true;
664 }
665}
666experimental::MemoryRequirements ClGemmConv2d::workspace() const
667{
668 return _aux_mem;

Callers

nothing calls this directly

Calls 6

offset_int_vecFunction · 0.85
get_const_tensorMethod · 0.80
add_const_tensorMethod · 0.80
enqueue_opMethod · 0.80
get_tensorMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected