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 --- tests/main.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'tests') 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("enable-tuner"); enable_tuner->set_help("Enable OpenCL dynamic tuner"); + + const std::set supported_tuner_modes + { + CLTunerMode::EXHAUSTIVE, + CLTunerMode::NORMAL, + CLTunerMode::RAPID + }; + auto tuner_mode = parser.add_option>("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>("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())) { -- cgit v1.2.1