aboutsummaryrefslogtreecommitdiff
path: root/tests/main.cpp
diff options
context:
space:
mode:
authorAnthony Barbier <anthony.barbier@arm.com>2018-07-12 18:03:54 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:54:54 +0000
commit943a40ba3d91da0165fa35bfc8dee4b070f7940a (patch)
tree3386eb6bd5d1b9e3e347b32831294396cc9870ba /tests/main.cpp
parentc7b82f1319ad85bc2d203bf7f3e18341792eed26 (diff)
downloadComputeLibrary-943a40ba3d91da0165fa35bfc8dee4b070f7940a.tar.gz
COMPMID-1397: Add option to enable CLTuner in arm_compute_benchmark
Change-Id: Iee062e674e7a20b4786d738d4535e4c89fbbf42e Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/139800 Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Tested-by: Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'tests/main.cpp')
-rw-r--r--tests/main.cpp15
1 files changed, 13 insertions, 2 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)