From c1b6e37233e0ebd21cb44bf8863a09c0ba5feeb1 Mon Sep 17 00:00:00 2001 From: Gian Marco Date: Wed, 21 Feb 2018 18:03:26 +0000 Subject: 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 Reviewed-by: Anthony Barbier Tested-by: Jenkins --- examples/graph_lenet.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'examples/graph_lenet.cpp') diff --git a/examples/graph_lenet.cpp b/examples/graph_lenet.cpp index 863efeafbf..61bc7bd3bf 100644 --- a/examples/graph_lenet.cpp +++ b/examples/graph_lenet.cpp @@ -76,9 +76,6 @@ public: batches = std::strtol(argv[3], nullptr, 0); } - // Initialize graph - graph.graph_init(int_target_hint == 2); - //conv1 << pool1 << conv2 << pool2 << fc1 << act1 << fc2 << smx graph << target_hint << Tensor(TensorInfo(TensorShape(28U, 28U, 1U, batches), 1, DataType::F32), DummyAccessor()) @@ -105,6 +102,9 @@ public: get_weights_accessor(data_path, "/cnn_data/lenet_model/ip2_b.npy")) << SoftmaxLayer() << Tensor(DummyAccessor(0)); + + // 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 { -- cgit v1.2.1