diff options
-rw-r--r-- | tests/main.cpp | 15 | ||||
-rw-r--r-- | utils/CommonGraphOptions.cpp | 2 |
2 files changed, 14 insertions, 3 deletions
diff --git a/tests/main.cpp b/tests/main.cpp index ae9a47e1d4..596838927a 100644 --- a/tests/main.cpp +++ b/tests/main.cpp @@ -36,6 +36,7 @@ #ifdef ARM_COMPUTE_CL #include "arm_compute/runtime/CL/CLScheduler.h" +#include "arm_compute/runtime/CL/CLTuner.h" #endif /* ARM_COMPUTE_CL */ #ifdef ARM_COMPUTE_GC #include "arm_compute/runtime/GLES_COMPUTE/GCScheduler.h" @@ -63,7 +64,8 @@ std::unique_ptr<AssetsLibrary> library; int main(int argc, char **argv) { #ifdef ARM_COMPUTE_CL - CLScheduler::get().default_init(); + CLTuner cl_tuner(false); + CLScheduler::get().default_init(&cl_tuner); #endif /* ARM_COMPUTE_CL */ #ifdef ARM_COMPUTE_GC @@ -101,6 +103,10 @@ int main(int argc, char **argv) error_on_missing_assets->set_help("Mark a test as failed instead of skipping it when assets are missing"); auto assets = parser.add_positional_option<utils::SimpleOption<std::string>>("assets"); assets->set_help("Path to the assets directory"); +#ifdef ARM_COMPUTE_CL + auto enable_tuner = parser.add_option<utils::ToggleOption>("enable-tuner"); + enable_tuner->set_help("Enable OpenCL dynamic tuner"); +#endif /* ARM_COMPUTE_CL */ try { @@ -115,7 +121,12 @@ int main(int argc, char **argv) std::vector<std::unique_ptr<framework::Printer>> printers = options.create_printers(); Scheduler::get().set_num_threads(options.threads->value()); - +#ifdef ARM_COMPUTE_CL + if(enable_tuner->is_set()) + { + cl_tuner.set_tune_new_kernels(enable_tuner->value()); + } +#endif /* ARM_COMPUTE_CL */ if(options.log_level->value() > framework::LogLevel::NONE) { for(auto &p : printers) diff --git a/utils/CommonGraphOptions.cpp b/utils/CommonGraphOptions.cpp index d6ff0516aa..bf882f5164 100644 --- a/utils/CommonGraphOptions.cpp +++ b/utils/CommonGraphOptions.cpp @@ -153,7 +153,7 @@ CommonGraphOptions::CommonGraphOptions(CommandLineParser &parser) target->set_help("Target to execute on"); data_type->set_help("Data type to use"); data_layout->set_help("Data layout to use"); - enable_tuner->set_help("Enable tuner"); + enable_tuner->set_help("Enable OpenCL dynamic tuner"); fast_math_hint->set_help("Enable fast math"); data_path->set_help("Path where graph parameters reside"); image->set_help("Input image for the graph"); |