blob: 50efb518af0337fa850f8cd0305c5a309b1dcf4d [file] [log] [blame]
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001/** @mainpage Introduction
2
3@tableofcontents
4
5The Computer Vision and Machine Learning library is a set of functions optimised for both ARM CPUs and GPUs using SIMD technologies.
6
7Several builds of the library are available using various configurations:
8 - OS: Linux, Android or bare metal.
9 - Architecture: armv7a (32bit) or arm64-v8a (64bit)
Anthony Barbier20dbb822017-12-13 21:19:39 +000010 - Technology: NEON / OpenCL / GLES_COMPUTE / NEON and OpenCL and GLES_COMPUTE
Anthony Barbier6ff3b192017-09-04 18:44:23 +010011 - 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.
12
13@section S0_1_contact Contact / Support
14
15Please email developer@arm.com
16
17In 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:
18
19 $ strings android-armv7a-cl-asserts/libarm_compute.so | grep arm_compute_version
20 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
21
Anthony Barbier14c86a92017-12-14 16:27:41 +000022@section S0_2_prebuilt_binaries Pre-built binaries
23
24For each release we provide some pre-built binaries of the library [here](https://github.com/ARM-software/ComputeLibrary/releases)
25
26These binaries have been built using the following toolchains:
27 - Linux armv7a: gcc-linaro-arm-linux-gnueabihf-4.9-2014.07_linux
28 - Linux arm64-v8a: gcc-linaro-4.9-2016.02-x86_64_aarch64-linux-gnu
Anthony Barbiera8a28f62018-02-26 19:16:32 +000029 - Android armv7a: clang++ / gnustl NDK r16b
30 - Android am64-v8a: clang++ / gnustl NDK r16b
Anthony Barbier14c86a92017-12-14 16:27:41 +000031
32@warning Make sure to use a compatible toolchain to build your application or you will get some std::bad_alloc errors at runtime.
33
Anthony Barbier6ff3b192017-09-04 18:44:23 +010034@section S1_file_organisation File organisation
35
36This archive contains:
37 - The arm_compute header and source files
38 - The latest Khronos OpenCL 1.2 C headers from the <a href="https://www.khronos.org/registry/cl/">Khronos OpenCL registry</a>
39 - 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 Barbier20dbb822017-12-13 21:19:39 +000040 - The latest Khronos OpenGL ES 3.1 C headers from the <a href="https://www.khronos.org/registry/gles/">Khronos OpenGL ES registry</a>
41 - The latest Khronos EGL 1.5 C headers from the <a href="https://www.khronos.org/registry/gles/">Khronos EGL registry</a>
42 - The sources for a stub version of libOpenCL.so, libGLESv1_CM.so, libGLESv2.so and libEGL.so to help you build your application.
Anthony Barbier6ff3b192017-09-04 18:44:23 +010043 - An examples folder containing a few examples to compile and link against the library.
44 - A @ref utils folder containing headers with some boiler plate code used by the examples.
45 - This documentation.
46
47You should have the following file organisation:
48
49 .
50 ├── arm_compute --> All the arm_compute headers
51 │   ├── core
52 │   │   ├── CL
Anthony Barbier6a5627a2017-09-26 14:42:02 +010053 │   │   │   ├── CLKernelLibrary.h --> Manages all the OpenCL kernels compilation and caching, provides accessors for the OpenCL Context.
Anthony Barbier6ff3b192017-09-04 18:44:23 +010054 │   │   │   ├── CLKernels.h --> Includes all the OpenCL kernels at once
55 │   │   │   ├── CL specialisation of all the generic objects interfaces (ICLTensor, ICLImage, etc.)
56 │   │   │   ├── kernels --> Folder containing all the OpenCL kernels
57 │   │   │   │   └── CL*Kernel.h
58 │   │   │   └── OpenCL.h --> Wrapper to configure the Khronos OpenCL C++ header
59 │   │ ├── CPP
Anthony Barbier6a5627a2017-09-26 14:42:02 +010060 │   │   │   ├── CPPKernels.h --> Includes all the CPP kernels at once
Anthony Barbier6ff3b192017-09-04 18:44:23 +010061 │   │ │   └── kernels --> Folder containing all the CPP kernels
Anthony Barbier6a5627a2017-09-26 14:42:02 +010062 │   │   │      └── CPP*Kernel.h
Anthony Barbier20dbb822017-12-13 21:19:39 +000063 │   │   ├── GLES_COMPUTE
64 │   │   │   ├── GCKernelLibrary.h --> Manages all the GLES kernels compilation and caching, provides accessors for the GLES Context.
65 │   │   │   ├── GCKernels.h --> Includes all the GLES kernels at once
66 │   │   │   ├── GLES specialisation of all the generic objects interfaces (IGCTensor, IGCImage, etc.)
67 │   │   │   ├── kernels --> Folder containing all the GLES kernels
68 │   │   │   │   └── GC*Kernel.h
69 │   │   │   └── OpenGLES.h --> Wrapper to configure the Khronos EGL and OpenGL ES C header
Anthony Barbier6ff3b192017-09-04 18:44:23 +010070 │   │   ├── NEON
71 │   │   │   ├── kernels --> Folder containing all the NEON kernels
Anthony Barbier6a5627a2017-09-26 14:42:02 +010072 │   │   │   │ ├── arm64 --> Folder containing the interfaces for the assembly arm64 NEON kernels
73 │   │   │   │ ├── arm32 --> Folder containing the interfaces for the assembly arm32 NEON kernels
74 │   │   │   │ ├── assembly --> Folder containing the NEON assembly routines.
Anthony Barbier6ff3b192017-09-04 18:44:23 +010075 │   │   │   │   └── NE*Kernel.h
76 │   │   │   └── NEKernels.h --> Includes all the NEON kernels at once
77 │   │   ├── All common basic types (Types.h, Window, Coordinates, Iterator, etc.)
78 │   │   ├── All generic objects interfaces (ITensor, IImage, etc.)
79 │   │   └── Objects metadata classes (ImageInfo, TensorInfo, MultiImageInfo)
Anthony Barbier6a5627a2017-09-26 14:42:02 +010080 │   ├── graph
81 │   │   ├── CL --> OpenCL specific operations
82 │   │   │   └── CLMap.h / CLUnmap.h
83 │   │   ├── nodes
84 │   │   │   └── The various nodes supported by the graph API
85 │   │   ├── Nodes.h --> Includes all the Graph nodes at once.
86 │   │   └── Graph objects ( INode, ITensorAccessor, Graph, etc.)
Anthony Barbier6ff3b192017-09-04 18:44:23 +010087 │   └── runtime
88 │   ├── CL
89 │   │   ├── CL objects & allocators (CLArray, CLImage, CLTensor, etc.)
90 │   │   ├── functions --> Folder containing all the OpenCL functions
91 │   │   │   └── CL*.h
Anthony Barbier6a5627a2017-09-26 14:42:02 +010092 │   │   ├── CLScheduler.h --> Interface to enqueue OpenCL kernels and get/set the OpenCL CommandQueue and ICLTuner.
Anthony Barbier6ff3b192017-09-04 18:44:23 +010093 │   │   └── CLFunctions.h --> Includes all the OpenCL functions at once
94 │   ├── CPP
Anthony Barbier6a5627a2017-09-26 14:42:02 +010095 │      │   ├── CPPKernels.h --> Includes all the CPP functions at once.
96 │   │   └── CPPScheduler.h --> Basic pool of threads to execute CPP/NEON code on several cores in parallel
Anthony Barbier20dbb822017-12-13 21:19:39 +000097 │   ├── GLES_COMPUTE
98 │   │   ├── GLES objects & allocators (GCArray, GCImage, GCTensor, etc.)
99 │   │   ├── functions --> Folder containing all the GLES functions
100 │   │   │   └── GC*.h
101 │   │   ├── GCScheduler.h --> Interface to enqueue GLES kernels and get/set the GLES CommandQueue.
102 │   │   └── GCFunctions.h --> Includes all the GLES functions at once
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100103 │   ├── NEON
104 │   │ ├── functions --> Folder containing all the NEON functions
105 │   │ │   └── NE*.h
106 │   │ └── NEFunctions.h --> Includes all the NEON functions at once
Anthony Barbier6a5627a2017-09-26 14:42:02 +0100107 │   ├── OMP
108 │   │   └── OMPScheduler.h --> OpenMP scheduler (Alternative to the CPPScheduler)
109 │ ├── Memory manager files (LifetimeManager, PoolManager, etc.)
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100110 │   └── Basic implementations of the generic object interfaces (Array, Image, Tensor, etc.)
Anthony Barbiera8a28f62018-02-26 19:16:32 +0000111 ├── data -> Contains test images and reference data dumps used by validation tests
112 ├── docs -> Contains Doxyfile and Doxygen sources used to generate the HTML pages in the documentation folder.
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100113 ├── documentation
114 │   ├── index.xhtml
115 │   └── ...
116 ├── documentation.xhtml -> documentation/index.xhtml
117 ├── examples
Anthony Barbier20dbb822017-12-13 21:19:39 +0000118 │   ├── cl_*.cpp --> OpenCL examples
Anthony Barbier14c86a92017-12-14 16:27:41 +0000119 │   ├── gc_*.cpp --> GLES compute shaders examples
Anthony Barbier20dbb822017-12-13 21:19:39 +0000120 │   ├── graph_*.cpp --> Graph examples
121 │   ├── neoncl_*.cpp --> NEON / OpenCL interoperability examples
122 │   └── neon_*.cpp --> NEON examples
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100123 ├── include
Anthony Barbier6a5627a2017-09-26 14:42:02 +0100124 │   ├── CL
125 │   │ └── Khronos OpenCL C headers and C++ wrapper
126 │   ├── half --> FP16 library available from http://half.sourceforge.net
Anthony Barbier14c86a92017-12-14 16:27:41 +0000127 │   ├── libnpy --> Library to load / write npy buffers, available from https://github.com/llohse/libnpy
128 │  └── linux --> Headers only needed for Linux builds
129 │   └── Khronos EGL and OpenGLES headers
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100130 ├── opencl-1.2-stubs
Anthony Barbier14c86a92017-12-14 16:27:41 +0000131 │ └── opencl_stubs.c --> OpenCL stubs implementation
132 ├── opengles-3.1-stubs
133 │   ├── EGL.c --> EGL stubs implementation
134 │   └── GLESv2.c --> GLESv2 stubs implementation
Anthony Barbier6a5627a2017-09-26 14:42:02 +0100135 ├── scripts
136 │   ├── caffe_data_extractor.py --> Basic script to export weights from Caffe to npy files
137 │   └── tensorflow_data_extractor.py --> Basic script to export weights from Tensor Flow to npy files
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100138 ├── src
139 │   ├── core
140 │ │ └── ... (Same structure as headers)
Anthony Barbier20dbb822017-12-13 21:19:39 +0000141 │   │ ├── CL
142 │   │ │ └── cl_kernels --> All the OpenCL kernels
143 │   │ └── GLES_COMPUTE
144 │   │ └── cs_shaders --> All the OpenGL ES Compute Shaders
Anthony Barbier6a5627a2017-09-26 14:42:02 +0100145 │   ├── graph
146 │ │ └── ... (Same structure as headers)
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100147 │ └── runtime
148 │ └── ... (Same structure as headers)
Anthony Barbier6a5627a2017-09-26 14:42:02 +0100149 ├── support
150 │ └── Various headers to work around toolchains / platform issues.
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100151 ├── tests
152 │   ├── All test related files shared between validation and benchmark
Anthony Barbier6a5627a2017-09-26 14:42:02 +0100153 │   ├── CL --> OpenCL accessors
Anthony Barbier20dbb822017-12-13 21:19:39 +0000154 │   ├── GLES_COMPUTE --> GLES accessors
Anthony Barbier6a5627a2017-09-26 14:42:02 +0100155 │   ├── NEON --> NEON accessors
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100156 │   ├── benchmark --> Sources for benchmarking
157 │ │ ├── Benchmark specific files
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100158 │ │ ├── CL --> OpenCL benchmarking tests
Anthony Barbier20dbb822017-12-13 21:19:39 +0000159 │ │ ├── GLES_COMPUTE --> GLES benchmarking tests
Anthony Barbiera8a28f62018-02-26 19:16:32 +0000160 │   │ ├── fixtures
161 │ │ │ └── Fixtures to initialise and run the runtime Functions.
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100162 │ │ └── NEON --> NEON benchmarking tests
Anthony Barbier6a5627a2017-09-26 14:42:02 +0100163 │   ├── datasets
164 │ │ └── Datasets for all the validation / benchmark tests, layer configurations for various networks, etc.
165 │   ├── framework
166 │ │ └── Boiler plate code for both validation and benchmark test suites (Command line parsers, instruments, output loggers, etc.)
167 │   ├── networks
168 │ │ └── Examples of how to instantiate networks.
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100169 │   ├── validation --> Sources for validation
170 │ │ ├── Validation specific files
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100171 │ │ ├── CL --> OpenCL validation tests
Anthony Barbier20dbb822017-12-13 21:19:39 +0000172 │ │ ├── GLES_COMPUTE --> GLES validation tests
Anthony Barbier6a5627a2017-09-26 14:42:02 +0100173 │ │ ├── CPP --> C++ reference implementations
174 │   │ ├── fixtures
175 │ │ │ └── Fixtures to initialise and run the runtime Functions.
176 │ │ └── NEON --> NEON validation tests
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100177 │   └── dataset --> Datasets defining common sets of input parameters
178 └── utils --> Boiler plate code used by examples
Anthony Barbier20dbb822017-12-13 21:19:39 +0000179 └── Various utilities to print types, load / store assets, etc.
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100180
181@section S2_versions_changelog Release versions and changelog
182
183@subsection S2_1_versions Release versions
184
185All releases are numbered vYY.MM Where YY are the last two digits of the year, and MM the month number.
186If there is more than one release in a month then an extra sequential number is appended at the end:
187
188 v17.03 (First release of March 2017)
189 v17.03.1 (Second release of March 2017)
190 v17.04 (First release of April 2017)
191
192@note We're aiming at releasing one major public release with new features per quarter. All releases in between will only contain bug fixes.
193
194@subsection S2_2_changelog Changelog
195
Anthony Barbier2d0ce772018-02-21 15:35:36 +0000196v18.02 Public major release
197 - Various NEON / OpenCL / GLES optimisations.
198 - Various bug fixes.
199 - Changed default number of threads on big LITTLE systems.
200 - Refactored examples and added:
201 - graph_mobilenet_qassym8
202 - graph_resnet
203 - graph_squeezenet_v1_1
204 - Renamed @ref arm_compute::CLConvolutionLayer into @ref arm_compute::CLGEMMConvolutionLayer and created a new @ref arm_compute::CLConvolutionLayer to select the fastest convolution method.
205 - Renamed @ref arm_compute::NEConvolutionLayer into @ref arm_compute::NEGEMMConvolutionLayer and created a new @ref arm_compute::NEConvolutionLayer to select the fastest convolution method.
206 - Added in place support to:
207 - @ref arm_compute::CLActivationLayer
208 - @ref arm_compute::CLBatchNormalizationLayer
209 - Added QASYMM8 support to:
210 - @ref arm_compute::CLActivationLayer
211 - @ref arm_compute::CLDepthwiseConvolutionLayer
212 - @ref arm_compute::NEDepthwiseConvolutionLayer
213 - @ref arm_compute::NESoftmaxLayer
214 - Added FP16 support to:
215 - @ref arm_compute::CLDepthwiseConvolutionLayer3x3
216 - @ref arm_compute::CLDepthwiseConvolutionLayer
217 - Added broadcasting support to @ref arm_compute::NEArithmeticAddition / @ref arm_compute::CLArithmeticAddition / @ref arm_compute::CLPixelWiseMultiplication
218 - Added fused batched normalization and activation to @ref arm_compute::CLBatchNormalizationLayer and @ref arm_compute::NEBatchNormalizationLayer
219 - Added support for non-square pooling to @ref arm_compute::NEPoolingLayer and @ref arm_compute::CLPoolingLayer
220 - New OpenCL kernels / functions:
221 - @ref arm_compute::CLDirectConvolutionLayerOutputStageKernel
Pablo Tellof6c572c2018-02-14 12:47:30 +0000222 - New NEON kernels / functions
Anthony Barbier2d0ce772018-02-21 15:35:36 +0000223 - Added name() method to all kernels.
224 - Added support for Winograd 5x5.
225 - @ref arm_compute::NEPermuteKernel / @ref arm_compute::NEPermute
Pablo Tellof6c572c2018-02-14 12:47:30 +0000226 - @ref arm_compute::NEWinogradLayerTransformInputKernel / @ref arm_compute::NEWinogradLayer
227 - @ref arm_compute::NEWinogradLayerTransformOutputKernel / @ref arm_compute::NEWinogradLayer
228 - @ref arm_compute::NEWinogradLayerTransformWeightsKernel / @ref arm_compute::NEWinogradLayer
229 - Renamed arm_compute::NEWinogradLayerKernel into @ref arm_compute::NEWinogradLayerBatchedGEMMKernel
Anthony Barbier2d0ce772018-02-21 15:35:36 +0000230 - New GLES kernels / functions:
231 - @ref arm_compute::GCTensorShiftKernel / @ref arm_compute::GCTensorShift
Pablo Tellof6c572c2018-02-14 12:47:30 +0000232
Anthony Barbier64c95a02018-01-22 18:48:55 +0000233v18.01 Public maintenance release
234 - Various bug fixes
235 - Added some of the missing validate() methods
236 - Added @ref arm_compute::CLDeconvolutionLayerUpsampleKernel / @ref arm_compute::CLDeconvolutionLayer @ref arm_compute::CLDeconvolutionLayerUpsample
237 - Added @ref arm_compute::CLPermuteKernel / @ref arm_compute::CLPermute
238 - Added method to clean the programs cache in the CL Kernel library.
239 - Added @ref arm_compute::GCArithmeticAdditionKernel / @ref arm_compute::GCArithmeticAddition
240 - Added @ref arm_compute::GCDepthwiseConvolutionLayer3x3Kernel / @ref arm_compute::GCDepthwiseConvolutionLayer3x3
241 - Added @ref arm_compute::GCNormalizePlanarYUVLayerKernel / @ref arm_compute::GCNormalizePlanarYUVLayer
242 - Added @ref arm_compute::GCScaleKernel / @ref arm_compute::GCScale
243 - Added @ref arm_compute::GCWeightsReshapeKernel / @ref arm_compute::GCConvolutionLayer
244 - Added FP16 support to the following GLES compute kernels:
245 - @ref arm_compute::GCCol2ImKernel
246 - @ref arm_compute::GCGEMMInterleave4x4Kernel
247 - @ref arm_compute::GCGEMMTranspose1xWKernel
248 - @ref arm_compute::GCIm2ColKernel
Pablo Tellof6c572c2018-02-14 12:47:30 +0000249 - Refactored NEON Winograd (arm_compute::NEWinogradLayerKernel)
Anthony Barbier64c95a02018-01-22 18:48:55 +0000250 - Added @ref arm_compute::NEDirectConvolutionLayerOutputStageKernel
251 - Added QASYMM8 support to the following NEON kernels:
252 - @ref arm_compute::NEDepthwiseConvolutionLayer3x3Kernel
253 - @ref arm_compute::NEFillBorderKernel
254 - @ref arm_compute::NEPoolingLayerKernel
255 - Added new examples:
256 - graph_cl_mobilenet_qasymm8.cpp
257 - graph_inception_v3.cpp
258 - gc_dc.cpp
259 - More tests added to both validation and benchmarking suites.
260
Gian Marcoff850932017-12-11 12:37:17 +0000261v17.12 Public major release
262 - Most machine learning functions on OpenCL support the new data type QASYMM8
263 - Introduced logging interface
264 - Introduced opencl timer
265 - Reworked GEMMLowp interface
266 - Added new NEON assembly kernels for GEMMLowp, SGEMM and HGEMM
267 - Added validation method for most Machine Learning kernels / functions
268 - Added new graph examples such as googlenet, mobilenet, squeezenet, vgg16 and vgg19
269 - Added sgemm example for OpenCL
270 - Added absolute difference example for GLES compute
271 - Added new tests and benchmarks in validation and benchmark frameworks
272 - Added new kernels / functions for GLES compute
273
274 - New OpenGL ES kernels / functions
275 - @ref arm_compute::GCAbsoluteDifferenceKernel / @ref arm_compute::GCAbsoluteDifference
276 - @ref arm_compute::GCActivationLayerKernel / @ref arm_compute::GCActivationLayer
277 - @ref arm_compute::GCBatchNormalizationLayerKernel / @ref arm_compute::GCBatchNormalizationLayer
278 - @ref arm_compute::GCCol2ImKernel
279 - @ref arm_compute::GCDepthConcatenateLayerKernel / @ref arm_compute::GCDepthConcatenateLayer
280 - @ref arm_compute::GCDirectConvolutionLayerKernel / @ref arm_compute::GCDirectConvolutionLayer
281 - @ref arm_compute::GCDropoutLayerKernel / @ref arm_compute::GCDropoutLayer
282 - @ref arm_compute::GCFillBorderKernel / @ref arm_compute::GCFillBorder
283 - @ref arm_compute::GCGEMMInterleave4x4Kernel / @ref arm_compute::GCGEMMInterleave4x4
284 - @ref arm_compute::GCGEMMMatrixAccumulateBiasesKernel / @ref arm_compute::GCGEMMMatrixAdditionKernel / @ref arm_compute::GCGEMMMatrixMultiplyKernel / @ref arm_compute::GCGEMM
285 - @ref arm_compute::GCGEMMTranspose1xWKernel / @ref arm_compute::GCGEMMTranspose1xW
286 - @ref arm_compute::GCIm2ColKernel
287 - @ref arm_compute::GCNormalizationLayerKernel / @ref arm_compute::GCNormalizationLayer
288 - @ref arm_compute::GCPixelWiseMultiplicationKernel / @ref arm_compute::GCPixelWiseMultiplication
289 - @ref arm_compute::GCPoolingLayerKernel / @ref arm_compute::GCPoolingLayer
290 - @ref arm_compute::GCLogits1DMaxKernel / @ref arm_compute::GCLogits1DShiftExpSumKernel / @ref arm_compute::GCLogits1DNormKernel / @ref arm_compute::GCSoftmaxLayer
291 - @ref arm_compute::GCTransposeKernel / @ref arm_compute::GCTranspose
292
293 - New NEON kernels / functions
294 - @ref arm_compute::NEGEMMLowpAArch64A53Kernel / @ref arm_compute::NEGEMMLowpAArch64Kernel / @ref arm_compute::NEGEMMLowpAArch64V8P4Kernel / arm_compute::NEGEMMInterleavedBlockedKernel / @ref arm_compute::NEGEMMLowpAssemblyMatrixMultiplyCore
295 - @ref arm_compute::NEHGEMMAArch64FP16Kernel
296 - @ref arm_compute::NEDepthwiseConvolutionLayer3x3Kernel / @ref arm_compute::NEDepthwiseIm2ColKernel / @ref arm_compute::NEGEMMMatrixVectorMultiplyKernel / @ref arm_compute::NEDepthwiseVectorToTensorKernel / @ref arm_compute::NEDepthwiseConvolutionLayer
297 - @ref arm_compute::NEGEMMLowpOffsetContributionKernel / @ref arm_compute::NEGEMMLowpMatrixAReductionKernel / @ref arm_compute::NEGEMMLowpMatrixBReductionKernel / @ref arm_compute::NEGEMMLowpMatrixMultiplyCore
298 - @ref arm_compute::NEGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPointKernel / @ref arm_compute::NEGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPoint
299 - @ref arm_compute::NEGEMMLowpQuantizeDownInt32ToUint8ScaleKernel / @ref arm_compute::NEGEMMLowpQuantizeDownInt32ToUint8Scale
Pablo Tellof6c572c2018-02-14 12:47:30 +0000300 - @ref arm_compute::NEWinogradLayer / arm_compute::NEWinogradLayerKernel
Gian Marcoff850932017-12-11 12:37:17 +0000301
302 - New OpenCL kernels / functions
303 - @ref arm_compute::CLGEMMLowpOffsetContributionKernel / @ref arm_compute::CLGEMMLowpMatrixAReductionKernel / @ref arm_compute::CLGEMMLowpMatrixBReductionKernel / @ref arm_compute::CLGEMMLowpMatrixMultiplyCore
304 - @ref arm_compute::CLGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPointKernel / @ref arm_compute::CLGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPoint
305 - @ref arm_compute::CLGEMMLowpQuantizeDownInt32ToUint8ScaleKernel / @ref arm_compute::CLGEMMLowpQuantizeDownInt32ToUint8Scale
306
307 - New graph nodes for NEON and OpenCL
308 - @ref arm_compute::graph::BranchLayer
309 - @ref arm_compute::graph::DepthConvertLayer
310 - @ref arm_compute::graph::DepthwiseConvolutionLayer
311 - @ref arm_compute::graph::DequantizationLayer
312 - @ref arm_compute::graph::FlattenLayer
313 - @ref arm_compute::graph::QuantizationLayer
314 - @ref arm_compute::graph::ReshapeLayer
315
Anthony Barbier3c5b4ff2017-10-12 13:20:52 +0100316v17.10 Public maintenance release
317 - Bug fixes:
318 - Check the maximum local workgroup size supported by OpenCL devices
319 - Minor documentation updates (Fixed instructions to build the examples)
320 - Introduced a arm_compute::graph::GraphContext
321 - Added a few new Graph nodes, support for branches and grouping.
322 - Automatically enable cl_printf in debug builds
323 - Fixed bare metal builds for armv7a
324 - Added AlexNet and cartoon effect examples
325 - 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)
326
Anthony Barbier6a5627a2017-09-26 14:42:02 +0100327v17.09 Public major release
328 - Experimental Graph support: initial implementation of a simple stream API to easily chain machine learning layers.
329 - Memory Manager (@ref arm_compute::BlobLifetimeManager, @ref arm_compute::BlobMemoryPool, @ref arm_compute::ILifetimeManager, @ref arm_compute::IMemoryGroup, @ref arm_compute::IMemoryManager, @ref arm_compute::IMemoryPool, @ref arm_compute::IPoolManager, @ref arm_compute::MemoryManagerOnDemand, @ref arm_compute::PoolManager)
330 - New validation and benchmark frameworks (Boost and Google frameworks replaced by homemade framework).
331 - Most machine learning functions support both fixed point 8 and 16 bit (QS8, QS16) for both NEON and OpenCL.
332 - New NEON kernels / functions:
333 - @ref arm_compute::NEGEMMAssemblyBaseKernel @ref arm_compute::NEGEMMAArch64Kernel
334 - @ref arm_compute::NEDequantizationLayerKernel / @ref arm_compute::NEDequantizationLayer
335 - @ref arm_compute::NEFloorKernel / @ref arm_compute::NEFloor
Giorgio Arena04a8f8c2017-11-23 11:45:24 +0000336 - @ref arm_compute::NEL2NormalizeLayerKernel / @ref arm_compute::NEL2NormalizeLayer
Anthony Barbier6a5627a2017-09-26 14:42:02 +0100337 - @ref arm_compute::NEQuantizationLayerKernel @ref arm_compute::NEMinMaxLayerKernel / @ref arm_compute::NEQuantizationLayer
338 - @ref arm_compute::NEROIPoolingLayerKernel / @ref arm_compute::NEROIPoolingLayer
339 - @ref arm_compute::NEReductionOperationKernel / @ref arm_compute::NEReductionOperation
340 - @ref arm_compute::NEReshapeLayerKernel / @ref arm_compute::NEReshapeLayer
341
342 - New OpenCL kernels / functions:
Giorgio Arena04a8f8c2017-11-23 11:45:24 +0000343 - @ref arm_compute::CLDepthwiseConvolutionLayer3x3Kernel @ref arm_compute::CLDepthwiseIm2ColKernel @ref arm_compute::CLDepthwiseVectorToTensorKernel @ref arm_compute::CLDepthwiseWeightsReshapeKernel / @ref arm_compute::CLDepthwiseConvolutionLayer3x3 @ref arm_compute::CLDepthwiseConvolutionLayer @ref arm_compute::CLDepthwiseSeparableConvolutionLayer
Anthony Barbier6a5627a2017-09-26 14:42:02 +0100344 - @ref arm_compute::CLDequantizationLayerKernel / @ref arm_compute::CLDequantizationLayer
345 - @ref arm_compute::CLDirectConvolutionLayerKernel / @ref arm_compute::CLDirectConvolutionLayer
346 - @ref arm_compute::CLFlattenLayer
347 - @ref arm_compute::CLFloorKernel / @ref arm_compute::CLFloor
348 - @ref arm_compute::CLGEMMTranspose1xW
349 - @ref arm_compute::CLGEMMMatrixVectorMultiplyKernel
Giorgio Arena04a8f8c2017-11-23 11:45:24 +0000350 - @ref arm_compute::CLL2NormalizeLayerKernel / @ref arm_compute::CLL2NormalizeLayer
Anthony Barbier6a5627a2017-09-26 14:42:02 +0100351 - @ref arm_compute::CLQuantizationLayerKernel @ref arm_compute::CLMinMaxLayerKernel / @ref arm_compute::CLQuantizationLayer
352 - @ref arm_compute::CLROIPoolingLayerKernel / @ref arm_compute::CLROIPoolingLayer
353 - @ref arm_compute::CLReductionOperationKernel / @ref arm_compute::CLReductionOperation
354 - @ref arm_compute::CLReshapeLayerKernel / @ref arm_compute::CLReshapeLayer
355
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100356v17.06 Public major release
357 - Various bug fixes
358 - Added support for fixed point 8 bit (QS8) to the various NEON machine learning kernels.
359 - Added unit tests and benchmarks (AlexNet, LeNet)
360 - Added support for sub tensors.
361 - Added infrastructure to provide GPU specific optimisation for some OpenCL kernels.
362 - Added @ref arm_compute::OMPScheduler (OpenMP) scheduler for NEON
363 - Added @ref arm_compute::SingleThreadScheduler scheduler for NEON (For bare metal)
364 - User can specify his own scheduler by implementing the @ref arm_compute::IScheduler interface.
365 - New OpenCL kernels / functions:
366 - @ref arm_compute::CLBatchNormalizationLayerKernel / @ref arm_compute::CLBatchNormalizationLayer
Giorgio Arena04a8f8c2017-11-23 11:45:24 +0000367 - @ref arm_compute::CLDepthConcatenateLayerKernel / @ref arm_compute::CLDepthConcatenateLayer
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100368 - @ref arm_compute::CLHOGOrientationBinningKernel @ref arm_compute::CLHOGBlockNormalizationKernel, @ref arm_compute::CLHOGDetectorKernel / @ref arm_compute::CLHOGDescriptor @ref arm_compute::CLHOGDetector @ref arm_compute::CLHOGGradient @ref arm_compute::CLHOGMultiDetection
369 - @ref arm_compute::CLLocallyConnectedMatrixMultiplyKernel / @ref arm_compute::CLLocallyConnectedLayer
370 - @ref arm_compute::CLWeightsReshapeKernel / @ref arm_compute::CLConvolutionLayerReshapeWeights
371 - New C++ kernels:
372 - @ref arm_compute::CPPDetectionWindowNonMaximaSuppressionKernel
373 - New NEON kernels / functions:
374 - @ref arm_compute::NEBatchNormalizationLayerKernel / @ref arm_compute::NEBatchNormalizationLayer
Giorgio Arena04a8f8c2017-11-23 11:45:24 +0000375 - @ref arm_compute::NEDepthConcatenateLayerKernel / @ref arm_compute::NEDepthConcatenateLayer
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100376 - @ref arm_compute::NEDirectConvolutionLayerKernel / @ref arm_compute::NEDirectConvolutionLayer
377 - @ref arm_compute::NELocallyConnectedMatrixMultiplyKernel / @ref arm_compute::NELocallyConnectedLayer
378 - @ref arm_compute::NEWeightsReshapeKernel / @ref arm_compute::NEConvolutionLayerReshapeWeights
379
380v17.05 Public bug fixes release
381 - Various bug fixes
382 - Remaining of the functions ported to use accurate padding.
383 - Library does not link against OpenCL anymore (It uses dlopen / dlsym at runtime instead to determine whether or not OpenCL is available).
384 - Added "free" method to allocator.
385 - Minimum version of g++ required for armv7 Linux changed from 4.8 to 4.9
386
387v17.04 Public bug fixes release
388
389 The following functions have been ported to use the new accurate padding:
390 - @ref arm_compute::CLColorConvertKernel
391 - @ref arm_compute::CLEdgeNonMaxSuppressionKernel
392 - @ref arm_compute::CLEdgeTraceKernel
393 - @ref arm_compute::CLGaussianPyramidHorKernel
394 - @ref arm_compute::CLGaussianPyramidVertKernel
395 - @ref arm_compute::CLGradientKernel
396 - @ref arm_compute::NEChannelCombineKernel
397 - @ref arm_compute::NEFillArrayKernel
398 - @ref arm_compute::NEGaussianPyramidHorKernel
399 - @ref arm_compute::NEGaussianPyramidVertKernel
400 - @ref arm_compute::NEHarrisScoreFP16Kernel
401 - @ref arm_compute::NEHarrisScoreKernel
402 - @ref arm_compute::NEHOGDetectorKernel
403 - @ref arm_compute::NELogits1DMaxKernel
Diego Lopez Recas35ceeb22017-12-04 18:56:10 +0000404 - arm_compute::NELogits1DShiftExpSumKernel
405 - arm_compute::NELogits1DNormKernel
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100406 - @ref arm_compute::NENonMaximaSuppression3x3FP16Kernel
407 - @ref arm_compute::NENonMaximaSuppression3x3Kernel
408
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100409v17.03.1 First Major public release of the sources
410 - Renamed the library to arm_compute
411 - New CPP target introduced for C++ kernels shared between NEON and CL functions.
412 - New padding calculation interface introduced and ported most kernels / functions to use it.
413 - New OpenCL kernels / functions:
Gian Marco05288a22017-11-21 10:57:50 +0000414 - @ref arm_compute::CLGEMMLowpMatrixMultiplyKernel / arm_compute::CLGEMMLowp
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100415 - New NEON kernels / functions:
416 - @ref arm_compute::NENormalizationLayerKernel / @ref arm_compute::NENormalizationLayer
417 - @ref arm_compute::NETransposeKernel / @ref arm_compute::NETranspose
Diego Lopez Recas35ceeb22017-12-04 18:56:10 +0000418 - @ref arm_compute::NELogits1DMaxKernel, arm_compute::NELogits1DShiftExpSumKernel, arm_compute::NELogits1DNormKernel / @ref arm_compute::NESoftmaxLayer
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100419 - @ref arm_compute::NEIm2ColKernel, @ref arm_compute::NECol2ImKernel, arm_compute::NEConvolutionLayerWeightsReshapeKernel / @ref arm_compute::NEConvolutionLayer
420 - @ref arm_compute::NEGEMMMatrixAccumulateBiasesKernel / @ref arm_compute::NEFullyConnectedLayer
Gian Marcoe75a02b2017-11-08 12:24:09 +0000421 - @ref arm_compute::NEGEMMLowpMatrixMultiplyKernel / arm_compute::NEGEMMLowp
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100422
423v17.03 Sources preview
424 - New OpenCL kernels / functions:
425 - @ref arm_compute::CLGradientKernel, @ref arm_compute::CLEdgeNonMaxSuppressionKernel, @ref arm_compute::CLEdgeTraceKernel / @ref arm_compute::CLCannyEdge
426 - GEMM refactoring + FP16 support: @ref arm_compute::CLGEMMInterleave4x4Kernel, @ref arm_compute::CLGEMMTranspose1xWKernel, @ref arm_compute::CLGEMMMatrixMultiplyKernel, @ref arm_compute::CLGEMMMatrixAdditionKernel / @ref arm_compute::CLGEMM
427 - @ref arm_compute::CLGEMMMatrixAccumulateBiasesKernel / @ref arm_compute::CLFullyConnectedLayer
428 - @ref arm_compute::CLTransposeKernel / @ref arm_compute::CLTranspose
429 - @ref arm_compute::CLLKTrackerInitKernel, @ref arm_compute::CLLKTrackerStage0Kernel, @ref arm_compute::CLLKTrackerStage1Kernel, @ref arm_compute::CLLKTrackerFinalizeKernel / @ref arm_compute::CLOpticalFlow
430 - @ref arm_compute::CLNormalizationLayerKernel / @ref arm_compute::CLNormalizationLayer
431 - @ref arm_compute::CLLaplacianPyramid, @ref arm_compute::CLLaplacianReconstruct
432 - New NEON kernels / functions:
433 - @ref arm_compute::NEActivationLayerKernel / @ref arm_compute::NEActivationLayer
434 - GEMM refactoring + FP16 support (Requires armv8.2 CPU): @ref arm_compute::NEGEMMInterleave4x4Kernel, @ref arm_compute::NEGEMMTranspose1xWKernel, @ref arm_compute::NEGEMMMatrixMultiplyKernel, @ref arm_compute::NEGEMMMatrixAdditionKernel / @ref arm_compute::NEGEMM
435 - @ref arm_compute::NEPoolingLayerKernel / @ref arm_compute::NEPoolingLayer
436
437v17.02.1 Sources preview
438 - New OpenCL kernels / functions:
439 - @ref arm_compute::CLLogits1DMaxKernel, @ref arm_compute::CLLogits1DShiftExpSumKernel, @ref arm_compute::CLLogits1DNormKernel / @ref arm_compute::CLSoftmaxLayer
440 - @ref arm_compute::CLPoolingLayerKernel / @ref arm_compute::CLPoolingLayer
Gian Marco Iodice5cb4c422017-06-23 10:38:25 +0100441 - @ref arm_compute::CLIm2ColKernel, @ref arm_compute::CLCol2ImKernel, arm_compute::CLConvolutionLayerWeightsReshapeKernel / @ref arm_compute::CLConvolutionLayer
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100442 - @ref arm_compute::CLRemapKernel / @ref arm_compute::CLRemap
443 - @ref arm_compute::CLGaussianPyramidHorKernel, @ref arm_compute::CLGaussianPyramidVertKernel / @ref arm_compute::CLGaussianPyramid, @ref arm_compute::CLGaussianPyramidHalf, @ref arm_compute::CLGaussianPyramidOrb
444 - @ref arm_compute::CLMinMaxKernel, @ref arm_compute::CLMinMaxLocationKernel / @ref arm_compute::CLMinMaxLocation
445 - @ref arm_compute::CLNonLinearFilterKernel / @ref arm_compute::CLNonLinearFilter
446 - New NEON FP16 kernels (Requires armv8.2 CPU)
447 - @ref arm_compute::NEAccumulateWeightedFP16Kernel
448 - @ref arm_compute::NEBox3x3FP16Kernel
449 - @ref arm_compute::NENonMaximaSuppression3x3FP16Kernel
450
451v17.02 Sources preview
452 - New OpenCL kernels / functions:
453 - @ref arm_compute::CLActivationLayerKernel / @ref arm_compute::CLActivationLayer
454 - @ref arm_compute::CLChannelCombineKernel / @ref arm_compute::CLChannelCombine
455 - @ref arm_compute::CLDerivativeKernel / @ref arm_compute::CLChannelExtract
456 - @ref arm_compute::CLFastCornersKernel / @ref arm_compute::CLFastCorners
457 - @ref arm_compute::CLMeanStdDevKernel / @ref arm_compute::CLMeanStdDev
458 - New NEON kernels / functions:
459 - HOG / SVM: @ref arm_compute::NEHOGOrientationBinningKernel, @ref arm_compute::NEHOGBlockNormalizationKernel, @ref arm_compute::NEHOGDetectorKernel, arm_compute::NEHOGNonMaximaSuppressionKernel / @ref arm_compute::NEHOGDescriptor, @ref arm_compute::NEHOGDetector, @ref arm_compute::NEHOGGradient, @ref arm_compute::NEHOGMultiDetection
460 - @ref arm_compute::NENonLinearFilterKernel / @ref arm_compute::NENonLinearFilter
461 - Introduced a CLScheduler to manage the default context and command queue used by the runtime library and create synchronisation events.
462 - Switched all the kernels / functions to use tensors instead of images.
463 - Updated documentation to include instructions to build the library from sources.
464
465v16.12 Binary preview release
466 - Original release
467
468@section S3_how_to_build How to build the library and the examples
469
470@subsection S3_1_build_options Build options
471
472scons 2.3 or above is required to build the library.
473To see the build options available simply run ```scons -h```:
474
Anthony Barbier79c61782017-06-23 11:48:24 +0100475 debug: Debug (yes|no)
476 default: False
477 actual: False
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100478
Anthony Barbier79c61782017-06-23 11:48:24 +0100479 asserts: Enable asserts (this flag is forced to 1 for debug=1) (yes|no)
480 default: False
481 actual: False
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100482
Anthony Barbier79c61782017-06-23 11:48:24 +0100483 arch: Target Architecture (armv7a|arm64-v8a|arm64-v8.2-a|x86_32|x86_64)
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100484 default: armv7a
485 actual: armv7a
486
Anthony Barbier79c61782017-06-23 11:48:24 +0100487 os: Target OS (linux|android|bare_metal)
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100488 default: linux
489 actual: linux
490
Anthony Barbier2d0ce772018-02-21 15:35:36 +0000491 build: Build type (native|cross_compile|embed_only)
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100492 default: cross_compile
493 actual: cross_compile
494
Anthony Barbier79c61782017-06-23 11:48:24 +0100495 examples: Build example programs (yes|no)
496 default: True
497 actual: True
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100498
Anthony Barbier79c61782017-06-23 11:48:24 +0100499 Werror: Enable/disable the -Werror compilation flag (yes|no)
500 default: True
501 actual: True
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100502
Anthony Barbier79c61782017-06-23 11:48:24 +0100503 opencl: Enable OpenCL support (yes|no)
504 default: True
505 actual: True
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100506
Anthony Barbier79c61782017-06-23 11:48:24 +0100507 neon: Enable Neon support (yes|no)
508 default: False
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100509 actual: False
510
Anthony Barbier20dbb822017-12-13 21:19:39 +0000511 gles_compute: Enable OpenGL ES Compute Shader support (yes|no)
512 default: False
513 actual: False
514
515 embed_kernels: Embed OpenCL kernels and OpenGL ES compute shader in library binary (yes|no)
Anthony Barbiercc0a80b2017-12-15 11:37:29 +0000516 default: True
517 actual: True
Anthony Barbier79c61782017-06-23 11:48:24 +0100518
519 set_soname: Set the library's soname and shlibversion (requires SCons 2.4 or above) (yes|no)
520 default: False
521 actual: False
522
523 openmp: Enable OpenMP backend (yes|no)
524 default: False
525 actual: False
526
527 cppthreads: Enable C++11 threads backend (yes|no)
528 default: True
529 actual: True
530
531 build_dir: Specify sub-folder for the build ( /path/to/build_dir )
532 default: .
533 actual: .
534
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100535 extra_cxx_flags: Extra CXX flags to be appended to the build command
536 default:
537 actual:
538
Anthony Barbier79c61782017-06-23 11:48:24 +0100539 pmu: Enable PMU counters (yes|no)
540 default: False
541 actual: False
542
Anthony Barbier6a5627a2017-09-26 14:42:02 +0100543 mali: Enable Mali hardware counters (yes|no)
544 default: False
545 actual: False
546
Anthony Barbier79c61782017-06-23 11:48:24 +0100547 validation_tests: Build validation test programs (yes|no)
548 default: False
549 actual: False
550
551 benchmark_tests: Build benchmark test programs (yes|no)
552 default: False
553 actual: False
554
555@b debug / @b asserts:
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100556 - With debug=1 asserts are enabled, and the library is built with symbols and no optimisations enabled.
557 - 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)
558 - 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).
559
Anthony Barbier79c61782017-06-23 11:48:24 +0100560@b arch: The x86_32 and x86_64 targets can only be used with neon=0 and opencl=1.
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100561
Anthony Barbier79c61782017-06-23 11:48:24 +0100562@b os: Choose the operating system you are targeting: Linux, Android or bare metal.
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100563@note bare metal can only be used for NEON (not OpenCL), only static libraries get built and NEON's multi-threading support is disabled.
564
Anthony Barbier79c61782017-06-23 11:48:24 +0100565@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.
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100566
Anthony Barbier79c61782017-06-23 11:48:24 +0100567@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.
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100568
Anthony Barbier2d0ce772018-02-21 15:35:36 +0000569There 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.
570
Anthony Barbier79c61782017-06-23 11:48:24 +0100571@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).
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100572
Anthony Barbier20dbb822017-12-13 21:19:39 +0000573@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 Barbier6ff3b192017-09-04 18:44:23 +0100574
Anthony Barbier20dbb822017-12-13 21:19:39 +0000575@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 Barbier79c61782017-06-23 11:48:24 +0100576
577@b set_soname: Do you want to build the versioned version of the library ?
578
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100579If enabled the library will contain a SONAME and SHLIBVERSION and some symlinks will automatically be created between the objects.
580Example:
581 libarm_compute_core.so -> libarm_compute_core.so.1.0.0
582 libarm_compute_core.so.1 -> libarm_compute_core.so.1.0.0
583 libarm_compute_core.so.1.0.0
584
585@note This options is disabled by default as it requires SCons version 2.4 or above.
586
Anthony Barbier79c61782017-06-23 11:48:24 +0100587@b extra_cxx_flags: Custom CXX flags which will be appended to the end of the build command.
588
589@b build_dir: Build the library in a subfolder of the "build" folder. (Allows to build several configurations in parallel).
590
591@b examples: Build or not the examples
592
593@b validation_tests: Enable the build of the validation suite.
594
Anthony Barbier79c61782017-06-23 11:48:24 +0100595@b benchmark_tests: Enable the build of the benchmark tests
596
597@b pmu: Enable the PMU cycle counter to measure execution time in benchmark tests. (Your device needs to support it)
598
Anthony Barbier6a5627a2017-09-26 14:42:02 +0100599@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)
600
Anthony Barbier79c61782017-06-23 11:48:24 +0100601@b openmp Build in the OpenMP scheduler for NEON.
602
603@note Only works when building with g++ not clang++
604
605@b cppthreads Build in the C++11 scheduler for NEON.
606
607@sa arm_compute::Scheduler::set
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100608
Moritz Pflanzer07674de2017-07-21 09:39:36 +0100609@subsection S3_2_linux Building for Linux
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100610
611@subsubsection S3_2_1_library How to build the library ?
612
613For Linux, the library was successfully built and tested using the following Linaro GCC toolchain:
614
615 - gcc-linaro-arm-linux-gnueabihf-4.9-2014.07_linux
616 - gcc-linaro-4.9-2016.02-x86_64_aarch64-linux-gnu
617 - gcc-linaro-6.3.1-2017.02-i686_aarch64-linux-gnu
618
619@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 Barbier20dbb822017-12-13 21:19:39 +0000620@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 Barbier6ff3b192017-09-04 18:44:23 +0100621
622To cross-compile the library in debug mode, with NEON only support, for Linux 32bit:
623
624 scons Werror=1 -j8 debug=1 neon=1 opencl=0 os=linux arch=armv7a
625
626To cross-compile the library in asserts mode, with OpenCL only support, for Linux 64bit:
627
628 scons Werror=1 -j8 debug=0 asserts=1 neon=0 opencl=1 embed_kernels=1 os=linux arch=arm64-v8a
629
Anthony Barbier20dbb822017-12-13 21:19:39 +0000630To cross-compile the library in asserts mode, with GLES_COMPUTE only support, for Linux 64bit:
631
632 scons Werror=1 -j8 debug=0 asserts=1 neon=0 opencl=0 gles_compute=1 embed_kernels=1 os=linux arch=arm64-v8a
633
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100634You can also compile the library natively on an ARM device by using <b>build=native</b>:
635
636 scons Werror=1 -j8 debug=0 neon=1 opencl=0 os=linux arch=arm64-v8a build=native
637 scons Werror=1 -j8 debug=0 neon=1 opencl=0 os=linux arch=armv7a build=native
638
639@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.
640
641For example on a 64bit Debian based system you would have to install <b>g++-arm-linux-gnueabihf</b>
642
643 apt-get install g++-arm-linux-gnueabihf
644
645Then run
646
647 scons Werror=1 -j8 debug=0 neon=1 opencl=0 os=linux arch=armv7a build=cross_compile
648
649or simply remove the build parameter as build=cross_compile is the default value:
650
651 scons Werror=1 -j8 debug=0 neon=1 opencl=0 os=linux arch=armv7a
652
653@attention To cross compile with opencl=1 you need to make sure to have a version of libOpenCL matching your target architecture.
654
655@subsubsection S3_2_2_examples How to manually build the examples ?
656
657The 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.
658
659@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.
660
661To cross compile a NEON example for Linux 32bit:
662
Anthony Barbierb2881fc2017-09-29 17:12:12 +0100663 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 Barbier6ff3b192017-09-04 18:44:23 +0100664
665To cross compile a NEON example for Linux 64bit:
666
Anthony Barbierb2881fc2017-09-29 17:12:12 +0100667 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 Barbier6ff3b192017-09-04 18:44:23 +0100668
669(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)
670
671To cross compile an OpenCL example for Linux 32bit:
672
Anthony Barbierb2881fc2017-09-29 17:12:12 +0100673 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 Barbier6ff3b192017-09-04 18:44:23 +0100674
675To cross compile an OpenCL example for Linux 64bit:
676
Anthony Barbierb2881fc2017-09-29 17:12:12 +0100677 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
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100678
Anthony Barbier14c86a92017-12-14 16:27:41 +0000679To cross compile a GLES example for Linux 32bit:
680
681 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
682
683To cross compile a GLES example for Linux 64bit:
684
685 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
686
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100687(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)
688
Anthony Barbier14c86a92017-12-14 16:27:41 +0000689To 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.
690
691@note The compute library must currently be built with both neon and opencl enabled - neon=1 and opencl=1
Gian Marco Iodicedaec1aa2017-09-29 12:03:18 +0100692
693i.e. to cross compile the "graph_lenet" example for Linux 32bit:
694
Anthony Barbier14c86a92017-12-14 16:27:41 +0000695 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
Gian Marco Iodicedaec1aa2017-09-29 12:03:18 +0100696
697i.e. to cross compile the "graph_lenet" example for Linux 64bit:
698
Isabella Gottardib28f29d2017-11-09 17:05:07 +0000699 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
Gian Marco Iodicedaec1aa2017-09-29 12:03:18 +0100700
701(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)
702
Anthony Barbiere5007472017-10-27 15:01:44 +0100703@note If compiling using static libraries, this order must be followed when linking: arm_compute_graph_static, arm_compute, arm_compute_core
704
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100705To compile natively (i.e directly on an ARM device) for NEON for Linux 32bit:
706
Anthony Barbierb2881fc2017-09-29 17:12:12 +0100707 g++ examples/neon_convolution.cpp utils/Utils.cpp -I. -Iinclude -std=c++11 -mfpu=neon -larm_compute -larm_compute_core -o neon_convolution
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100708
709To compile natively (i.e directly on an ARM device) for NEON for Linux 64bit:
710
Anthony Barbierb2881fc2017-09-29 17:12:12 +0100711 g++ examples/neon_convolution.cpp utils/Utils.cpp -I. -Iinclude -std=c++11 -larm_compute -larm_compute_core -o neon_convolution
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100712
713(notice the only difference with the 32 bit command is that we don't need the -mfpu option)
714
715To compile natively (i.e directly on an ARM device) for OpenCL for Linux 32bit or Linux 64bit:
716
Anthony Barbierb2881fc2017-09-29 17:12:12 +0100717 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 Barbier6ff3b192017-09-04 18:44:23 +0100718
Anthony Barbier14c86a92017-12-14 16:27:41 +0000719To compile natively (i.e directly on an ARM device) for GLES for Linux 32bit or Linux 64bit:
Gian Marco Iodicedaec1aa2017-09-29 12:03:18 +0100720
Anthony Barbier14c86a92017-12-14 16:27:41 +0000721 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
722
723To 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.
724@note The compute library must currently be built with both neon and opencl enabled - neon=1 and opencl=1
725
726i.e. to natively compile the "graph_lenet" example for Linux 32bit:
Gian Marco Iodicedaec1aa2017-09-29 12:03:18 +0100727
Isabella Gottardib28f29d2017-11-09 17:05:07 +0000728 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
Gian Marco Iodicedaec1aa2017-09-29 12:03:18 +0100729
Anthony Barbier14c86a92017-12-14 16:27:41 +0000730i.e. to natively compile the "graph_lenet" example for Linux 64bit:
Gian Marco Iodicedaec1aa2017-09-29 12:03:18 +0100731
Isabella Gottardib28f29d2017-11-09 17:05:07 +0000732 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
Gian Marco Iodicedaec1aa2017-09-29 12:03:18 +0100733
734(notice the only difference with the 32 bit command is that we don't need the -mfpu option)
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100735
Anthony Barbiere5007472017-10-27 15:01:44 +0100736@note If compiling using static libraries, this order must be followed when linking: arm_compute_graph_static, arm_compute, arm_compute_core
737
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100738@note These two commands assume libarm_compute.so is available in your library path, if not add the path to it using -L
739
740To run the built executable simply run:
741
742 LD_LIBRARY_PATH=build ./neon_convolution
743
744or
745
746 LD_LIBRARY_PATH=build ./cl_convolution
747
Moritz Pflanzer07674de2017-07-21 09:39:36 +0100748@subsection S3_3_android Building for Android
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100749
750For Android, the library was successfully built and tested using Google's standalone toolchains:
Anthony Barbiera8a28f62018-02-26 19:16:32 +0000751 - clang++ from NDK r16b for armv7a
752 - clang++ from NDK r16b for arm64-v8a
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100753
754Here is a guide to <a href="https://developer.android.com/ndk/guides/standalone_toolchain.html">create your Android standalone toolchains from the NDK</a>
755
Anthony Barbiera8a28f62018-02-26 19:16:32 +0000756- Download the NDK r16b from here: https://developer.android.com/ndk/downloads/index.html
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100757- Make sure you have Python 2 installed on your machine.
758- Generate the 32 and/or 64 toolchains by running the following commands:
759
Anthony Barbiera8a28f62018-02-26 19:16:32 +0000760 $NDK/build/tools/make_standalone_toolchain.py --arch arm64 --install-dir $MY_TOOLCHAINS/aarch64-linux-android-ndk-r16b --stl gnustl --api 21
761 $NDK/build/tools/make_standalone_toolchain.py --arch arm --install-dir $MY_TOOLCHAINS/arm-linux-android-ndk-r16b --stl gnustl --api 21
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100762
Anthony Barbier14c86a92017-12-14 16:27:41 +0000763@attention Due to some NDK issues make sure you use clang++ & gnustl
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100764
765@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
766
767@subsubsection S3_3_1_library How to build the library ?
768
769@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)
770
771To cross-compile the library in debug mode, with NEON only support, for Android 32bit:
772
773 CXX=clang++ CC=clang scons Werror=1 -j8 debug=1 neon=1 opencl=0 os=android arch=armv7a
774
775To cross-compile the library in asserts mode, with OpenCL only support, for Android 64bit:
776
Anthony Barbier14c86a92017-12-14 16:27:41 +0000777 CXX=clang++ CC=clang scons Werror=1 -j8 debug=0 asserts=1 neon=0 opencl=1 embed_kernels=1 os=android arch=arm64-v8a
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100778
Anthony Barbier20dbb822017-12-13 21:19:39 +0000779To cross-compile the library in asserts mode, with GLES_COMPUTE only support, for Android 64bit:
780
Anthony Barbier14c86a92017-12-14 16:27:41 +0000781 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 Barbier20dbb822017-12-13 21:19:39 +0000782
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100783@subsubsection S3_3_2_examples How to manually build the examples ?
784
785The 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.
786
Anthony Barbierfabb0382017-06-23 14:42:52 +0100787@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.
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100788
789Once you've got your Android standalone toolchain built and added to your path you can do the following:
790
791To cross compile a NEON example:
792
793 #32 bit:
Georgios Pinitas9873ea32017-12-05 15:28:55 +0000794 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 Barbier6ff3b192017-09-04 18:44:23 +0100795 #64 bit:
Anthony Barbier14c86a92017-12-14 16:27:41 +0000796 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 Barbier6ff3b192017-09-04 18:44:23 +0100797
798To cross compile an OpenCL example:
799
800 #32 bit:
Georgios Pinitas9873ea32017-12-05 15:28:55 +0000801 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 Barbier6ff3b192017-09-04 18:44:23 +0100802 #64 bit:
Anthony Barbier14c86a92017-12-14 16:27:41 +0000803 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
804
805To cross compile a GLES example:
Anthony Barbiercc0a80b2017-12-15 11:37:29 +0000806
Anthony Barbier14c86a92017-12-14 16:27:41 +0000807 #32 bit:
808 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
809 #64 bit:
810 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
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100811
Gian Marco Iodicedaec1aa2017-09-29 12:03:18 +0100812To cross compile the examples with the Graph API, such as graph_lenet.cpp, you need to link the library arm_compute_graph also.
813(notice the compute library has to be built with both neon and opencl enabled - neon=1 and opencl=1)
814
815 #32 bit:
Anthony Barbier20dbb822017-12-13 21:19:39 +0000816 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
Gian Marco Iodicedaec1aa2017-09-29 12:03:18 +0100817 #64 bit:
Anthony Barbier14c86a92017-12-14 16:27:41 +0000818 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
Gian Marco Iodicedaec1aa2017-09-29 12:03:18 +0100819
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100820@note Due to some issues in older versions of the Mali OpenCL DDK (<= r13p0), we recommend to link arm_compute statically on Android.
Anthony Barbier20dbb822017-12-13 21:19:39 +0000821@note When linked statically the arm_compute_graph library currently needs the --whole-archive linker flag in order to work properly
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100822
823Then you need to do is upload the executable and the shared library to the device using ADB:
824
825 adb push neon_convolution_arm /data/local/tmp/
826 adb push cl_convolution_arm /data/local/tmp/
Anthony Barbier14c86a92017-12-14 16:27:41 +0000827 adb push gc_absdiff_arm /data/local/tmp/
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100828 adb shell chmod 777 -R /data/local/tmp/
829
830And finally to run the example:
831
832 adb shell /data/local/tmp/neon_convolution_arm
833 adb shell /data/local/tmp/cl_convolution_arm
Anthony Barbier14c86a92017-12-14 16:27:41 +0000834 adb shell /data/local/tmp/gc_absdiff_arm
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100835
836For 64bit:
837
838 adb push neon_convolution_aarch64 /data/local/tmp/
839 adb push cl_convolution_aarch64 /data/local/tmp/
Anthony Barbier14c86a92017-12-14 16:27:41 +0000840 adb push gc_absdiff_aarch64 /data/local/tmp/
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100841 adb shell chmod 777 -R /data/local/tmp/
842
843And finally to run the example:
844
845 adb shell /data/local/tmp/neon_convolution_aarch64
846 adb shell /data/local/tmp/cl_convolution_aarch64
Anthony Barbier14c86a92017-12-14 16:27:41 +0000847 adb shell /data/local/tmp/gc_absdiff_aarch64
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100848
Michalis Spyrou6e52ba32017-10-04 15:40:38 +0100849@subsection S3_4_bare_metal Building for bare metal
850
851For bare metal, the library was successfully built using linaros's latest (gcc-linaro-6.3.1-2017.05) bare metal toolchains:
852 - arm-eabi for armv7a
853 - aarch64-elf for arm64-v8a
854
855Download 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>.
856
857@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
858
859@subsubsection S3_4_1_library How to build the library ?
860
861To cross-compile the library with NEON support for baremetal arm64-v8a:
862
863 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
864
865@subsubsection S3_4_2_examples How to manually build the examples ?
866
867Examples 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>.
868
869@subsection S3_5_windows_host Building on a Windows host system
Moritz Pflanzer07674de2017-07-21 09:39:36 +0100870
871Using `scons` directly from the Windows command line is known to cause
872problems. The reason seems to be that if `scons` is setup for cross-compilation
873it gets confused about Windows style paths (using backslashes). Thus it is
874recommended to follow one of the options outlined below.
875
Michalis Spyrou6e52ba32017-10-04 15:40:38 +0100876@subsubsection S3_5_1_ubuntu_on_windows Bash on Ubuntu on Windows
Moritz Pflanzer07674de2017-07-21 09:39:36 +0100877
878The best and easiest option is to use
879<a href="https://msdn.microsoft.com/en-gb/commandline/wsl/about">Ubuntu on Windows</a>.
880This feature is still marked as *beta* and thus might not be available.
881However, if it is building the library is as simple as opening a *Bash on
882Ubuntu on Windows* shell and following the general guidelines given above.
883
Michalis Spyrou6e52ba32017-10-04 15:40:38 +0100884@subsubsection S3_5_2_cygwin Cygwin
Moritz Pflanzer07674de2017-07-21 09:39:36 +0100885
886If the Windows subsystem for Linux is not available <a href="https://www.cygwin.com/">Cygwin</a>
887can be used to install and run `scons`. In addition to the default packages
888installed by Cygwin `scons` has to be selected in the installer. (`git` might
889also be useful but is not strictly required if you already have got the source
890code of the library.) Linaro provides pre-built versions of
891<a href="http://releases.linaro.org/components/toolchain/binaries/">GCC cross-compilers</a>
892that can be used from the Cygwin terminal. When building for Android the
893compiler is included in the Android standalone toolchain. After everything has
894been set up in the Cygwin terminal the general guide on building the library
895can be followed.
896
Michalis Spyrou6e52ba32017-10-04 15:40:38 +0100897@subsection S3_6_cl_stub_library The OpenCL stub library
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100898
899In 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.
900
901If 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.
902
903@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.
904
905To cross-compile the stub OpenCL library simply run:
906
907 <target-prefix>-gcc -o libOpenCL.so -Iinclude opencl-1.2-stubs/opencl_stubs.c -fPIC -shared
908
909For example:
910
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100911 #Linux 32bit
912 arm-linux-gnueabihf-gcc -o libOpenCL.so -Iinclude opencl-1.2-stubs/opencl_stubs.c -fPIC -shared
913 #Linux 64bit
914 aarch64-linux-gnu-gcc -o libOpenCL.so -Iinclude -shared opencl-1.2-stubs/opencl_stubs.c -fPIC
915 #Android 32bit
916 arm-linux-androideabi-clang -o libOpenCL.so -Iinclude -shared opencl-1.2-stubs/opencl_stubs.c -fPIC -shared
917 #Android 64bit
Anthony Barbier14c86a92017-12-14 16:27:41 +0000918 aarch64-linux-android-clang -o libOpenCL.so -Iinclude -shared opencl-1.2-stubs/opencl_stubs.c -fPIC -shared
919
920@subsection S3_7_gles_stub_library The Linux OpenGLES and EGL stub libraries
921
922In 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.
923
924@note The stub libraries are only needed on Linux. For Android, the NDK toolchains already provide the meta-EGL and meta-GLES libraries.
925
926To cross-compile the stub OpenGLES and EGL libraries simply run:
927
928 <target-prefix>-gcc -o libEGL.so -Iinclude/linux opengles-3.1-stubs/EGL.c -fPIC -shared
929 <target-prefix>-gcc -o libGLESv2.so -Iinclude/linux opengles-3.1-stubs/GLESv2.c -fPIC -shared
930
931 #Linux 32bit
932 arm-linux-gnueabihf-gcc -o libEGL.so -Iinclude/linux opengles-3.1-stubs/EGL.c -fPIC -shared
933 arm-linux-gnueabihf-gcc -o libGLESv2.so -Iinclude/linux opengles-3.1-stubs/GLESv2.c -fPIC -shared
934
935 #Linux 64bit
936 aarch64-linux-gnu-gcc -o libEGL.so -Iinclude/linux opengles-3.1-stubs/EGL.c -fPIC -shared
937 aarch64-linux-gnu-gcc -o libGLESv2.so -Iinclude/linux opengles-3.1-stubs/GLESv2.c -fPIC -shared
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100938*/