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/gpu/cl/operators/ClGemm.cpp | |
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/gpu/cl/operators/ClGemm.cpp')
-rw-r--r-- | src/runtime/gpu/cl/operators/ClGemm.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/runtime/gpu/cl/operators/ClGemm.cpp b/src/runtime/gpu/cl/operators/ClGemm.cpp index a80375447d..cb0eecae4b 100644 --- a/src/runtime/gpu/cl/operators/ClGemm.cpp +++ b/src/runtime/gpu/cl/operators/ClGemm.cpp @@ -37,6 +37,8 @@ #include "arm_compute/core/utils/misc/ShapeCalculator.h" #include "arm_compute/runtime/CL/CLScheduler.h" #include "arm_compute/runtime/ITensorAllocator.h" + +#include "src/common/utils/Log.h" #include "src/core/gpu/cl/IClKernel.h" #include "src/core/helpers/AutoConfiguration.h" #include "src/core/helpers/MemoryHelpers.h" @@ -744,6 +746,8 @@ void ClGemm::prepare(ITensorPack &constants) // If memory for RHS is persistent and src1 is provided re-transform else assume that RHS is transformed if((_aux_mem[AuxTensorIdx::RhsReshape].lifetime == MemoryLifetime::Persistent) && (src1 != nullptr && rhs_aux != nullptr) && rhs_aux) { + ARM_COMPUTE_LOG_INFO_WITH_FUNCNAME_ACL("Transforming RHS Matrix!"); + CLAuxTensorHandler rhs_reshaped(_tmp_b, *rhs_aux); ARM_COMPUTE_ERROR_ON(rhs_reshaped.get()->cl_buffer().get() == nullptr); |