aboutsummaryrefslogtreecommitdiff
path: root/examples/graph_googlenet.cpp
diff options
context:
space:
mode:
authorGian Marco <gianmarco.iodice@arm.com>2018-02-21 18:03:26 +0000
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:47:40 +0000
commitc1b6e37233e0ebd21cb44bf8863a09c0ba5feeb1 (patch)
tree886ca853c31650c9ffebda29ec61b7b683119fa4 /examples/graph_googlenet.cpp
parent78c009079654268cca9c22848e4fae9f222b100d (diff)
downloadComputeLibrary-c1b6e37233e0ebd21cb44bf8863a09c0ba5feeb1.tar.gz
COMPMID-765 - Call graph_init only once all nodes have been instantied
- In order to enable to OpenCL tuner, graph_init() has to be called only once all nodes have been instantiated Change-Id: I28a51ccada8f81c12e4f4484b892f14a530f6f4d Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/121707 Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Reviewed-by: Anthony Barbier <anthony.barbier@arm.com> Tested-by: Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'examples/graph_googlenet.cpp')
-rw-r--r--examples/graph_googlenet.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/graph_googlenet.cpp b/examples/graph_googlenet.cpp
index 1b2f0d6f3b..de4afa29ea 100644
--- a/examples/graph_googlenet.cpp
+++ b/examples/graph_googlenet.cpp
@@ -90,9 +90,6 @@ 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, std::move(preprocessor)))
@@ -137,6 +134,9 @@ public:
get_weights_accessor(data_path, "/cnn_data/googlenet_model/loss3/loss3_classifier_b.npy"))
<< SoftmaxLayer()
<< Tensor(get_output_accessor(label, 5));
+
+ // In order to enable the OpenCL tuner, graph_init() has to be called only when all nodes have been instantiated
+ graph.graph_init(int_target_hint == 2);
}
void do_run() override
{