From db4a6c15e55aaffbe555c33f3e10795d822701e7 Mon Sep 17 00:00:00 2001 From: SiCong Li Date: Fri, 5 Feb 2021 09:30:57 +0000 Subject: Integrate MLGO into CLGEMM and CLGEMMLowpMatrixMultiplyCore: Part2 * Associate CLScheduler with CLGEMMHeuristicsHandle * Add option in arm_compute_validation for mlgo file path * Extend logging for the selection of gemm configurations Resolves: COMPMID-3843, COMPMID-3844 Signed-off-by: SiCong Li Change-Id: I869c3a4122414ae6a7bbd721966c1da37621ca11 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5002 Tested-by: Arm Jenkins Reviewed-by: Manuel Bottini Reviewed-by: Gian Marco Iodice Reviewed-by: Georgios Pinitas Comments-Addressed: Arm Jenkins --- utils/TypePrinter.h | 42 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) (limited to 'utils/TypePrinter.h') diff --git a/utils/TypePrinter.h b/utils/TypePrinter.h index 3996d0ddce..bf5b64a1eb 100644 --- a/utils/TypePrinter.h +++ b/utils/TypePrinter.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2020 Arm Limited. + * Copyright (c) 2017-2021 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -35,6 +35,7 @@ #include "arm_compute/core/TensorInfo.h" #include "arm_compute/core/Types.h" #include "arm_compute/runtime/CL/CLTunerTypes.h" +#include "arm_compute/runtime/CL/CLTypes.h" #include "support/StringSupport.h" #include @@ -282,7 +283,8 @@ inline ::std::ostream &operator<<(::std::ostream &os, const GEMMLHSMatrixInfo &g */ inline ::std::ostream &operator<<(::std::ostream &os, const GEMMRHSMatrixInfo &gemm_info) { - os << "( n0= " << (unsigned int)gemm_info.n0 << " k0= " << gemm_info.k0 << " h0= " << gemm_info.h0 << " trans= " << gemm_info.transpose << " inter= " << gemm_info.interleave << "})"; + os << "( n0= " << (unsigned int)gemm_info.n0 << " k0= " << gemm_info.k0 << " h0= " << gemm_info.h0 << " trans= " << gemm_info.transpose << " inter= " << gemm_info.interleave << " exp_img=" << + gemm_info.export_to_cl_image << "})"; return os; } @@ -2441,6 +2443,42 @@ inline std::string to_string(const CLTunerMode val) } } } +/** Converts a @ref CLGEMMKernelType to string + * + * @param[in] val CLGEMMKernelType value to be converted + * + * @return String representing the corresponding CLGEMMKernelType + */ +inline std::string to_string(CLGEMMKernelType val) +{ + switch(val) + { + case CLGEMMKernelType::NATIVE_V1: + { + return "Native_V1"; + } + case CLGEMMKernelType::RESHAPED_V1: + { + return "Reshaped_V1"; + } + case CLGEMMKernelType::NATIVE: + { + return "Native"; + } + case CLGEMMKernelType::RESHAPED_ONLY_RHS: + { + return "Reshaped_Only_RHS"; + } + case CLGEMMKernelType::RESHAPED: + { + return "Reshaped"; + } + default: + { + return "Unknown"; + } + } +} /** [Print CLTunerMode type] **/ /** Formatted output of the CLTunerMode type. * -- cgit v1.2.1