diff options
author | Michele Di Giorgio <michele.digiorgio@arm.com> | 2018-02-14 14:18:01 +0000 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:47:18 +0000 |
commit | e3fba0afa892c66379da1e3d3843f2155a1fb29a (patch) | |
tree | 2a420a3d988d269cc157d73e8d3c8accf1d21af8 /examples/graph_googlenet.cpp | |
parent | f07d28d9ee8ae73a93fe433f72855b6dcf58ad90 (diff) | |
download | ComputeLibrary-e3fba0afa892c66379da1e3d3843f2155a1fb29a.tar.gz |
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 <bsgcomp@arm.com>
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Diffstat (limited to 'examples/graph_googlenet.cpp')
-rw-r--r-- | examples/graph_googlenet.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/examples/graph_googlenet.cpp b/examples/graph_googlenet.cpp index b2e2f1bf8f..13f6543ef6 100644 --- a/examples/graph_googlenet.cpp +++ b/examples/graph_googlenet.cpp @@ -53,8 +53,9 @@ public: constexpr float mean_g = 116.67f; /* Mean value to subtract from green channel */ constexpr float mean_b = 104.01f; /* 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); ConvolutionMethodHint convolution_hint = ConvolutionMethodHint::GEMM; // Parse arguments @@ -89,6 +90,9 @@ public: label = argv[4]; } + // Initialize graph + graph.graph_init(int_target_hint == 2); + graph << target_hint << Tensor(TensorInfo(TensorShape(224U, 224U, 3U, 1U), 1, DataType::F32), get_input_accessor(image, mean_r, mean_g, mean_b)) |