diff options
author | Vidhya Sudhan Loganathan <vidhyasudhan.loganathan@arm.com> | 2019-04-25 09:27:24 +0100 |
---|---|---|
committer | Gian Marco Iodice <gianmarco.iodice@arm.com> | 2019-04-25 16:18:58 +0000 |
commit | 050471e40fc58cb5ea745701a43ec5b2b9586b81 (patch) | |
tree | 0ee684bcc93fae693686c391e42a2b824705aeb1 /utils/TypePrinter.h | |
parent | d038dafe3810d22c8664ceef4fe49aad77abdbd1 (diff) | |
download | ComputeLibrary-050471e40fc58cb5ea745701a43ec5b2b9586b81.tar.gz |
COMPMID-1974 : Extend CLTuner to support different of level of tuning
Change-Id: I52e4a00a25e7f7a17050038cee7c30e508553722
Signed-off-by: Vidhya Sudhan Loganathan <vidhyasudhan.loganathan@arm.com>
Reviewed-on: https://review.mlplatform.org/c/977
Comments-Addressed: Pablo Marquez <pablo.tello@arm.com>
Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com>
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 'utils/TypePrinter.h')
-rw-r--r-- | utils/TypePrinter.h | 44 |
1 files changed, 44 insertions, 0 deletions
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 <ostream> #include <sstream> @@ -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__ */ |