From e3fba0afa892c66379da1e3d3843f2155a1fb29a Mon Sep 17 00:00:00 2001 From: Michele Di Giorgio Date: Wed, 14 Feb 2018 14:18:01 +0000 Subject: COMPMID-925: Enabling OpenCL tuner in the graph examples Change-Id: I4fe501281f527e20e8fdd0253d59ea2c4629056b Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/120354 Tested-by: Jenkins Reviewed-by: Anthony Barbier Reviewed-by: Georgios Pinitas --- examples/graph_vgg16.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'examples/graph_vgg16.cpp') diff --git a/examples/graph_vgg16.cpp b/examples/graph_vgg16.cpp index c3eb922f0e..ccb9dbb19d 100644 --- a/examples/graph_vgg16.cpp +++ b/examples/graph_vgg16.cpp @@ -65,8 +65,9 @@ public: constexpr float mean_g = 116.779f; /* Mean value to subtract from green channel */ constexpr float mean_b = 103.939f; /* Mean value to subtract from blue channel */ - // Set target. 0 (NEON), 1 (OpenCL). By default it is NEON - TargetHint target_hint = set_target_hint(argc > 1 ? std::strtol(argv[1], nullptr, 10) : 0); + // Set target. 0 (NEON), 1 (OpenCL), 2 (OpenCL with Tuner). By default it is NEON + const int int_target_hint = argc > 1 ? std::strtol(argv[1], nullptr, 10) : 0; + TargetHint target_hint = set_target_hint(int_target_hint); // Check if we can use GEMM-based convolutions evaluating if the platform has at least 1.8 GB of available memory const size_t memory_required = 1932735283L; @@ -104,6 +105,9 @@ public: label = argv[4]; } + // Initialize graph + graph.graph_init(int_target_hint == 2); + graph << target_hint << convolution_hint << Tensor(TensorInfo(TensorShape(224U, 224U, 3U, 1U), 1, DataType::F32), -- cgit v1.2.1