diff options
author | Georgios Pinitas <georgios.pinitas@arm.com> | 2021-07-08 18:14:45 +0100 |
---|---|---|
committer | Georgios Pinitas <georgios.pinitas@arm.com> | 2021-07-16 14:39:47 +0000 |
commit | 2b147ee857eb237613670460c52efedd43601955 (patch) | |
tree | 2c2f66754dca6d83e4967daae600e84bca8ca6b4 /src/runtime/CL | |
parent | d0c5df2695e6e30d600c0339f547373c0c6667b0 (diff) | |
download | ComputeLibrary-2b147ee857eb237613670460c52efedd43601955.tar.gz |
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 <georgios.pinitas@arm.com>
Change-Id: Ib329d3bc8d8aa21abae9fabfe61de35cc84d4819
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5925
Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/runtime/CL')
-rw-r--r-- | src/runtime/CL/functions/CLWinogradConvolutionLayer.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
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<opencl::ClWinogradConv2d> op{ nullptr }; ITensorPack run_pack{}; - ITensorPack prep_pack{}; MemoryGroup memory_group{}; WorkspaceData<CLTensor> 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<CLTensor>(_impl->op->workspace(), _impl->memory_group, _impl->run_pack, _impl->prep_pack); + _impl->workspace_tensors = manage_workspace<CLTensor>(_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; } } |