aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/core/utils
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2021-07-08 18:14:45 +0100
committerGeorgios Pinitas <georgios.pinitas@arm.com>2021-07-16 14:39:47 +0000
commit2b147ee857eb237613670460c52efedd43601955 (patch)
tree2c2f66754dca6d83e4967daae600e84bca8ca6b4 /arm_compute/core/utils
parentd0c5df2695e6e30d600c0339f547373c0c6667b0 (diff)
downloadComputeLibrary-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 'arm_compute/core/utils')
-rw-r--r--arm_compute/core/utils/logging/Macros.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/arm_compute/core/utils/logging/Macros.h b/arm_compute/core/utils/logging/Macros.h
index 1108dd3800..4900bf9e6b 100644
--- a/arm_compute/core/utils/logging/Macros.h
+++ b/arm_compute/core/utils/logging/Macros.h
@@ -30,6 +30,20 @@
#ifdef ARM_COMPUTE_LOGGING_ENABLED
+#ifdef __GNUC__
+inline std::string signature_name(const std::string &pretty_func)
+{
+ const auto scope_op = pretty_func.find("::");
+ const auto begin = pretty_func.substr(0, scope_op).rfind(" ") + 1;
+ const auto end = pretty_func.rfind("(") - begin;
+
+ return pretty_func.substr(begin, end) + "()";
+}
+#define ARM_COMPUTE_SIGNATURE_NAME signature_name(__PRETTY_FUNCTION__)
+#else /* __GNUC__ */
+#define ARM_COMPUTE_SIGNATURE_NAME (__func__)
+#endif /* __GNUC__ */
+
#define ARM_COMPUTE_LOG_MSG(logger_name, log_level, msg) \
do \
{ \
@@ -47,7 +61,7 @@
if(__logger != nullptr) \
{ \
std::ostringstream s; \
- s << __func__ << ":" << msg; \
+ s << ARM_COMPUTE_SIGNATURE_NAME << " : " << msg; \
__logger->log(log_level, s.str()); \
} \
} while(false)