aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/CL/mlgo/MLGOHeuristics.cpp
diff options
context:
space:
mode:
authorSiCong Li <sicong.li@arm.com>2021-02-05 09:19:51 +0000
committerSiCong Li <sicong.li@arm.com>2021-02-09 09:47:22 +0000
commit70858d8eb178532b0e728e6a7d09a77d27605020 (patch)
tree7eb80b2d8febd955908286b2279621ae86157520 /src/runtime/CL/mlgo/MLGOHeuristics.cpp
parent8e2133152285a80d2997ab21f6a3397f7c60a929 (diff)
downloadComputeLibrary-70858d8eb178532b0e728e6a7d09a77d27605020.tar.gz
Integrate MLGO into CLGEMM and CLGEMMLowpMatrixMultiplyCore: Part1
* Create a new public handle class CLGEMMHeuristicsHandle It is responsible for the loading and lifetime management of the underlying heuristics * Add to_string utility to several mlgo constructs for logging Resolves: COMPMID-3843, COMPMID-3844 Signed-off-by: SiCong Li <sicong.li@arm.com> Change-Id: Ib9c65e076daa6a9a204999cde9abf366dbabc496 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5001 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/runtime/CL/mlgo/MLGOHeuristics.cpp')
-rw-r--r--src/runtime/CL/mlgo/MLGOHeuristics.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/runtime/CL/mlgo/MLGOHeuristics.cpp b/src/runtime/CL/mlgo/MLGOHeuristics.cpp
index ec99b50488..80f3bb85e9 100644
--- a/src/runtime/CL/mlgo/MLGOHeuristics.cpp
+++ b/src/runtime/CL/mlgo/MLGOHeuristics.cpp
@@ -22,8 +22,10 @@
* SOFTWARE.
*/
#include "src/runtime/CL/mlgo/MLGOHeuristics.h"
+
#include "arm_compute/core/Log.h"
#include "src/runtime/CL/mlgo/MLGOParser.h"
+#include "src/runtime/CL/mlgo/Utils.h"
#include <fstream>
@@ -53,9 +55,9 @@ MLGOHeuristics::MLGOHeuristics()
{
}
-std::pair<bool, GEMMType> MLGOHeuristics::query_gemm_type(Query query) const
+std::pair<bool, GEMMType> MLGOHeuristics::query_gemm_type(const Query &query) const
{
- ARM_COMPUTE_LOG_INFO_MSG_CORE("MLGOHeuristics querying gemm type");
+ ARM_COMPUTE_LOG_INFO_MSG_WITH_FORMAT_CORE("MLGOHeuristics querying gemm type. %s.", to_string(query).c_str());
const auto invalid = GEMMType::RESHAPED;
if(!_valid)
{
@@ -71,9 +73,9 @@ std::pair<bool, GEMMType> MLGOHeuristics::query_gemm_type(Query query) const
}
return _trees.at(index).query<GEMMType>(shape_query);
}
-std::pair<bool, GEMMConfigNative> MLGOHeuristics::query_gemm_config_native(Query query) const
+std::pair<bool, GEMMConfigNative> MLGOHeuristics::query_gemm_config_native(const Query &query) const
{
- ARM_COMPUTE_LOG_INFO_MSG_CORE("MLGOHeuristics querying gemm config native");
+ ARM_COMPUTE_LOG_INFO_MSG_WITH_FORMAT_CORE("MLGOHeuristics querying gemm config native. %s.", to_string(query).c_str());
const auto invalid = GEMMConfigNative{};
if(!_valid)
{
@@ -89,9 +91,9 @@ std::pair<bool, GEMMConfigNative> MLGOHeuristics::query_gemm_config_native(Query
}
return _trees.at(index).query<GEMMConfigNative>(shape_query);
}
-std::pair<bool, GEMMConfigReshapedOnlyRHS> MLGOHeuristics::query_gemm_config_reshaped_only_rhs(Query query) const
+std::pair<bool, GEMMConfigReshapedOnlyRHS> MLGOHeuristics::query_gemm_config_reshaped_only_rhs(const Query &query) const
{
- ARM_COMPUTE_LOG_INFO_MSG_CORE("MLGOHeuristics querying gemm config reshaped only rhs");
+ ARM_COMPUTE_LOG_INFO_MSG_WITH_FORMAT_CORE("MLGOHeuristics querying gemm config reshaped only rhs. %s.", to_string(query).c_str());
const auto invalid = GEMMConfigReshapedOnlyRHS{};
if(!_valid)
{
@@ -107,9 +109,9 @@ std::pair<bool, GEMMConfigReshapedOnlyRHS> MLGOHeuristics::query_gemm_config_res
}
return _trees.at(index).query<GEMMConfigReshapedOnlyRHS>(shape_query);
}
-std::pair<bool, GEMMConfigReshaped> MLGOHeuristics::query_gemm_config_reshaped(Query query) const
+std::pair<bool, GEMMConfigReshaped> MLGOHeuristics::query_gemm_config_reshaped(const Query &query) const
{
- ARM_COMPUTE_LOG_INFO_MSG_CORE("MLGOHeuristics querying gemm config reshaped");
+ ARM_COMPUTE_LOG_INFO_MSG_WITH_FORMAT_CORE("MLGOHeuristics querying gemm config reshaped. %s.", to_string(query).c_str());
const auto invalid = GEMMConfigReshaped{};
if(!_valid)
{