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 /tests/main.cpp | |
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 'tests/main.cpp')
-rw-r--r-- | tests/main.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/tests/main.cpp b/tests/main.cpp index 0eca0c8f1b..bb35d0af98 100644 --- a/tests/main.cpp +++ b/tests/main.cpp @@ -39,7 +39,7 @@ #include "arm_compute/runtime/CL/CLHelpers.h" #include "arm_compute/runtime/CL/CLScheduler.h" #include "arm_compute/runtime/CL/CLTuner.h" - +#include "utils/TypePrinter.h" #endif /* ARM_COMPUTE_CL */ #ifdef ARM_COMPUTE_GC #include "arm_compute/runtime/GLES_COMPUTE/GCScheduler.h" @@ -139,6 +139,16 @@ int main(int argc, char **argv) #ifdef ARM_COMPUTE_CL auto enable_tuner = parser.add_option<utils::ToggleOption>("enable-tuner"); enable_tuner->set_help("Enable OpenCL dynamic tuner"); + + const std::set<CLTunerMode> supported_tuner_modes + { + CLTunerMode::EXHAUSTIVE, + CLTunerMode::NORMAL, + CLTunerMode::RAPID + }; + auto tuner_mode = parser.add_option<utils::EnumOption<CLTunerMode>>("tuner-mode", supported_tuner_modes, CLTunerMode::EXHAUSTIVE); + tuner_mode->set_help("Configures the time taken by the tuner to tune. Slow tuner produces the most performant LWS configuration"); + auto tuner_file = parser.add_option<utils::SimpleOption<std::string>>("tuner-file", ""); tuner_file->set_help("File to load/save CLTuner values"); #endif /* ARM_COMPUTE_CL */ @@ -161,7 +171,9 @@ int main(int argc, char **argv) #ifdef ARM_COMPUTE_CL if(enable_tuner->is_set()) { - cl_tuner.set_tune_new_kernels(enable_tuner->value()); + //set tuner mode + cl_tuner.set_tuner_mode(tuner_mode->value()); + // If that's the first run then the file won't exist yet if(file_exists(tuner_file->value())) { |