From 050471e40fc58cb5ea745701a43ec5b2b9586b81 Mon Sep 17 00:00:00 2001 From: Vidhya Sudhan Loganathan Date: Thu, 25 Apr 2019 09:27:24 +0100 Subject: COMPMID-1974 : Extend CLTuner to support different of level of tuning Change-Id: I52e4a00a25e7f7a17050038cee7c30e508553722 Signed-off-by: Vidhya Sudhan Loganathan Reviewed-on: https://review.mlplatform.org/c/977 Comments-Addressed: Pablo Marquez Reviewed-by: Gian Marco Iodice Tested-by: Arm Jenkins Reviewed-by: Georgios Pinitas Comments-Addressed: Arm Jenkins --- utils/TypePrinter.h | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) (limited to 'utils/TypePrinter.h') diff --git a/utils/TypePrinter.h b/utils/TypePrinter.h index 70196882de..a71e03696a 100644 --- a/utils/TypePrinter.h +++ b/utils/TypePrinter.h @@ -34,6 +34,7 @@ #include "arm_compute/core/Strides.h" #include "arm_compute/core/TensorInfo.h" #include "arm_compute/core/Types.h" +#include "arm_compute/runtime/CL/CLTunerTypes.h" #include #include @@ -2218,6 +2219,49 @@ inline std::string to_string(const T &val) return support::cpp11::to_string(val); } +/** Convert a CLTunerMode value to a string + * + * @param val CLTunerMode value to be converted + * + * @return String representing the corresponding CLTunerMode. + */ +inline std::string to_string(const CLTunerMode val) +{ + switch(val) + { + case CLTunerMode::EXHAUSTIVE: + { + return std::string("Exhaustive"); + } + case CLTunerMode::NORMAL: + { + return std::string("Normal"); + } + case CLTunerMode::RAPID: + { + return std::string("Rapid"); + } + default: + { + ARM_COMPUTE_ERROR("Invalid tuner mode."); + return std::string("UNDEFINED"); + } + } +} +/** [Print CLTunerMode type] **/ +/** Formatted output of the CLTunerMode type. + * + * @param[out] os Output stream. + * @param[in] val CLTunerMode to output. + * + * @return Modified output stream. + */ +inline ::std::ostream &operator<<(::std::ostream &os, const CLTunerMode &val) +{ + os << to_string(val); + return os; +} + } // namespace arm_compute #endif /* __ARM_COMPUTE_TYPE_PRINTER_H__ */ -- cgit v1.2.1