blob: eb6130bda5c4632a368722f57e2ab5dde4c1b481 [file] [log] [blame]
Jenkinsc3f34a42018-03-02 12:38:09 +00001namespace arm_compute
2{
Anthony Barbierdbdab852017-06-23 15:42:00 +01003/** @mainpage Introduction
4
5@tableofcontents
6
7The Computer Vision and Machine Learning library is a set of functions optimised for both ARM CPUs and GPUs using SIMD technologies.
8
9Several builds of the library are available using various configurations:
10 - OS: Linux, Android or bare metal.
11 - Architecture: armv7a (32bit) or arm64-v8a (64bit)
Anthony Barbier8140e1e2017-12-14 23:48:46 +000012 - Technology: NEON / OpenCL / GLES_COMPUTE / NEON and OpenCL and GLES_COMPUTE
Anthony Barbierdbdab852017-06-23 15:42:00 +010013 - Debug / Asserts / Release: Use a build with asserts enabled to debug your application and enable extra validation. Once you are sure your application works as expected you can switch to a release build of the library for maximum performance.
14
15@section S0_1_contact Contact / Support
16
17Please email developer@arm.com
18
19In order to facilitate the work of the support team please provide the build information of the library you are using. To get the version of the library you are using simply run:
20
21 $ strings android-armv7a-cl-asserts/libarm_compute.so | grep arm_compute_version
22 arm_compute_version=v16.12 Build options: {'embed_kernels': '1', 'opencl': '1', 'arch': 'armv7a', 'neon': '0', 'asserts': '1', 'debug': '0', 'os': 'android', 'Werror': '1'} Git hash=f51a545d4ea12a9059fe4e598a092f1fd06dc858
23
Anthony Barbier8140e1e2017-12-14 23:48:46 +000024@section S0_2_prebuilt_binaries Pre-built binaries
25
26For each release we provide some pre-built binaries of the library [here](https://github.com/ARM-software/ComputeLibrary/releases)
27
28These binaries have been built using the following toolchains:
29 - Linux armv7a: gcc-linaro-arm-linux-gnueabihf-4.9-2014.07_linux
30 - Linux arm64-v8a: gcc-linaro-4.9-2016.02-x86_64_aarch64-linux-gnu
Jenkinsc3f34a42018-03-02 12:38:09 +000031 - Android armv7a: clang++ / gnustl NDK r16b
32 - Android am64-v8a: clang++ / gnustl NDK r16b
Anthony Barbier8140e1e2017-12-14 23:48:46 +000033
34@warning Make sure to use a compatible toolchain to build your application or you will get some std::bad_alloc errors at runtime.
35
Anthony Barbierdbdab852017-06-23 15:42:00 +010036@section S1_file_organisation File organisation
37
38This archive contains:
39 - The arm_compute header and source files
40 - The latest Khronos OpenCL 1.2 C headers from the <a href="https://www.khronos.org/registry/cl/">Khronos OpenCL registry</a>
41 - The latest Khronos cl2.hpp from the <a href="https://www.khronos.org/registry/cl/">Khronos OpenCL registry</a> (API version 2.1 when this document was written)
Anthony Barbier8140e1e2017-12-14 23:48:46 +000042 - The latest Khronos OpenGL ES 3.1 C headers from the <a href="https://www.khronos.org/registry/gles/">Khronos OpenGL ES registry</a>
43 - The latest Khronos EGL 1.5 C headers from the <a href="https://www.khronos.org/registry/gles/">Khronos EGL registry</a>
44 - The sources for a stub version of libOpenCL.so, libGLESv1_CM.so, libGLESv2.so and libEGL.so to help you build your application.
Anthony Barbierdbdab852017-06-23 15:42:00 +010045 - An examples folder containing a few examples to compile and link against the library.
46 - A @ref utils folder containing headers with some boiler plate code used by the examples.
47 - This documentation.
48
49You should have the following file organisation:
50
51 .
52 ├── arm_compute --> All the arm_compute headers
53 │   ├── core
54 │   │   ├── CL
Kaizen8938bd32017-09-28 14:38:23 +010055 │   │   │   ├── CLKernelLibrary.h --> Manages all the OpenCL kernels compilation and caching, provides accessors for the OpenCL Context.
Anthony Barbierdbdab852017-06-23 15:42:00 +010056 │   │   │   ├── CLKernels.h --> Includes all the OpenCL kernels at once
57 │   │   │   ├── CL specialisation of all the generic objects interfaces (ICLTensor, ICLImage, etc.)
58 │   │   │   ├── kernels --> Folder containing all the OpenCL kernels
59 │   │   │   │   └── CL*Kernel.h
60 │   │   │   └── OpenCL.h --> Wrapper to configure the Khronos OpenCL C++ header
61 │   │ ├── CPP
Kaizen8938bd32017-09-28 14:38:23 +010062 │   │   │   ├── CPPKernels.h --> Includes all the CPP kernels at once
Anthony Barbierdbdab852017-06-23 15:42:00 +010063 │   │ │   └── kernels --> Folder containing all the CPP kernels
Kaizen8938bd32017-09-28 14:38:23 +010064 │   │   │      └── CPP*Kernel.h
Anthony Barbier8140e1e2017-12-14 23:48:46 +000065 │   │   ├── GLES_COMPUTE
66 │   │   │   ├── GCKernelLibrary.h --> Manages all the GLES kernels compilation and caching, provides accessors for the GLES Context.
67 │   │   │   ├── GCKernels.h --> Includes all the GLES kernels at once
68 │   │   │   ├── GLES specialisation of all the generic objects interfaces (IGCTensor, IGCImage, etc.)
69 │   │   │   ├── kernels --> Folder containing all the GLES kernels
70 │   │   │   │   └── GC*Kernel.h
71 │   │   │   └── OpenGLES.h --> Wrapper to configure the Khronos EGL and OpenGL ES C header
Anthony Barbierdbdab852017-06-23 15:42:00 +010072 │   │   ├── NEON
73 │   │   │   ├── kernels --> Folder containing all the NEON kernels
Kaizen8938bd32017-09-28 14:38:23 +010074 │   │   │   │ ├── arm64 --> Folder containing the interfaces for the assembly arm64 NEON kernels
75 │   │   │   │ ├── arm32 --> Folder containing the interfaces for the assembly arm32 NEON kernels
76 │   │   │   │ ├── assembly --> Folder containing the NEON assembly routines.
Anthony Barbierdbdab852017-06-23 15:42:00 +010077 │   │   │   │   └── NE*Kernel.h
78 │   │   │   └── NEKernels.h --> Includes all the NEON kernels at once
79 │   │   ├── All common basic types (Types.h, Window, Coordinates, Iterator, etc.)
80 │   │   ├── All generic objects interfaces (ITensor, IImage, etc.)
81 │   │   └── Objects metadata classes (ImageInfo, TensorInfo, MultiImageInfo)
Kaizen8938bd32017-09-28 14:38:23 +010082 │   ├── graph
83 │   │   ├── CL --> OpenCL specific operations
84 │   │   │   └── CLMap.h / CLUnmap.h
85 │   │   ├── nodes
86 │   │   │   └── The various nodes supported by the graph API
87 │   │   ├── Nodes.h --> Includes all the Graph nodes at once.
88 │   │   └── Graph objects ( INode, ITensorAccessor, Graph, etc.)
Anthony Barbierdbdab852017-06-23 15:42:00 +010089 │   └── runtime
90 │   ├── CL
91 │   │   ├── CL objects & allocators (CLArray, CLImage, CLTensor, etc.)
92 │   │   ├── functions --> Folder containing all the OpenCL functions
93 │   │   │   └── CL*.h
Kaizen8938bd32017-09-28 14:38:23 +010094 │   │   ├── CLScheduler.h --> Interface to enqueue OpenCL kernels and get/set the OpenCL CommandQueue and ICLTuner.
Anthony Barbierdbdab852017-06-23 15:42:00 +010095 │   │   └── CLFunctions.h --> Includes all the OpenCL functions at once
96 │   ├── CPP
Kaizen8938bd32017-09-28 14:38:23 +010097 │      │   ├── CPPKernels.h --> Includes all the CPP functions at once.
98 │   │   └── CPPScheduler.h --> Basic pool of threads to execute CPP/NEON code on several cores in parallel
Anthony Barbier8140e1e2017-12-14 23:48:46 +000099 │   ├── GLES_COMPUTE
100 │   │   ├── GLES objects & allocators (GCArray, GCImage, GCTensor, etc.)
101 │   │   ├── functions --> Folder containing all the GLES functions
102 │   │   │   └── GC*.h
103 │   │   ├── GCScheduler.h --> Interface to enqueue GLES kernels and get/set the GLES CommandQueue.
104 │   │   └── GCFunctions.h --> Includes all the GLES functions at once
Anthony Barbierdbdab852017-06-23 15:42:00 +0100105 │   ├── NEON
106 │   │ ├── functions --> Folder containing all the NEON functions
107 │   │ │   └── NE*.h
108 │   │ └── NEFunctions.h --> Includes all the NEON functions at once
Kaizen8938bd32017-09-28 14:38:23 +0100109 │   ├── OMP
110 │   │   └── OMPScheduler.h --> OpenMP scheduler (Alternative to the CPPScheduler)
111 │ ├── Memory manager files (LifetimeManager, PoolManager, etc.)
Anthony Barbierdbdab852017-06-23 15:42:00 +0100112 │   └── Basic implementations of the generic object interfaces (Array, Image, Tensor, etc.)
Jenkinsc3f34a42018-03-02 12:38:09 +0000113 ├── data -> Contains test images and reference data dumps used by validation tests
114 ├── docs -> Contains Doxyfile and Doxygen sources used to generate the HTML pages in the documentation folder.
Anthony Barbierdbdab852017-06-23 15:42:00 +0100115 ├── documentation
116 │   ├── index.xhtml
117 │   └── ...
118 ├── documentation.xhtml -> documentation/index.xhtml
119 ├── examples
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000120 │   ├── cl_*.cpp --> OpenCL examples
121 │   ├── gc_*.cpp --> GLES compute shaders examples
122 │   ├── graph_*.cpp --> Graph examples
123 │   ├── neoncl_*.cpp --> NEON / OpenCL interoperability examples
124 │   └── neon_*.cpp --> NEON examples
Anthony Barbierdbdab852017-06-23 15:42:00 +0100125 ├── include
Kaizen8938bd32017-09-28 14:38:23 +0100126 │   ├── CL
127 │   │ └── Khronos OpenCL C headers and C++ wrapper
128 │   ├── half --> FP16 library available from http://half.sourceforge.net
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000129 │   ├── libnpy --> Library to load / write npy buffers, available from https://github.com/llohse/libnpy
130 │  └── linux --> Headers only needed for Linux builds
131 │   └── Khronos EGL and OpenGLES headers
Anthony Barbierdbdab852017-06-23 15:42:00 +0100132 ├── opencl-1.2-stubs
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000133 │ └── opencl_stubs.c --> OpenCL stubs implementation
134 ├── opengles-3.1-stubs
135 │   ├── EGL.c --> EGL stubs implementation
136 │   └── GLESv2.c --> GLESv2 stubs implementation
Kaizen8938bd32017-09-28 14:38:23 +0100137 ├── scripts
138 │   ├── caffe_data_extractor.py --> Basic script to export weights from Caffe to npy files
139 │   └── tensorflow_data_extractor.py --> Basic script to export weights from Tensor Flow to npy files
Anthony Barbierdbdab852017-06-23 15:42:00 +0100140 ├── src
141 │   ├── core
142 │ │ └── ... (Same structure as headers)
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000143 │   │ ├── CL
144 │   │ │ └── cl_kernels --> All the OpenCL kernels
145 │   │ └── GLES_COMPUTE
146 │   │ └── cs_shaders --> All the OpenGL ES Compute Shaders
Kaizen8938bd32017-09-28 14:38:23 +0100147 │   ├── graph
148 │ │ └── ... (Same structure as headers)
Anthony Barbierdbdab852017-06-23 15:42:00 +0100149 │ └── runtime
150 │ └── ... (Same structure as headers)
Kaizen8938bd32017-09-28 14:38:23 +0100151 ├── support
152 │ └── Various headers to work around toolchains / platform issues.
Anthony Barbierdbdab852017-06-23 15:42:00 +0100153 ├── tests
154 │   ├── All test related files shared between validation and benchmark
Kaizen8938bd32017-09-28 14:38:23 +0100155 │   ├── CL --> OpenCL accessors
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000156 │   ├── GLES_COMPUTE --> GLES accessors
Kaizen8938bd32017-09-28 14:38:23 +0100157 │   ├── NEON --> NEON accessors
Anthony Barbierdbdab852017-06-23 15:42:00 +0100158 │   ├── benchmark --> Sources for benchmarking
159 │ │ ├── Benchmark specific files
Anthony Barbierdbdab852017-06-23 15:42:00 +0100160 │ │ ├── CL --> OpenCL benchmarking tests
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000161 │ │ ├── GLES_COMPUTE --> GLES benchmarking tests
Jenkinsc3f34a42018-03-02 12:38:09 +0000162 │   │ ├── fixtures
163 │ │ │ └── Fixtures to initialise and run the runtime Functions.
Anthony Barbierdbdab852017-06-23 15:42:00 +0100164 │ │ └── NEON --> NEON benchmarking tests
Kaizen8938bd32017-09-28 14:38:23 +0100165 │   ├── datasets
166 │ │ └── Datasets for all the validation / benchmark tests, layer configurations for various networks, etc.
167 │   ├── framework
168 │ │ └── Boiler plate code for both validation and benchmark test suites (Command line parsers, instruments, output loggers, etc.)
169 │   ├── networks
170 │ │ └── Examples of how to instantiate networks.
Anthony Barbierdbdab852017-06-23 15:42:00 +0100171 │   ├── validation --> Sources for validation
172 │ │ ├── Validation specific files
Anthony Barbierdbdab852017-06-23 15:42:00 +0100173 │ │ ├── CL --> OpenCL validation tests
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000174 │ │ ├── GLES_COMPUTE --> GLES validation tests
Kaizen8938bd32017-09-28 14:38:23 +0100175 │ │ ├── CPP --> C++ reference implementations
176 │   │ ├── fixtures
177 │ │ │ └── Fixtures to initialise and run the runtime Functions.
178 │ │ └── NEON --> NEON validation tests
Anthony Barbierdbdab852017-06-23 15:42:00 +0100179 │   └── dataset --> Datasets defining common sets of input parameters
180 └── utils --> Boiler plate code used by examples
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000181 └── Various utilities to print types, load / store assets, etc.
Anthony Barbierdbdab852017-06-23 15:42:00 +0100182
183@section S2_versions_changelog Release versions and changelog
184
185@subsection S2_1_versions Release versions
186
187All releases are numbered vYY.MM Where YY are the last two digits of the year, and MM the month number.
188If there is more than one release in a month then an extra sequential number is appended at the end:
189
190 v17.03 (First release of March 2017)
191 v17.03.1 (Second release of March 2017)
192 v17.04 (First release of April 2017)
193
194@note We're aiming at releasing one major public release with new features per quarter. All releases in between will only contain bug fixes.
195
196@subsection S2_2_changelog Changelog
197
Jenkinsc3f34a42018-03-02 12:38:09 +0000198v18.03 Public maintenance release
199 - Various bug fixes.
200 - Fixed bug in @ref NEActivationLayer
201 - Fix in @ref CLTuner when using batches.
202 - Updated recommended NDK version to r16b (And fixed warnings).
203 - Fixed bug in validation code.
204 - Added Inception v4 graph example.
205
Anthony Barbier06ea0482018-02-22 15:45:35 +0000206v18.02 Public major release
207 - Various NEON / OpenCL / GLES optimisations.
208 - Various bug fixes.
209 - Changed default number of threads on big LITTLE systems.
210 - Refactored examples and added:
211 - graph_mobilenet_qassym8
212 - graph_resnet
213 - graph_squeezenet_v1_1
Jenkinsc3f34a42018-03-02 12:38:09 +0000214 - Renamed @ref CLConvolutionLayer into @ref CLGEMMConvolutionLayer and created a new @ref CLConvolutionLayer to select the fastest convolution method.
215 - Renamed @ref NEConvolutionLayer into @ref NEGEMMConvolutionLayer and created a new @ref NEConvolutionLayer to select the fastest convolution method.
Anthony Barbier06ea0482018-02-22 15:45:35 +0000216 - Added in place support to:
Jenkinsc3f34a42018-03-02 12:38:09 +0000217 - @ref CLActivationLayer
218 - @ref CLBatchNormalizationLayer
Anthony Barbier06ea0482018-02-22 15:45:35 +0000219 - Added QASYMM8 support to:
Jenkinsc3f34a42018-03-02 12:38:09 +0000220 - @ref CLActivationLayer
221 - @ref CLDepthwiseConvolutionLayer
222 - @ref NEDepthwiseConvolutionLayer
223 - @ref NESoftmaxLayer
Anthony Barbier06ea0482018-02-22 15:45:35 +0000224 - Added FP16 support to:
Jenkinsc3f34a42018-03-02 12:38:09 +0000225 - @ref CLDepthwiseConvolutionLayer3x3
226 - @ref CLDepthwiseConvolutionLayer
227 - Added broadcasting support to @ref NEArithmeticAddition / @ref CLArithmeticAddition / @ref CLPixelWiseMultiplication
228 - Added fused batched normalization and activation to @ref CLBatchNormalizationLayer and @ref NEBatchNormalizationLayer
229 - Added support for non-square pooling to @ref NEPoolingLayer and @ref CLPoolingLayer
Anthony Barbier06ea0482018-02-22 15:45:35 +0000230 - New OpenCL kernels / functions:
Jenkinsc3f34a42018-03-02 12:38:09 +0000231 - @ref CLDirectConvolutionLayerOutputStageKernel
Anthony Barbier06ea0482018-02-22 15:45:35 +0000232 - New NEON kernels / functions
233 - Added name() method to all kernels.
234 - Added support for Winograd 5x5.
Jenkinsc3f34a42018-03-02 12:38:09 +0000235 - @ref NEPermuteKernel / @ref NEPermute
236 - @ref NEWinogradLayerTransformInputKernel / @ref NEWinogradLayer
237 - @ref NEWinogradLayerTransformOutputKernel / @ref NEWinogradLayer
238 - @ref NEWinogradLayerTransformWeightsKernel / @ref NEWinogradLayer
239 - Renamed NEWinogradLayerKernel into @ref NEWinogradLayerBatchedGEMMKernel
Anthony Barbier06ea0482018-02-22 15:45:35 +0000240 - New GLES kernels / functions:
Jenkinsc3f34a42018-03-02 12:38:09 +0000241 - @ref GCTensorShiftKernel / @ref GCTensorShift
Anthony Barbier06ea0482018-02-22 15:45:35 +0000242
Anthony Barbierf45d5a92018-01-24 16:23:15 +0000243v18.01 Public maintenance release
244 - Various bug fixes
245 - Added some of the missing validate() methods
Jenkinsc3f34a42018-03-02 12:38:09 +0000246 - Added @ref CLDeconvolutionLayerUpsampleKernel / @ref CLDeconvolutionLayer @ref CLDeconvolutionLayerUpsample
247 - Added @ref CLPermuteKernel / @ref CLPermute
Anthony Barbierf45d5a92018-01-24 16:23:15 +0000248 - Added method to clean the programs cache in the CL Kernel library.
Jenkinsc3f34a42018-03-02 12:38:09 +0000249 - Added @ref GCArithmeticAdditionKernel / @ref GCArithmeticAddition
250 - Added @ref GCDepthwiseConvolutionLayer3x3Kernel / @ref GCDepthwiseConvolutionLayer3x3
251 - Added @ref GCNormalizePlanarYUVLayerKernel / @ref GCNormalizePlanarYUVLayer
252 - Added @ref GCScaleKernel / @ref GCScale
253 - Added @ref GCWeightsReshapeKernel / @ref GCConvolutionLayer
Anthony Barbierf45d5a92018-01-24 16:23:15 +0000254 - Added FP16 support to the following GLES compute kernels:
Jenkinsc3f34a42018-03-02 12:38:09 +0000255 - @ref GCCol2ImKernel
256 - @ref GCGEMMInterleave4x4Kernel
257 - @ref GCGEMMTranspose1xWKernel
258 - @ref GCIm2ColKernel
259 - Refactored NEON Winograd (NEWinogradLayerKernel)
260 - Added @ref NEDirectConvolutionLayerOutputStageKernel
Anthony Barbierf45d5a92018-01-24 16:23:15 +0000261 - Added QASYMM8 support to the following NEON kernels:
Jenkinsc3f34a42018-03-02 12:38:09 +0000262 - @ref NEDepthwiseConvolutionLayer3x3Kernel
263 - @ref NEFillBorderKernel
264 - @ref NEPoolingLayerKernel
Anthony Barbierf45d5a92018-01-24 16:23:15 +0000265 - Added new examples:
266 - graph_cl_mobilenet_qasymm8.cpp
267 - graph_inception_v3.cpp
268 - gc_dc.cpp
269 - More tests added to both validation and benchmarking suites.
270
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000271v17.12 Public major release
272 - Most machine learning functions on OpenCL support the new data type QASYMM8
273 - Introduced logging interface
274 - Introduced opencl timer
275 - Reworked GEMMLowp interface
276 - Added new NEON assembly kernels for GEMMLowp, SGEMM and HGEMM
277 - Added validation method for most Machine Learning kernels / functions
278 - Added new graph examples such as googlenet, mobilenet, squeezenet, vgg16 and vgg19
279 - Added sgemm example for OpenCL
280 - Added absolute difference example for GLES compute
281 - Added new tests and benchmarks in validation and benchmark frameworks
282 - Added new kernels / functions for GLES compute
283
284 - New OpenGL ES kernels / functions
Jenkinsc3f34a42018-03-02 12:38:09 +0000285 - @ref GCAbsoluteDifferenceKernel / @ref GCAbsoluteDifference
286 - @ref GCActivationLayerKernel / @ref GCActivationLayer
287 - @ref GCBatchNormalizationLayerKernel / @ref GCBatchNormalizationLayer
288 - @ref GCCol2ImKernel
289 - @ref GCDepthConcatenateLayerKernel / @ref GCDepthConcatenateLayer
290 - @ref GCDirectConvolutionLayerKernel / @ref GCDirectConvolutionLayer
291 - @ref GCDropoutLayerKernel / @ref GCDropoutLayer
292 - @ref GCFillBorderKernel / @ref GCFillBorder
293 - @ref GCGEMMInterleave4x4Kernel / @ref GCGEMMInterleave4x4
294 - @ref GCGEMMMatrixAccumulateBiasesKernel / @ref GCGEMMMatrixAdditionKernel / @ref GCGEMMMatrixMultiplyKernel / @ref GCGEMM
295 - @ref GCGEMMTranspose1xWKernel / @ref GCGEMMTranspose1xW
296 - @ref GCIm2ColKernel
297 - @ref GCNormalizationLayerKernel / @ref GCNormalizationLayer
298 - @ref GCPixelWiseMultiplicationKernel / @ref GCPixelWiseMultiplication
299 - @ref GCPoolingLayerKernel / @ref GCPoolingLayer
300 - @ref GCLogits1DMaxKernel / @ref GCLogits1DShiftExpSumKernel / @ref GCLogits1DNormKernel / @ref GCSoftmaxLayer
301 - @ref GCTransposeKernel / @ref GCTranspose
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000302
303 - New NEON kernels / functions
Jenkinsc3f34a42018-03-02 12:38:09 +0000304 - @ref NEGEMMLowpAArch64A53Kernel / @ref NEGEMMLowpAArch64Kernel / @ref NEGEMMLowpAArch64V8P4Kernel / NEGEMMInterleavedBlockedKernel / @ref NEGEMMLowpAssemblyMatrixMultiplyCore
305 - @ref NEHGEMMAArch64FP16Kernel
306 - @ref NEDepthwiseConvolutionLayer3x3Kernel / @ref NEDepthwiseIm2ColKernel / @ref NEGEMMMatrixVectorMultiplyKernel / @ref NEDepthwiseVectorToTensorKernel / @ref NEDepthwiseConvolutionLayer
307 - @ref NEGEMMLowpOffsetContributionKernel / @ref NEGEMMLowpMatrixAReductionKernel / @ref NEGEMMLowpMatrixBReductionKernel / @ref NEGEMMLowpMatrixMultiplyCore
308 - @ref NEGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPointKernel / @ref NEGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPoint
309 - @ref NEGEMMLowpQuantizeDownInt32ToUint8ScaleKernel / @ref NEGEMMLowpQuantizeDownInt32ToUint8Scale
310 - @ref NEWinogradLayer / NEWinogradLayerKernel
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000311
312 - New OpenCL kernels / functions
Jenkinsc3f34a42018-03-02 12:38:09 +0000313 - @ref CLGEMMLowpOffsetContributionKernel / @ref CLGEMMLowpMatrixAReductionKernel / @ref CLGEMMLowpMatrixBReductionKernel / @ref CLGEMMLowpMatrixMultiplyCore
314 - @ref CLGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPointKernel / @ref CLGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPoint
315 - @ref CLGEMMLowpQuantizeDownInt32ToUint8ScaleKernel / @ref CLGEMMLowpQuantizeDownInt32ToUint8Scale
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000316
317 - New graph nodes for NEON and OpenCL
Jenkinsc3f34a42018-03-02 12:38:09 +0000318 - @ref graph::BranchLayer
319 - @ref graph::DepthConvertLayer
320 - @ref graph::DepthwiseConvolutionLayer
321 - @ref graph::DequantizationLayer
322 - @ref graph::FlattenLayer
323 - @ref graph::QuantizationLayer
324 - @ref graph::ReshapeLayer
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000325
Kaizenbf8b01d2017-10-12 14:26:51 +0100326v17.10 Public maintenance release
327 - Bug fixes:
328 - Check the maximum local workgroup size supported by OpenCL devices
329 - Minor documentation updates (Fixed instructions to build the examples)
Jenkinsc3f34a42018-03-02 12:38:09 +0000330 - Introduced a graph::GraphContext
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000331 - Added a few new Graph nodes, support for branches and grouping.
Kaizenbf8b01d2017-10-12 14:26:51 +0100332 - Automatically enable cl_printf in debug builds
333 - Fixed bare metal builds for armv7a
334 - Added AlexNet and cartoon effect examples
335 - Fixed library builds: libraries are no longer built as supersets of each other.(It means application using the Runtime part of the library now need to link against both libarm_compute_core and libarm_compute)
336
Kaizen8938bd32017-09-28 14:38:23 +0100337v17.09 Public major release
338 - Experimental Graph support: initial implementation of a simple stream API to easily chain machine learning layers.
Jenkinsc3f34a42018-03-02 12:38:09 +0000339 - Memory Manager (@ref BlobLifetimeManager, @ref BlobMemoryPool, @ref ILifetimeManager, @ref IMemoryGroup, @ref IMemoryManager, @ref IMemoryPool, @ref IPoolManager, @ref MemoryManagerOnDemand, @ref PoolManager)
Kaizen8938bd32017-09-28 14:38:23 +0100340 - New validation and benchmark frameworks (Boost and Google frameworks replaced by homemade framework).
341 - Most machine learning functions support both fixed point 8 and 16 bit (QS8, QS16) for both NEON and OpenCL.
342 - New NEON kernels / functions:
Jenkinsc3f34a42018-03-02 12:38:09 +0000343 - @ref NEGEMMAssemblyBaseKernel @ref NEGEMMAArch64Kernel
344 - @ref NEDequantizationLayerKernel / @ref NEDequantizationLayer
345 - @ref NEFloorKernel / @ref NEFloor
346 - @ref NEL2NormalizeLayerKernel / @ref NEL2NormalizeLayer
347 - @ref NEQuantizationLayerKernel @ref NEMinMaxLayerKernel / @ref NEQuantizationLayer
348 - @ref NEROIPoolingLayerKernel / @ref NEROIPoolingLayer
349 - @ref NEReductionOperationKernel / @ref NEReductionOperation
350 - @ref NEReshapeLayerKernel / @ref NEReshapeLayer
Kaizen8938bd32017-09-28 14:38:23 +0100351
352 - New OpenCL kernels / functions:
Jenkinsc3f34a42018-03-02 12:38:09 +0000353 - @ref CLDepthwiseConvolutionLayer3x3Kernel @ref CLDepthwiseIm2ColKernel @ref CLDepthwiseVectorToTensorKernel @ref CLDepthwiseWeightsReshapeKernel / @ref CLDepthwiseConvolutionLayer3x3 @ref CLDepthwiseConvolutionLayer @ref CLDepthwiseSeparableConvolutionLayer
354 - @ref CLDequantizationLayerKernel / @ref CLDequantizationLayer
355 - @ref CLDirectConvolutionLayerKernel / @ref CLDirectConvolutionLayer
356 - @ref CLFlattenLayer
357 - @ref CLFloorKernel / @ref CLFloor
358 - @ref CLGEMMTranspose1xW
359 - @ref CLGEMMMatrixVectorMultiplyKernel
360 - @ref CLL2NormalizeLayerKernel / @ref CLL2NormalizeLayer
361 - @ref CLQuantizationLayerKernel @ref CLMinMaxLayerKernel / @ref CLQuantizationLayer
362 - @ref CLROIPoolingLayerKernel / @ref CLROIPoolingLayer
363 - @ref CLReductionOperationKernel / @ref CLReductionOperation
364 - @ref CLReshapeLayerKernel / @ref CLReshapeLayer
Kaizen8938bd32017-09-28 14:38:23 +0100365
Anthony Barbierdbdab852017-06-23 15:42:00 +0100366v17.06 Public major release
367 - Various bug fixes
368 - Added support for fixed point 8 bit (QS8) to the various NEON machine learning kernels.
369 - Added unit tests and benchmarks (AlexNet, LeNet)
370 - Added support for sub tensors.
371 - Added infrastructure to provide GPU specific optimisation for some OpenCL kernels.
Jenkinsc3f34a42018-03-02 12:38:09 +0000372 - Added @ref OMPScheduler (OpenMP) scheduler for NEON
373 - Added @ref SingleThreadScheduler scheduler for NEON (For bare metal)
374 - User can specify his own scheduler by implementing the @ref IScheduler interface.
Anthony Barbierdbdab852017-06-23 15:42:00 +0100375 - New OpenCL kernels / functions:
Jenkinsc3f34a42018-03-02 12:38:09 +0000376 - @ref CLBatchNormalizationLayerKernel / @ref CLBatchNormalizationLayer
377 - @ref CLDepthConcatenateLayerKernel / @ref CLDepthConcatenateLayer
378 - @ref CLHOGOrientationBinningKernel @ref CLHOGBlockNormalizationKernel, @ref CLHOGDetectorKernel / @ref CLHOGDescriptor @ref CLHOGDetector @ref CLHOGGradient @ref CLHOGMultiDetection
379 - @ref CLLocallyConnectedMatrixMultiplyKernel / @ref CLLocallyConnectedLayer
380 - @ref CLWeightsReshapeKernel / @ref CLConvolutionLayerReshapeWeights
Anthony Barbierdbdab852017-06-23 15:42:00 +0100381 - New C++ kernels:
Jenkinsc3f34a42018-03-02 12:38:09 +0000382 - @ref CPPDetectionWindowNonMaximaSuppressionKernel
Anthony Barbierdbdab852017-06-23 15:42:00 +0100383 - New NEON kernels / functions:
Jenkinsc3f34a42018-03-02 12:38:09 +0000384 - @ref NEBatchNormalizationLayerKernel / @ref NEBatchNormalizationLayer
385 - @ref NEDepthConcatenateLayerKernel / @ref NEDepthConcatenateLayer
386 - @ref NEDirectConvolutionLayerKernel / @ref NEDirectConvolutionLayer
387 - @ref NELocallyConnectedMatrixMultiplyKernel / @ref NELocallyConnectedLayer
388 - @ref NEWeightsReshapeKernel / @ref NEConvolutionLayerReshapeWeights
Anthony Barbierdbdab852017-06-23 15:42:00 +0100389
390v17.05 Public bug fixes release
391 - Various bug fixes
392 - Remaining of the functions ported to use accurate padding.
393 - Library does not link against OpenCL anymore (It uses dlopen / dlsym at runtime instead to determine whether or not OpenCL is available).
394 - Added "free" method to allocator.
395 - Minimum version of g++ required for armv7 Linux changed from 4.8 to 4.9
396
397v17.04 Public bug fixes release
398
399 The following functions have been ported to use the new accurate padding:
Jenkinsc3f34a42018-03-02 12:38:09 +0000400 - @ref CLColorConvertKernel
401 - @ref CLEdgeNonMaxSuppressionKernel
402 - @ref CLEdgeTraceKernel
403 - @ref CLGaussianPyramidHorKernel
404 - @ref CLGaussianPyramidVertKernel
405 - @ref CLGradientKernel
406 - @ref NEChannelCombineKernel
407 - @ref NEFillArrayKernel
408 - @ref NEGaussianPyramidHorKernel
409 - @ref NEGaussianPyramidVertKernel
410 - @ref NEHarrisScoreFP16Kernel
411 - @ref NEHarrisScoreKernel
412 - @ref NEHOGDetectorKernel
413 - @ref NELogits1DMaxKernel
414 - NELogits1DShiftExpSumKernel
415 - NELogits1DNormKernel
416 - @ref NENonMaximaSuppression3x3FP16Kernel
417 - @ref NENonMaximaSuppression3x3Kernel
Anthony Barbierdbdab852017-06-23 15:42:00 +0100418
Anthony Barbierdbdab852017-06-23 15:42:00 +0100419v17.03.1 First Major public release of the sources
420 - Renamed the library to arm_compute
421 - New CPP target introduced for C++ kernels shared between NEON and CL functions.
422 - New padding calculation interface introduced and ported most kernels / functions to use it.
423 - New OpenCL kernels / functions:
Jenkinsc3f34a42018-03-02 12:38:09 +0000424 - @ref CLGEMMLowpMatrixMultiplyKernel / CLGEMMLowp
Anthony Barbierdbdab852017-06-23 15:42:00 +0100425 - New NEON kernels / functions:
Jenkinsc3f34a42018-03-02 12:38:09 +0000426 - @ref NENormalizationLayerKernel / @ref NENormalizationLayer
427 - @ref NETransposeKernel / @ref NETranspose
428 - @ref NELogits1DMaxKernel, NELogits1DShiftExpSumKernel, NELogits1DNormKernel / @ref NESoftmaxLayer
429 - @ref NEIm2ColKernel, @ref NECol2ImKernel, NEConvolutionLayerWeightsReshapeKernel / @ref NEConvolutionLayer
430 - @ref NEGEMMMatrixAccumulateBiasesKernel / @ref NEFullyConnectedLayer
431 - @ref NEGEMMLowpMatrixMultiplyKernel / NEGEMMLowp
Anthony Barbierdbdab852017-06-23 15:42:00 +0100432
433v17.03 Sources preview
434 - New OpenCL kernels / functions:
Jenkinsc3f34a42018-03-02 12:38:09 +0000435 - @ref CLGradientKernel, @ref CLEdgeNonMaxSuppressionKernel, @ref CLEdgeTraceKernel / @ref CLCannyEdge
436 - GEMM refactoring + FP16 support: @ref CLGEMMInterleave4x4Kernel, @ref CLGEMMTranspose1xWKernel, @ref CLGEMMMatrixMultiplyKernel, @ref CLGEMMMatrixAdditionKernel / @ref CLGEMM
437 - @ref CLGEMMMatrixAccumulateBiasesKernel / @ref CLFullyConnectedLayer
438 - @ref CLTransposeKernel / @ref CLTranspose
439 - @ref CLLKTrackerInitKernel, @ref CLLKTrackerStage0Kernel, @ref CLLKTrackerStage1Kernel, @ref CLLKTrackerFinalizeKernel / @ref CLOpticalFlow
440 - @ref CLNormalizationLayerKernel / @ref CLNormalizationLayer
441 - @ref CLLaplacianPyramid, @ref CLLaplacianReconstruct
Anthony Barbierdbdab852017-06-23 15:42:00 +0100442 - New NEON kernels / functions:
Jenkinsc3f34a42018-03-02 12:38:09 +0000443 - @ref NEActivationLayerKernel / @ref NEActivationLayer
444 - GEMM refactoring + FP16 support (Requires armv8.2 CPU): @ref NEGEMMInterleave4x4Kernel, @ref NEGEMMTranspose1xWKernel, @ref NEGEMMMatrixMultiplyKernel, @ref NEGEMMMatrixAdditionKernel / @ref NEGEMM
445 - @ref NEPoolingLayerKernel / @ref NEPoolingLayer
Anthony Barbierdbdab852017-06-23 15:42:00 +0100446
447v17.02.1 Sources preview
448 - New OpenCL kernels / functions:
Jenkinsc3f34a42018-03-02 12:38:09 +0000449 - @ref CLLogits1DMaxKernel, @ref CLLogits1DShiftExpSumKernel, @ref CLLogits1DNormKernel / @ref CLSoftmaxLayer
450 - @ref CLPoolingLayerKernel / @ref CLPoolingLayer
451 - @ref CLIm2ColKernel, @ref CLCol2ImKernel, CLConvolutionLayerWeightsReshapeKernel / @ref CLConvolutionLayer
452 - @ref CLRemapKernel / @ref CLRemap
453 - @ref CLGaussianPyramidHorKernel, @ref CLGaussianPyramidVertKernel / @ref CLGaussianPyramid, @ref CLGaussianPyramidHalf, @ref CLGaussianPyramidOrb
454 - @ref CLMinMaxKernel, @ref CLMinMaxLocationKernel / @ref CLMinMaxLocation
455 - @ref CLNonLinearFilterKernel / @ref CLNonLinearFilter
Anthony Barbierdbdab852017-06-23 15:42:00 +0100456 - New NEON FP16 kernels (Requires armv8.2 CPU)
Jenkinsc3f34a42018-03-02 12:38:09 +0000457 - @ref NEAccumulateWeightedFP16Kernel
458 - @ref NEBox3x3FP16Kernel
459 - @ref NENonMaximaSuppression3x3FP16Kernel
Anthony Barbierdbdab852017-06-23 15:42:00 +0100460
461v17.02 Sources preview
462 - New OpenCL kernels / functions:
Jenkinsc3f34a42018-03-02 12:38:09 +0000463 - @ref CLActivationLayerKernel / @ref CLActivationLayer
464 - @ref CLChannelCombineKernel / @ref CLChannelCombine
465 - @ref CLDerivativeKernel / @ref CLChannelExtract
466 - @ref CLFastCornersKernel / @ref CLFastCorners
467 - @ref CLMeanStdDevKernel / @ref CLMeanStdDev
Anthony Barbierdbdab852017-06-23 15:42:00 +0100468 - New NEON kernels / functions:
Jenkinsc3f34a42018-03-02 12:38:09 +0000469 - HOG / SVM: @ref NEHOGOrientationBinningKernel, @ref NEHOGBlockNormalizationKernel, @ref NEHOGDetectorKernel, NEHOGNonMaximaSuppressionKernel / @ref NEHOGDescriptor, @ref NEHOGDetector, @ref NEHOGGradient, @ref NEHOGMultiDetection
470 - @ref NENonLinearFilterKernel / @ref NENonLinearFilter
Anthony Barbierdbdab852017-06-23 15:42:00 +0100471 - Introduced a CLScheduler to manage the default context and command queue used by the runtime library and create synchronisation events.
472 - Switched all the kernels / functions to use tensors instead of images.
473 - Updated documentation to include instructions to build the library from sources.
474
475v16.12 Binary preview release
476 - Original release
477
478@section S3_how_to_build How to build the library and the examples
479
480@subsection S3_1_build_options Build options
481
482scons 2.3 or above is required to build the library.
483To see the build options available simply run ```scons -h```:
484
485 debug: Debug (yes|no)
486 default: False
487 actual: False
488
489 asserts: Enable asserts (this flag is forced to 1 for debug=1) (yes|no)
490 default: False
491 actual: False
492
493 arch: Target Architecture (armv7a|arm64-v8a|arm64-v8.2-a|x86_32|x86_64)
494 default: armv7a
495 actual: armv7a
496
497 os: Target OS (linux|android|bare_metal)
498 default: linux
499 actual: linux
500
Anthony Barbier06ea0482018-02-22 15:45:35 +0000501 build: Build type (native|cross_compile|embed_only)
Anthony Barbierdbdab852017-06-23 15:42:00 +0100502 default: cross_compile
503 actual: cross_compile
504
505 examples: Build example programs (yes|no)
506 default: True
507 actual: True
508
509 Werror: Enable/disable the -Werror compilation flag (yes|no)
510 default: True
511 actual: True
512
513 opencl: Enable OpenCL support (yes|no)
514 default: True
515 actual: True
516
517 neon: Enable Neon support (yes|no)
518 default: False
519 actual: False
520
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000521 gles_compute: Enable OpenGL ES Compute Shader support (yes|no)
522 default: False
523 actual: False
524
525 embed_kernels: Embed OpenCL kernels and OpenGL ES compute shader in library binary (yes|no)
Anthony Barbierf45d5a92018-01-24 16:23:15 +0000526 default: True
527 actual: True
Anthony Barbierdbdab852017-06-23 15:42:00 +0100528
529 set_soname: Set the library's soname and shlibversion (requires SCons 2.4 or above) (yes|no)
530 default: False
531 actual: False
532
533 openmp: Enable OpenMP backend (yes|no)
534 default: False
535 actual: False
536
537 cppthreads: Enable C++11 threads backend (yes|no)
538 default: True
539 actual: True
540
541 build_dir: Specify sub-folder for the build ( /path/to/build_dir )
542 default: .
543 actual: .
544
545 extra_cxx_flags: Extra CXX flags to be appended to the build command
546 default:
547 actual:
548
549 pmu: Enable PMU counters (yes|no)
550 default: False
551 actual: False
552
Kaizen8938bd32017-09-28 14:38:23 +0100553 mali: Enable Mali hardware counters (yes|no)
554 default: False
555 actual: False
556
Anthony Barbierdbdab852017-06-23 15:42:00 +0100557 validation_tests: Build validation test programs (yes|no)
558 default: False
559 actual: False
560
561 benchmark_tests: Build benchmark test programs (yes|no)
562 default: False
563 actual: False
564
565@b debug / @b asserts:
566 - With debug=1 asserts are enabled, and the library is built with symbols and no optimisations enabled.
567 - With debug=0 and asserts=1: Optimisations are enabled and symbols are removed, however all the asserts are still present (This is about 20% slower than the release build)
568 - With debug=0 and asserts=0: All optimisations are enable and no validation is performed, if the application misuses the library it is likely to result in a crash. (Only use this mode once you are sure your application is working as expected).
569
570@b arch: The x86_32 and x86_64 targets can only be used with neon=0 and opencl=1.
571
572@b os: Choose the operating system you are targeting: Linux, Android or bare metal.
573@note bare metal can only be used for NEON (not OpenCL), only static libraries get built and NEON's multi-threading support is disabled.
574
575@b build: you can either build directly on your device (native) or cross compile from your desktop machine (cross-compile). In both cases make sure the compiler is available in your path.
576
577@note If you want to natively compile for 32bit on a 64bit ARM device running a 64bit OS then you will have to use cross-compile too.
578
Anthony Barbier06ea0482018-02-22 15:45:35 +0000579There is also an 'embed_only' option which will generate all the .embed files for the OpenCL kernels and / or OpenGLES compute shaders. This might be useful if using a different build system to compile the library.
580
Anthony Barbierdbdab852017-06-23 15:42:00 +0100581@b Werror: If you are compiling using the same toolchains as the ones used in this guide then there shouldn't be any warning and therefore you should be able to keep Werror=1. If with a different compiler version the library fails to build because of warnings interpreted as errors then, if you are sure the warnings are not important, you might want to try to build with Werror=0 (But please do report the issue either on Github or by an email to developer@arm.com so that the issue can be addressed).
582
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000583@b opencl / @b neon / @b gles_compute: Choose which SIMD technology you want to target. (NEON for ARM Cortex-A CPUs or OpenCL / GLES_COMPUTE for ARM Mali GPUs)
Anthony Barbierdbdab852017-06-23 15:42:00 +0100584
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000585@b embed_kernels: For OpenCL / GLES_COMPUTE only: set embed_kernels=1 if you want the OpenCL / GLES_COMPUTE kernels to be built in the library's binaries instead of being read from separate ".cl" / ".cs" files. If embed_kernels is set to 0 then the application can set the path to the folder containing the OpenCL / GLES_COMPUTE kernel files by calling CLKernelLibrary::init() / GCKernelLibrary::init(). By default the path is set to "./cl_kernels" / "./cs_shaders".
Anthony Barbierdbdab852017-06-23 15:42:00 +0100586
587@b set_soname: Do you want to build the versioned version of the library ?
588
589If enabled the library will contain a SONAME and SHLIBVERSION and some symlinks will automatically be created between the objects.
590Example:
591 libarm_compute_core.so -> libarm_compute_core.so.1.0.0
592 libarm_compute_core.so.1 -> libarm_compute_core.so.1.0.0
593 libarm_compute_core.so.1.0.0
594
595@note This options is disabled by default as it requires SCons version 2.4 or above.
596
597@b extra_cxx_flags: Custom CXX flags which will be appended to the end of the build command.
598
599@b build_dir: Build the library in a subfolder of the "build" folder. (Allows to build several configurations in parallel).
600
601@b examples: Build or not the examples
602
603@b validation_tests: Enable the build of the validation suite.
604
Anthony Barbierdbdab852017-06-23 15:42:00 +0100605@b benchmark_tests: Enable the build of the benchmark tests
606
607@b pmu: Enable the PMU cycle counter to measure execution time in benchmark tests. (Your device needs to support it)
608
Kaizen8938bd32017-09-28 14:38:23 +0100609@b mali: Enable the collection of Mali hardware counters to measure execution time in benchmark tests. (Your device needs to have a Mali driver that supports it)
Anthony Barbierdbdab852017-06-23 15:42:00 +0100610
611@b openmp Build in the OpenMP scheduler for NEON.
612
613@note Only works when building with g++ not clang++
614
615@b cppthreads Build in the C++11 scheduler for NEON.
616
Jenkinsc3f34a42018-03-02 12:38:09 +0000617@sa Scheduler::set
Anthony Barbierdbdab852017-06-23 15:42:00 +0100618
Kaizen8938bd32017-09-28 14:38:23 +0100619@subsection S3_2_linux Building for Linux
Anthony Barbierdbdab852017-06-23 15:42:00 +0100620
621@subsubsection S3_2_1_library How to build the library ?
622
623For Linux, the library was successfully built and tested using the following Linaro GCC toolchain:
624
625 - gcc-linaro-arm-linux-gnueabihf-4.9-2014.07_linux
626 - gcc-linaro-4.9-2016.02-x86_64_aarch64-linux-gnu
627 - gcc-linaro-6.3.1-2017.02-i686_aarch64-linux-gnu
628
629@note If you are building with opencl=1 then scons will expect to find libOpenCL.so either in the current directory or in "build" (See the section below if you need a stub OpenCL library to link against)
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000630@note If you are building with gles_compute=1 then scons will expect to find libEGL.so / libGLESv1_CM.so / libGLESv2.so either in the current directory or in "build" (See the section below if you need a stub OpenCL library to link against)
Anthony Barbierdbdab852017-06-23 15:42:00 +0100631
632To cross-compile the library in debug mode, with NEON only support, for Linux 32bit:
633
634 scons Werror=1 -j8 debug=1 neon=1 opencl=0 os=linux arch=armv7a
635
636To cross-compile the library in asserts mode, with OpenCL only support, for Linux 64bit:
637
638 scons Werror=1 -j8 debug=0 asserts=1 neon=0 opencl=1 embed_kernels=1 os=linux arch=arm64-v8a
639
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000640To cross-compile the library in asserts mode, with GLES_COMPUTE only support, for Linux 64bit:
641
642 scons Werror=1 -j8 debug=0 asserts=1 neon=0 opencl=0 gles_compute=1 embed_kernels=1 os=linux arch=arm64-v8a
643
Anthony Barbierdbdab852017-06-23 15:42:00 +0100644You can also compile the library natively on an ARM device by using <b>build=native</b>:
645
646 scons Werror=1 -j8 debug=0 neon=1 opencl=0 os=linux arch=arm64-v8a build=native
647 scons Werror=1 -j8 debug=0 neon=1 opencl=0 os=linux arch=armv7a build=native
648
649@note g++ for ARM is mono-arch, therefore if you want to compile for Linux 32bit on a Linux 64bit platform you will have to use a cross compiler.
650
651For example on a 64bit Debian based system you would have to install <b>g++-arm-linux-gnueabihf</b>
652
653 apt-get install g++-arm-linux-gnueabihf
654
655Then run
656
657 scons Werror=1 -j8 debug=0 neon=1 opencl=0 os=linux arch=armv7a build=cross_compile
658
659or simply remove the build parameter as build=cross_compile is the default value:
660
661 scons Werror=1 -j8 debug=0 neon=1 opencl=0 os=linux arch=armv7a
662
663@attention To cross compile with opencl=1 you need to make sure to have a version of libOpenCL matching your target architecture.
664
665@subsubsection S3_2_2_examples How to manually build the examples ?
666
667The examples get automatically built by scons as part of the build process of the library described above. This section just describes how you can build and link your own application against our library.
668
669@note The following command lines assume the arm_compute and libOpenCL binaries are present in the current directory or in the system library path. If this is not the case you can specify the location of the pre-built library with the compiler option -L. When building the OpenCL example the commands below assume that the CL headers are located in the include folder where the command is executed.
670
671To cross compile a NEON example for Linux 32bit:
672
Kaizenbf8b01d2017-10-12 14:26:51 +0100673 arm-linux-gnueabihf-g++ examples/neon_convolution.cpp utils/Utils.cpp -I. -Iinclude -std=c++11 -mfpu=neon -L. -larm_compute -larm_compute_core -o neon_convolution
Anthony Barbierdbdab852017-06-23 15:42:00 +0100674
675To cross compile a NEON example for Linux 64bit:
676
Kaizenbf8b01d2017-10-12 14:26:51 +0100677 aarch64-linux-gnu-g++ examples/neon_convolution.cpp utils/Utils.cpp -I. -Iinclude -std=c++11 -L. -larm_compute -larm_compute_core -o neon_convolution
Anthony Barbierdbdab852017-06-23 15:42:00 +0100678
679(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)
680
681To cross compile an OpenCL example for Linux 32bit:
682
Kaizenbf8b01d2017-10-12 14:26:51 +0100683 arm-linux-gnueabihf-g++ examples/cl_convolution.cpp utils/Utils.cpp -I. -Iinclude -std=c++11 -mfpu=neon -L. -larm_compute -larm_compute_core -lOpenCL -o cl_convolution -DARM_COMPUTE_CL
Anthony Barbierdbdab852017-06-23 15:42:00 +0100684
685To cross compile an OpenCL example for Linux 64bit:
686
Kaizenbf8b01d2017-10-12 14:26:51 +0100687 aarch64-linux-gnu-g++ examples/cl_convolution.cpp utils/Utils.cpp -I. -Iinclude -std=c++11 -L. -larm_compute -larm_compute_core -lOpenCL -o cl_convolution -DARM_COMPUTE_CL
688
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000689To cross compile a GLES example for Linux 32bit:
690
691 arm-linux-gnueabihf-g++ examples/gc_absdiff.cpp utils/Utils.cpp -I. -Iinclude/ -L. -larm_compute -larm_compute_core -std=c++11 -mfpu=neon -DARM_COMPUTE_GC -Iinclude/linux/ -o gc_absdiff
692
693To cross compile a GLES example for Linux 64bit:
694
695 aarch64-linux-gnu-g++ examples/gc_absdiff.cpp utils/Utils.cpp -I. -Iinclude/ -L. -larm_compute -larm_compute_core -std=c++11 -DARM_COMPUTE_GC -Iinclude/linux/ -o gc_absdiff
696
Kaizenbf8b01d2017-10-12 14:26:51 +0100697(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)
698
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000699To cross compile the examples with the Graph API, such as graph_lenet.cpp, you need to link the examples against arm_compute_graph.so too.
700
701@note The compute library must currently be built with both neon and opencl enabled - neon=1 and opencl=1
Kaizenbf8b01d2017-10-12 14:26:51 +0100702
703i.e. to cross compile the "graph_lenet" example for Linux 32bit:
704
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000705 arm-linux-gnueabihf-g++ examples/graph_lenet.cpp utils/Utils.cpp utils/GraphUtils.cpp -I. -Iinclude -std=c++11 -mfpu=neon -L. -larm_compute_graph -larm_compute -larm_compute_core -Wl,--allow-shlib-undefined -o graph_lenet
Kaizenbf8b01d2017-10-12 14:26:51 +0100706
707i.e. to cross compile the "graph_lenet" example for Linux 64bit:
708
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000709 aarch64-linux-gnu-g++ examples/graph_lenet.cpp utils/Utils.cpp utils/GraphUtils.cpp -I. -Iinclude -std=c++11 -L. -larm_compute_graph -larm_compute -larm_compute_core -Wl,--allow-shlib-undefined -o graph_lenet
Anthony Barbierdbdab852017-06-23 15:42:00 +0100710
711(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)
712
giorgio-arena869d4242017-10-23 16:58:59 +0100713@note If compiling using static libraries, this order must be followed when linking: arm_compute_graph_static, arm_compute, arm_compute_core
714
Anthony Barbierdbdab852017-06-23 15:42:00 +0100715To compile natively (i.e directly on an ARM device) for NEON for Linux 32bit:
716
Kaizenbf8b01d2017-10-12 14:26:51 +0100717 g++ examples/neon_convolution.cpp utils/Utils.cpp -I. -Iinclude -std=c++11 -mfpu=neon -larm_compute -larm_compute_core -o neon_convolution
Anthony Barbierdbdab852017-06-23 15:42:00 +0100718
719To compile natively (i.e directly on an ARM device) for NEON for Linux 64bit:
720
Kaizenbf8b01d2017-10-12 14:26:51 +0100721 g++ examples/neon_convolution.cpp utils/Utils.cpp -I. -Iinclude -std=c++11 -larm_compute -larm_compute_core -o neon_convolution
Anthony Barbierdbdab852017-06-23 15:42:00 +0100722
723(notice the only difference with the 32 bit command is that we don't need the -mfpu option)
724
725To compile natively (i.e directly on an ARM device) for OpenCL for Linux 32bit or Linux 64bit:
726
Kaizenbf8b01d2017-10-12 14:26:51 +0100727 g++ examples/cl_convolution.cpp utils/Utils.cpp -I. -Iinclude -std=c++11 -larm_compute -larm_compute_core -lOpenCL -o cl_convolution -DARM_COMPUTE_CL
Anthony Barbierdbdab852017-06-23 15:42:00 +0100728
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000729To compile natively (i.e directly on an ARM device) for GLES for Linux 32bit or Linux 64bit:
Kaizenbf8b01d2017-10-12 14:26:51 +0100730
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000731 g++ examples/gc_absdiff.cpp utils/Utils.cpp -I. -Iinclude/ -L. -larm_compute -larm_compute_core -std=c++11 -DARM_COMPUTE_GC -Iinclude/linux/ -o gc_absdiff
Kaizenbf8b01d2017-10-12 14:26:51 +0100732
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000733To compile natively the examples with the Graph API, such as graph_lenet.cpp, you need to link the examples against arm_compute_graph.so too.
734@note The compute library must currently be built with both neon and opencl enabled - neon=1 and opencl=1
Kaizenbf8b01d2017-10-12 14:26:51 +0100735
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000736i.e. to natively compile the "graph_lenet" example for Linux 32bit:
Kaizenbf8b01d2017-10-12 14:26:51 +0100737
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000738 g++ examples/graph_lenet.cpp utils/Utils.cpp utils/GraphUtils.cpp -I. -Iinclude -std=c++11 -mfpu=neon -L. -larm_compute_graph -larm_compute -larm_compute_core -Wl,--allow-shlib-undefined -o graph_lenet
739
740i.e. to natively compile the "graph_lenet" example for Linux 64bit:
741
742 g++ examples/graph_lenet.cpp utils/Utils.cpp utils/GraphUtils.cpp -I. -Iinclude -std=c++11 L. -larm_compute_graph -larm_compute -larm_compute_core -Wl,--allow-shlib-undefined -o graph_lenet
Kaizenbf8b01d2017-10-12 14:26:51 +0100743
744(notice the only difference with the 32 bit command is that we don't need the -mfpu option)
Anthony Barbierdbdab852017-06-23 15:42:00 +0100745
giorgio-arena869d4242017-10-23 16:58:59 +0100746@note If compiling using static libraries, this order must be followed when linking: arm_compute_graph_static, arm_compute, arm_compute_core
747
Anthony Barbierdbdab852017-06-23 15:42:00 +0100748@note These two commands assume libarm_compute.so is available in your library path, if not add the path to it using -L
749
750To run the built executable simply run:
751
752 LD_LIBRARY_PATH=build ./neon_convolution
753
754or
755
756 LD_LIBRARY_PATH=build ./cl_convolution
757
Jenkinsc3f34a42018-03-02 12:38:09 +0000758@note Examples accept different types of arguments, to find out what they are run the example without any argument and the help will be displayed at the beginning of the run.
759
760For example:
761 LD_LIBRARY_PATH=. ./graph_lenet
762
763 ./graph_lenet
764
765 Usage: ./graph_lenet [target] [path_to_data] [batches]
766
767 No data folder provided: using random values
768
769 Test passed
770
771In this case the first argument of LeNet (like all the graph examples) is the target (i.e 0 to run on NEON, 1 to run on OpenCL if available, 2 to run on OpenCL using the CLTuner), the second argument is the path to the folder containing the npy files for the weights and finally the third argument is the number of batches to run.
772
Kaizen8938bd32017-09-28 14:38:23 +0100773@subsection S3_3_android Building for Android
Anthony Barbierdbdab852017-06-23 15:42:00 +0100774
775For Android, the library was successfully built and tested using Google's standalone toolchains:
Jenkinsc3f34a42018-03-02 12:38:09 +0000776 - clang++ from NDK r16b for armv7a
777 - clang++ from NDK r16b for arm64-v8a
Anthony Barbierdbdab852017-06-23 15:42:00 +0100778
779Here is a guide to <a href="https://developer.android.com/ndk/guides/standalone_toolchain.html">create your Android standalone toolchains from the NDK</a>
780
Jenkinsc3f34a42018-03-02 12:38:09 +0000781- Download the NDK r16b from here: https://developer.android.com/ndk/downloads/index.html
Anthony Barbierdbdab852017-06-23 15:42:00 +0100782- Make sure you have Python 2 installed on your machine.
783- Generate the 32 and/or 64 toolchains by running the following commands:
784
Jenkinsc3f34a42018-03-02 12:38:09 +0000785 $NDK/build/tools/make_standalone_toolchain.py --arch arm64 --install-dir $MY_TOOLCHAINS/aarch64-linux-android-ndk-r16b --stl gnustl --api 21
786 $NDK/build/tools/make_standalone_toolchain.py --arch arm --install-dir $MY_TOOLCHAINS/arm-linux-android-ndk-r16b --stl gnustl --api 21
Anthony Barbierdbdab852017-06-23 15:42:00 +0100787
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000788@attention Due to some NDK issues make sure you use clang++ & gnustl
Anthony Barbierdbdab852017-06-23 15:42:00 +0100789
790@note Make sure to add the toolchains to your PATH: export PATH=$PATH:$MY_TOOLCHAINS/aarch64-linux-android-4.9/bin:$MY_TOOLCHAINS/arm-linux-androideabi-4.9/bin
791
792@subsubsection S3_3_1_library How to build the library ?
793
794@note If you are building with opencl=1 then scons will expect to find libOpenCL.so either in the current directory or in "build" (See the section below if you need a stub OpenCL library to link against)
795
796To cross-compile the library in debug mode, with NEON only support, for Android 32bit:
797
798 CXX=clang++ CC=clang scons Werror=1 -j8 debug=1 neon=1 opencl=0 os=android arch=armv7a
799
800To cross-compile the library in asserts mode, with OpenCL only support, for Android 64bit:
801
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000802 CXX=clang++ CC=clang scons Werror=1 -j8 debug=0 asserts=1 neon=0 opencl=1 embed_kernels=1 os=android arch=arm64-v8a
803
804To cross-compile the library in asserts mode, with GLES_COMPUTE only support, for Android 64bit:
805
806 CXX=clang++ CC=clang scons Werror=1 -j8 debug=0 asserts=1 neon=0 opencl=0 gles_compute=1 embed_kernels=1 os=android arch=arm64-v8a
Anthony Barbierdbdab852017-06-23 15:42:00 +0100807
808@subsubsection S3_3_2_examples How to manually build the examples ?
809
810The examples get automatically built by scons as part of the build process of the library described above. This section just describes how you can build and link your own application against our library.
811
812@note The following command lines assume the arm_compute and libOpenCL binaries are present in the current directory or in the system library path. If this is not the case you can specify the location of the pre-built library with the compiler option -L. When building the OpenCL example the commands below assume that the CL headers are located in the include folder where the command is executed.
813
814Once you've got your Android standalone toolchain built and added to your path you can do the following:
815
816To cross compile a NEON example:
817
818 #32 bit:
Kaizenbf8b01d2017-10-12 14:26:51 +0100819 arm-linux-androideabi-clang++ examples/neon_convolution.cpp utils/Utils.cpp -I. -Iinclude -std=c++11 -larm_compute-static -larm_compute_core-static -L. -o neon_convolution_arm -static-libstdc++ -pie
Anthony Barbierdbdab852017-06-23 15:42:00 +0100820 #64 bit:
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000821 aarch64-linux-android-clang++ examples/neon_convolution.cpp utils/Utils.cpp -I. -Iinclude -std=c++11 -larm_compute-static -larm_compute_core-static -L. -o neon_convolution_aarch64 -static-libstdc++ -pie
Anthony Barbierdbdab852017-06-23 15:42:00 +0100822
823To cross compile an OpenCL example:
824
825 #32 bit:
Kaizenbf8b01d2017-10-12 14:26:51 +0100826 arm-linux-androideabi-clang++ examples/cl_convolution.cpp utils/Utils.cpp -I. -Iinclude -std=c++11 -larm_compute-static -larm_compute_core-static -L. -o cl_convolution_arm -static-libstdc++ -pie -lOpenCL -DARM_COMPUTE_CL
Anthony Barbierdbdab852017-06-23 15:42:00 +0100827 #64 bit:
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000828 aarch64-linux-android-clang++ examples/cl_convolution.cpp utils/Utils.cpp -I. -Iinclude -std=c++11 -larm_compute-static -larm_compute_core-static -L. -o cl_convolution_aarch64 -static-libstdc++ -pie -lOpenCL -DARM_COMPUTE_CL
829
830To cross compile a GLES example:
Anthony Barbierf45d5a92018-01-24 16:23:15 +0000831
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000832 #32 bit:
833 arm-linux-androideabi-clang++ examples/gc_absdiff.cpp utils/Utils.cpp -I. -Iinclude -std=c++11 -larm_compute-static -larm_compute_core-static -L. -o gc_absdiff_arm -static-libstdc++ -pie -DARM_COMPUTE_GC
834 #64 bit:
835 aarch64-linux-android-clang++ examples/gc_absdiff.cpp utils/Utils.cpp -I. -Iinclude -std=c++11 -larm_compute-static -larm_compute_core-static -L. -o gc_absdiff_aarch64 -static-libstdc++ -pie -DARM_COMPUTE_GC
Kaizenbf8b01d2017-10-12 14:26:51 +0100836
837To cross compile the examples with the Graph API, such as graph_lenet.cpp, you need to link the library arm_compute_graph also.
838(notice the compute library has to be built with both neon and opencl enabled - neon=1 and opencl=1)
839
840 #32 bit:
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000841 arm-linux-androideabi-clang++ examples/graph_lenet.cpp utils/Utils.cpp utils/GraphUtils.cpp -I. -Iinclude -std=c++11 -Wl,--whole-archive -larm_compute_graph-static -Wl,--no-whole-archive -larm_compute-static -larm_compute_core-static -L. -o graph_lenet_arm -static-libstdc++ -pie -lOpenCL -DARM_COMPUTE_CL
Kaizenbf8b01d2017-10-12 14:26:51 +0100842 #64 bit:
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000843 aarch64-linux-android-clang++ examples/graph_lenet.cpp utils/Utils.cpp utils/GraphUtils.cpp -I. -Iinclude -std=c++11 -Wl,--whole-archive -larm_compute_graph-static -Wl,--no-whole-archive -larm_compute-static -larm_compute_core-static -L. -o graph_lenet_aarch64 -static-libstdc++ -pie -lOpenCL -DARM_COMPUTE_CL
Anthony Barbierdbdab852017-06-23 15:42:00 +0100844
845@note Due to some issues in older versions of the Mali OpenCL DDK (<= r13p0), we recommend to link arm_compute statically on Android.
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000846@note When linked statically the arm_compute_graph library currently needs the --whole-archive linker flag in order to work properly
Anthony Barbierdbdab852017-06-23 15:42:00 +0100847
848Then you need to do is upload the executable and the shared library to the device using ADB:
849
850 adb push neon_convolution_arm /data/local/tmp/
851 adb push cl_convolution_arm /data/local/tmp/
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000852 adb push gc_absdiff_arm /data/local/tmp/
Anthony Barbierdbdab852017-06-23 15:42:00 +0100853 adb shell chmod 777 -R /data/local/tmp/
854
855And finally to run the example:
856
857 adb shell /data/local/tmp/neon_convolution_arm
858 adb shell /data/local/tmp/cl_convolution_arm
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000859 adb shell /data/local/tmp/gc_absdiff_arm
Anthony Barbierdbdab852017-06-23 15:42:00 +0100860
861For 64bit:
862
863 adb push neon_convolution_aarch64 /data/local/tmp/
864 adb push cl_convolution_aarch64 /data/local/tmp/
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000865 adb push gc_absdiff_aarch64 /data/local/tmp/
Anthony Barbierdbdab852017-06-23 15:42:00 +0100866 adb shell chmod 777 -R /data/local/tmp/
867
868And finally to run the example:
869
870 adb shell /data/local/tmp/neon_convolution_aarch64
871 adb shell /data/local/tmp/cl_convolution_aarch64
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000872 adb shell /data/local/tmp/gc_absdiff_aarch64
Anthony Barbierdbdab852017-06-23 15:42:00 +0100873
Jenkinsc3f34a42018-03-02 12:38:09 +0000874@note Examples accept different types of arguments, to find out what they are run the example without any argument and the help will be displayed at the beginning of the run.
875
876For example:
877 adb shell /data/local/tmp/graph_lenet
878
879 /data/local/tmp/graph_lenet
880
881 Usage: /data/local/tmp/graph_lenet [target] [path_to_data] [batches]
882
883 No data folder provided: using random values
884
885 Test passed
886
887In this case the first argument of LeNet (like all the graph examples) is the target (i.e 0 to run on NEON, 1 to run on OpenCL if available, 2 to run on OpenCL using the CLTuner), the second argument is the path to the folder containing the npy files for the weights and finally the third argument is the number of batches to run.
888
Kaizenbf8b01d2017-10-12 14:26:51 +0100889@subsection S3_4_bare_metal Building for bare metal
890
891For bare metal, the library was successfully built using linaros's latest (gcc-linaro-6.3.1-2017.05) bare metal toolchains:
892 - arm-eabi for armv7a
893 - aarch64-elf for arm64-v8a
894
895Download linaro for <a href="https://releases.linaro.org/components/toolchain/binaries/6.3-2017.05/arm-eabi/">armv7a</a> and <a href="https://releases.linaro.org/components/toolchain/binaries/6.3-2017.05/aarch64-elf/">arm64-v8a</a>.
896
897@note Make sure to add the toolchains to your PATH: export PATH=$PATH:$MY_TOOLCHAINS/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-elf/bin:$MY_TOOLCHAINS/gcc-linaro-6.3.1-2017.05-x86_64_arm-eabi/bin
898
899@subsubsection S3_4_1_library How to build the library ?
900
901To cross-compile the library with NEON support for baremetal arm64-v8a:
902
903 scons Werror=1 -j8 debug=0 neon=1 opencl=0 os=bare_metal arch=arm64-v8a build=cross_compile cppthreads=0 openmp=0 standalone=1
904
905@subsubsection S3_4_2_examples How to manually build the examples ?
906
907Examples are disabled when building for bare metal. If you want to build the examples you need to provide a custom bootcode depending on the target architecture and link against the compute library. More information about bare metal bootcode can be found <a href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dai0527a/index.html">here</a>.
908
909@subsection S3_5_windows_host Building on a Windows host system
Kaizen8938bd32017-09-28 14:38:23 +0100910
911Using `scons` directly from the Windows command line is known to cause
912problems. The reason seems to be that if `scons` is setup for cross-compilation
913it gets confused about Windows style paths (using backslashes). Thus it is
914recommended to follow one of the options outlined below.
915
Kaizenbf8b01d2017-10-12 14:26:51 +0100916@subsubsection S3_5_1_ubuntu_on_windows Bash on Ubuntu on Windows
Kaizen8938bd32017-09-28 14:38:23 +0100917
918The best and easiest option is to use
919<a href="https://msdn.microsoft.com/en-gb/commandline/wsl/about">Ubuntu on Windows</a>.
920This feature is still marked as *beta* and thus might not be available.
921However, if it is building the library is as simple as opening a *Bash on
922Ubuntu on Windows* shell and following the general guidelines given above.
923
Kaizenbf8b01d2017-10-12 14:26:51 +0100924@subsubsection S3_5_2_cygwin Cygwin
Kaizen8938bd32017-09-28 14:38:23 +0100925
926If the Windows subsystem for Linux is not available <a href="https://www.cygwin.com/">Cygwin</a>
927can be used to install and run `scons`. In addition to the default packages
928installed by Cygwin `scons` has to be selected in the installer. (`git` might
929also be useful but is not strictly required if you already have got the source
930code of the library.) Linaro provides pre-built versions of
931<a href="http://releases.linaro.org/components/toolchain/binaries/">GCC cross-compilers</a>
932that can be used from the Cygwin terminal. When building for Android the
933compiler is included in the Android standalone toolchain. After everything has
934been set up in the Cygwin terminal the general guide on building the library
935can be followed.
936
Kaizenbf8b01d2017-10-12 14:26:51 +0100937@subsection S3_6_cl_stub_library The OpenCL stub library
Anthony Barbierdbdab852017-06-23 15:42:00 +0100938
939In the opencl-1.2-stubs folder you will find the sources to build a stub OpenCL library which then can be used to link your application or arm_compute against.
940
941If you preferred you could retrieve the OpenCL library from your device and link against this one but often this library will have dependencies on a range of system libraries forcing you to link your application against those too even though it is not using them.
942
943@warning This OpenCL library provided is a stub and *not* a real implementation. You can use it to resolve OpenCL's symbols in arm_compute while building the example but you must make sure the real libOpenCL.so is in your PATH when running the example or it will not work.
944
945To cross-compile the stub OpenCL library simply run:
946
947 <target-prefix>-gcc -o libOpenCL.so -Iinclude opencl-1.2-stubs/opencl_stubs.c -fPIC -shared
948
949For example:
950
Anthony Barbierdbdab852017-06-23 15:42:00 +0100951 #Linux 32bit
952 arm-linux-gnueabihf-gcc -o libOpenCL.so -Iinclude opencl-1.2-stubs/opencl_stubs.c -fPIC -shared
953 #Linux 64bit
954 aarch64-linux-gnu-gcc -o libOpenCL.so -Iinclude -shared opencl-1.2-stubs/opencl_stubs.c -fPIC
955 #Android 32bit
956 arm-linux-androideabi-clang -o libOpenCL.so -Iinclude -shared opencl-1.2-stubs/opencl_stubs.c -fPIC -shared
957 #Android 64bit
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000958 aarch64-linux-android-clang -o libOpenCL.so -Iinclude -shared opencl-1.2-stubs/opencl_stubs.c -fPIC -shared
959
960@subsection S3_7_gles_stub_library The Linux OpenGLES and EGL stub libraries
961
962In the opengles-3.1-stubs folder you will find the sources to build stub EGL and OpenGLES libraries which then can be used to link your Linux application of arm_compute against.
963
964@note The stub libraries are only needed on Linux. For Android, the NDK toolchains already provide the meta-EGL and meta-GLES libraries.
965
966To cross-compile the stub OpenGLES and EGL libraries simply run:
967
968 <target-prefix>-gcc -o libEGL.so -Iinclude/linux opengles-3.1-stubs/EGL.c -fPIC -shared
969 <target-prefix>-gcc -o libGLESv2.so -Iinclude/linux opengles-3.1-stubs/GLESv2.c -fPIC -shared
970
971 #Linux 32bit
972 arm-linux-gnueabihf-gcc -o libEGL.so -Iinclude/linux opengles-3.1-stubs/EGL.c -fPIC -shared
973 arm-linux-gnueabihf-gcc -o libGLESv2.so -Iinclude/linux opengles-3.1-stubs/GLESv2.c -fPIC -shared
974
975 #Linux 64bit
976 aarch64-linux-gnu-gcc -o libEGL.so -Iinclude/linux opengles-3.1-stubs/EGL.c -fPIC -shared
977 aarch64-linux-gnu-gcc -o libGLESv2.so -Iinclude/linux opengles-3.1-stubs/GLESv2.c -fPIC -shared
Anthony Barbierdbdab852017-06-23 15:42:00 +0100978*/
Jenkinsc3f34a42018-03-02 12:38:09 +0000979} // namespace arm_compute