aboutsummaryrefslogtreecommitdiff
path: root/examples/graph_lenet.cpp
diff options
context:
space:
mode:
authorGian Marco Iodice <gianmarco.iodice@arm.com>2017-09-29 12:05:49 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:35:24 +0000
commit1914db71de52a9a8b608d83814098657e86b3bcc (patch)
tree8e3f1cf1c58f29eae156a3bc0c1f6fa63cbe2d45 /examples/graph_lenet.cpp
parente7f7b5507c6d9e70b946880a774205d9b1a8e59c (diff)
downloadComputeLibrary-1914db71de52a9a8b608d83814098657e86b3bcc.tar.gz
COMPMID-417 - Fix graph_letnet.cpp example
In case the library has been built just for NEON, we should not run the example Change-Id: I99f8d3efd20276dfeb73ca8362872111be1b1fd7 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/89682 Reviewed-by: Anthony Barbier <anthony.barbier@arm.com> Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Diffstat (limited to 'examples/graph_lenet.cpp')
-rw-r--r--examples/graph_lenet.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/graph_lenet.cpp b/examples/graph_lenet.cpp
index 676fdb9ce2..1f04ff8a50 100644
--- a/examples/graph_lenet.cpp
+++ b/examples/graph_lenet.cpp
@@ -93,16 +93,18 @@ void main_graph_lenet(int argc, const char **argv)
}
// Check if OpenCL is available and initialize the scheduler
+ Hint hint = Hint::NEON;
if(arm_compute::opencl_is_available())
{
arm_compute::CLScheduler::get().default_init();
+ hint = Hint::OPENCL;
}
Graph graph;
graph.set_info_enablement(true);
//conv1 << pool1 << conv2 << pool2 << fc1 << act1 << fc2 << smx
- graph << Hint::OPENCL
+ graph << hint
<< Tensor(TensorInfo(TensorShape(28U, 28U, 1U, batches), 1, DataType::F32), DummyAccessor())
<< ConvolutionLayer(
5U, 5U, 20U,