aboutsummaryrefslogtreecommitdiff
path: root/docs/00_introduction.dox
diff options
context:
space:
mode:
authorGian Marco Iodice <gianmarco.iodice@arm.com>2017-09-29 12:03:18 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:35:24 +0000
commitdaec1aa17a27b5b10ae9bcda66cc51d708da4da9 (patch)
tree7b20c9733081dfed6fbcdfd7017a4325ba7bd1df /docs/00_introduction.dox
parent6eb74113f91a73ad70e4fa1ab5e9febc3269143b (diff)
downloadComputeLibrary-daec1aa17a27b5b10ae9bcda66cc51d708da4da9.tar.gz
COMPMID-417 - Fix documentation
Added explanation about how to build the example graph_lenet.cpp Change-Id: I1da0683f6284a77e0f3e11250a96bc9f0d7f0b97 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/89690 Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com> Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'docs/00_introduction.dox')
-rw-r--r--docs/00_introduction.dox33
1 files changed, 33 insertions, 0 deletions
diff --git a/docs/00_introduction.dox b/docs/00_introduction.dox
index 8f038f6ddb..fb174eb289 100644
--- a/docs/00_introduction.dox
+++ b/docs/00_introduction.dox
@@ -498,6 +498,19 @@ To cross compile an OpenCL example for Linux 64bit:
(notice the only difference with the 32 bit command is that we don't need the -mfpu option and the compiler's name is different)
+To cross compile the examples with the Graph API, such as graph_lenet.cpp, you need to link the library arm_compute_graph.so also.
+(notice the compute library has to be built with both neon and opencl enabled - neon=1 and opencl=1)
+
+i.e. to cross compile the "graph_lenet" example for Linux 32bit:
+
+ arm-linux-gnueabihf-g++ examples/graph_lenet.cpp utils/Utils.cpp -I. -Iinclude -std=c++11 -mfpu=neon -L. -larm_compute -larm_compute_graph -lOpenCL -o graph_lenet -DARM_COMPUTE_CL
+
+i.e. to cross compile the "graph_lenet" example for Linux 64bit:
+
+ aarch64-linux-gnu-g++ examples/graph_lenet.cpp utils/Utils.cpp -I. -Iinclude -std=c++11 -L. -larm_compute -lOpenCL -o graph_lenet -DARM_COMPUTE_CL
+
+(notice the only difference with the 32 bit command is that we don't need the -mfpu option and the compiler's name is different)
+
To compile natively (i.e directly on an ARM device) for NEON for Linux 32bit:
g++ examples/neon_convolution.cpp utils/Utils.cpp -I. -Iinclude -std=c++11 -mfpu=neon -larm_compute -o neon_convolution
@@ -512,6 +525,18 @@ To compile natively (i.e directly on an ARM device) for OpenCL for Linux 32bit o
g++ examples/cl_convolution.cpp utils/Utils.cpp -I. -Iinclude -std=c++11 -larm_compute -lOpenCL -o cl_convolution -DARM_COMPUTE_CL
+To compile natively (i.e directly on an ARM device) the examples with the Graph API, such as graph_lenet.cpp, you need to link the library arm_compute_graph.so also.
+(notice the compute library has to be built with both neon and opencl enabled - neon=1 and opencl=1)
+
+i.e. to cross compile the "graph_lenet" example for Linux 32bit:
+
+ g++ examples/graph_lenet.cpp utils/Utils.cpp -I. -Iinclude -std=c++11 -mfpu=neon -L. -larm_compute -larm_compute_graph -lOpenCL -o graph_lenet -DARM_COMPUTE_CL
+
+i.e. to cross compile the "graph_lenet" example for Linux 64bit:
+
+ g++ examples/graph_lenet.cpp utils/Utils.cpp -I. -Iinclude -std=c++11 L. -larm_compute -larm_compute_graph -lOpenCL -o graph_lenet -DARM_COMPUTE_CL
+
+(notice the only difference with the 32 bit command is that we don't need the -mfpu option)
@note These two commands assume libarm_compute.so is available in your library path, if not add the path to it using -L
@@ -579,6 +604,14 @@ To cross compile an OpenCL example:
#64 bit:
aarch64-linux-android-g++ examples/cl_convolution.cpp utils/Utils.cpp -I. -Iinclude -std=c++11 -larm_compute-static -L. -o cl_convolution_aarch64 -static-libstdc++ -pie -lOpenCL -DARM_COMPUTE_CL
+To cross compile the examples with the Graph API, such as graph_lenet.cpp, you need to link the library arm_compute_graph also.
+(notice the compute library has to be built with both neon and opencl enabled - neon=1 and opencl=1)
+
+ #32 bit:
+ arm-linux-androideabi-clang++ examples/graph_lenet.cpp utils/Utils.cpp -I. -Iinclude -std=c++11 -larm_compute-static -larm_compute_graph-static -L. -o graph_lenet_arm -static-libstdc++ -pie -lOpenCL -DARM_COMPUTE_CL
+ #64 bit:
+ aarch64-linux-android-g++ examples/graph_lenet.cpp utils/Utils.cpp -I. -Iinclude -std=c++11 -larm_compute-static -larm_compute_graph-static -L. -o graph_lenet_aarch64 -static-libstdc++ -pie -lOpenCL -DARM_COMPUTE_CL
+
@note Due to some issues in older versions of the Mali OpenCL DDK (<= r13p0), we recommend to link arm_compute statically on Android.
Then you need to do is upload the executable and the shared library to the device using ADB: