From 2b147ee857eb237613670460c52efedd43601955 Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Thu, 8 Jul 2021 18:14:45 +0100 Subject: Avoid multiple Rhs matrix transformation on ClGemm ClWinogradConv2d was performing Rhs transformation on every step impacting the performance. Adds scope logging support through ARM_COMPUTE_LOG_MSG_WITH_FUNCNAME Resolves: COMPMID-4596 Signed-off-by: Georgios Pinitas Change-Id: Ib329d3bc8d8aa21abae9fabfe61de35cc84d4819 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5925 Reviewed-by: Michele Di Giorgio Comments-Addressed: Arm Jenkins --- src/runtime/CL/functions/CLWinogradConvolutionLayer.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/runtime/CL/functions/CLWinogradConvolutionLayer.cpp') diff --git a/src/runtime/CL/functions/CLWinogradConvolutionLayer.cpp b/src/runtime/CL/functions/CLWinogradConvolutionLayer.cpp index f758c3d0b3..fa01c914c5 100644 --- a/src/runtime/CL/functions/CLWinogradConvolutionLayer.cpp +++ b/src/runtime/CL/functions/CLWinogradConvolutionLayer.cpp @@ -41,7 +41,6 @@ struct CLWinogradConvolutionLayer::Impl ICLTensor *dst{ nullptr }; std::unique_ptr op{ nullptr }; ITensorPack run_pack{}; - ITensorPack prep_pack{}; MemoryGroup memory_group{}; WorkspaceData workspace_tensors{}; bool is_prepared{ false }; @@ -80,9 +79,7 @@ void CLWinogradConvolutionLayer::configure(const CLCompileContext &compile_conte { TensorType::ACL_SRC_2, _impl->biases }, { TensorType::ACL_DST, _impl->dst } }; - - _impl->prep_pack = { { TensorType::ACL_SRC_1, _impl->weights } }; - _impl->workspace_tensors = manage_workspace(_impl->op->workspace(), _impl->memory_group, _impl->run_pack, _impl->prep_pack); + _impl->workspace_tensors = manage_workspace(_impl->op->workspace(), _impl->memory_group, _impl->run_pack, _impl->run_pack); } Status CLWinogradConvolutionLayer::validate(const ITensorInfo *input, const ITensorInfo *weights, const ITensorInfo *biases, const ITensorInfo *output, const PadStrideInfo &conv_info, @@ -102,7 +99,11 @@ void CLWinogradConvolutionLayer::prepare() { if(!_impl->is_prepared) { - _impl->op->prepare(_impl->prep_pack); + _impl->op->prepare(_impl->run_pack); + + // Release Preparation tensors + release_prepare_tensors(_impl->workspace_tensors, _impl->run_pack); + _impl->run_pack.remove_tensor(TensorType::ACL_SRC_1); _impl->is_prepared = true; } } -- cgit v1.2.1