blob: c6c0ab2ac5365109dcc8edde6a6e0b2d56131015 [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
Jenkinsb3a371b2018-05-23 11:36:53 +010074 │   │   │   │ ├── assembly --> headers for assembly optimised NEON kernels.
75 │   │   │   │ ├── convolution --> headers for convolution assembly optimised NEON kernels.
76 │   │   │   │   │   ├── common --> headers for code which is common to several convolution implementations.
77 │   │   │   │   │   ├── depthwise --> headers for Depthwise convolultion assembly implementation
78 │   │   │   │   │   └── winograd --> headers for Winograd convolution assembly implementation
79 │   │   │   │ ├── detail --> Common code for several intrinsics implementations.
Anthony Barbierdbdab852017-06-23 15:42:00 +010080 │   │   │   │   └── NE*Kernel.h
81 │   │   │   └── NEKernels.h --> Includes all the NEON kernels at once
82 │   │   ├── All common basic types (Types.h, Window, Coordinates, Iterator, etc.)
83 │   │   ├── All generic objects interfaces (ITensor, IImage, etc.)
84 │   │   └── Objects metadata classes (ImageInfo, TensorInfo, MultiImageInfo)
Kaizen8938bd32017-09-28 14:38:23 +010085 │   ├── graph
Jenkinsb3a371b2018-05-23 11:36:53 +010086 │   │   ├── algorithms
87 │   │   │   └── Generic algorithms used by the graph backend (e.g Order of traversal)
88 │   │   ├── backends --> The backend specific code
89 │   │   │   ├── CL --> OpenCL specific operations
90 │   │   │   ├── GLES --> OpenGLES Compute Shaders specific operations
91 │   │   │   └── NEON --> NEON specific operations
92 │   │   ├── detail
93 │   │   │   └── Collection of internal utilities.
94 │   │   ├── frontend
95 │   │   │   └── Code related to the stream frontend interface.
96 │   │   ├── mutators
97 │   │   │   └── Used to modify / optimise the Graph intermediate representation(Operator fusion, in place operations, etc.)
Kaizen8938bd32017-09-28 14:38:23 +010098 │   │   ├── nodes
99 │   │   │   └── The various nodes supported by the graph API
Jenkinsb3a371b2018-05-23 11:36:53 +0100100 │   │   ├── printers
101 │   │   │   └── Debug printers
Kaizen8938bd32017-09-28 14:38:23 +0100102 │   │   └── Graph objects ( INode, ITensorAccessor, Graph, etc.)
Anthony Barbierdbdab852017-06-23 15:42:00 +0100103 │   └── runtime
104 │   ├── CL
105 │   │   ├── CL objects & allocators (CLArray, CLImage, CLTensor, etc.)
106 │   │   ├── functions --> Folder containing all the OpenCL functions
107 │   │   │   └── CL*.h
Kaizen8938bd32017-09-28 14:38:23 +0100108 │   │   ├── CLScheduler.h --> Interface to enqueue OpenCL kernels and get/set the OpenCL CommandQueue and ICLTuner.
Jenkinsb3a371b2018-05-23 11:36:53 +0100109 │   │   ├── CLFunctions.h --> Includes all the OpenCL functions at once
110 │   │   └── tuners
111 │   │      └── Local workgroup size tuners for specific architectures / GPUs
Anthony Barbierdbdab852017-06-23 15:42:00 +0100112 │   ├── CPP
Kaizen8938bd32017-09-28 14:38:23 +0100113 │      │   ├── CPPKernels.h --> Includes all the CPP functions at once.
Jenkinsb3a371b2018-05-23 11:36:53 +0100114 │   │   ├── CPPScheduler.h --> Basic pool of threads to execute CPP/NEON code on several cores in parallel
115 │   │   └── functions --> Folder containing all the CPP functions
116 │   │      └── CPP*.h
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000117 │   ├── GLES_COMPUTE
118 │   │   ├── GLES objects & allocators (GCArray, GCImage, GCTensor, etc.)
119 │   │   ├── functions --> Folder containing all the GLES functions
120 │   │   │   └── GC*.h
121 │   │   ├── GCScheduler.h --> Interface to enqueue GLES kernels and get/set the GLES CommandQueue.
122 │   │   └── GCFunctions.h --> Includes all the GLES functions at once
Anthony Barbierdbdab852017-06-23 15:42:00 +0100123 │   ├── NEON
124 │   │ ├── functions --> Folder containing all the NEON functions
125 │   │ │   └── NE*.h
126 │   │ └── NEFunctions.h --> Includes all the NEON functions at once
Kaizen8938bd32017-09-28 14:38:23 +0100127 │   ├── OMP
128 │   │   └── OMPScheduler.h --> OpenMP scheduler (Alternative to the CPPScheduler)
129 │ ├── Memory manager files (LifetimeManager, PoolManager, etc.)
Anthony Barbierdbdab852017-06-23 15:42:00 +0100130 │   └── Basic implementations of the generic object interfaces (Array, Image, Tensor, etc.)
Jenkinsc3f34a42018-03-02 12:38:09 +0000131 ├── data -> Contains test images and reference data dumps used by validation tests
132 ├── docs -> Contains Doxyfile and Doxygen sources used to generate the HTML pages in the documentation folder.
Anthony Barbierdbdab852017-06-23 15:42:00 +0100133 ├── documentation
134 │   ├── index.xhtml
135 │   └── ...
136 ├── documentation.xhtml -> documentation/index.xhtml
137 ├── examples
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000138 │   ├── cl_*.cpp --> OpenCL examples
139 │   ├── gc_*.cpp --> GLES compute shaders examples
140 │   ├── graph_*.cpp --> Graph examples
141 │   ├── neoncl_*.cpp --> NEON / OpenCL interoperability examples
142 │   └── neon_*.cpp --> NEON examples
Jenkinsb3a371b2018-05-23 11:36:53 +0100143 ├── graph.h --> Includes all the Graph headers at once.
Anthony Barbierdbdab852017-06-23 15:42:00 +0100144 ├── include
Kaizen8938bd32017-09-28 14:38:23 +0100145 │   ├── CL
146 │   │ └── Khronos OpenCL C headers and C++ wrapper
147 │   ├── half --> FP16 library available from http://half.sourceforge.net
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000148 │   ├── libnpy --> Library to load / write npy buffers, available from https://github.com/llohse/libnpy
149 │  └── linux --> Headers only needed for Linux builds
150 │   └── Khronos EGL and OpenGLES headers
Anthony Barbierdbdab852017-06-23 15:42:00 +0100151 ├── opencl-1.2-stubs
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000152 │ └── opencl_stubs.c --> OpenCL stubs implementation
153 ├── opengles-3.1-stubs
154 │   ├── EGL.c --> EGL stubs implementation
155 │   └── GLESv2.c --> GLESv2 stubs implementation
Kaizen8938bd32017-09-28 14:38:23 +0100156 ├── scripts
157 │   ├── caffe_data_extractor.py --> Basic script to export weights from Caffe to npy files
158 │   └── tensorflow_data_extractor.py --> Basic script to export weights from Tensor Flow to npy files
Anthony Barbierdbdab852017-06-23 15:42:00 +0100159 ├── src
160 │   ├── core
161 │ │ └── ... (Same structure as headers)
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000162 │   │ ├── CL
163 │   │ │ └── cl_kernels --> All the OpenCL kernels
164 │   │ └── GLES_COMPUTE
165 │   │ └── cs_shaders --> All the OpenGL ES Compute Shaders
Kaizen8938bd32017-09-28 14:38:23 +0100166 │   ├── graph
167 │ │ └── ... (Same structure as headers)
Anthony Barbierdbdab852017-06-23 15:42:00 +0100168 │ └── runtime
169 │ └── ... (Same structure as headers)
Kaizen8938bd32017-09-28 14:38:23 +0100170 ├── support
171 │ └── Various headers to work around toolchains / platform issues.
Anthony Barbierdbdab852017-06-23 15:42:00 +0100172 ├── tests
173 │   ├── All test related files shared between validation and benchmark
Jenkinsb3a371b2018-05-23 11:36:53 +0100174 │   ├── benchmark --> Sources for benchmarking
175 │ │ ├── Benchmark specific files
176 │   │ ├── fixtures
177 │ │ │ └── Backend agnostic fixtures to initialise and run the functions to test.
178 │ │ ├── CL --> OpenCL benchmarking tests
179 │ │ ├── GLES_COMPUTE --> GLES benchmarking tests
180 │ │ └── NEON --> NEON benchmarking tests
Kaizen8938bd32017-09-28 14:38:23 +0100181 │   ├── CL --> OpenCL accessors
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000182 │   ├── GLES_COMPUTE --> GLES accessors
Kaizen8938bd32017-09-28 14:38:23 +0100183 │   ├── NEON --> NEON accessors
Kaizen8938bd32017-09-28 14:38:23 +0100184 │   ├── datasets
185 │ │ └── Datasets for all the validation / benchmark tests, layer configurations for various networks, etc.
186 │   ├── framework
187 │ │ └── Boiler plate code for both validation and benchmark test suites (Command line parsers, instruments, output loggers, etc.)
188 │   ├── networks
189 │ │ └── Examples of how to instantiate networks.
Jenkinsb3a371b2018-05-23 11:36:53 +0100190 │   └── validation --> Sources for validation
191 │ ├── Validation specific files
192 │   ├── fixtures
193 │ │ └── Backend agnostic fixtures to initialise and run the functions to test.
194 │   ├── reference
195 │ │ └── Reference implementation used to validate the results of the various backends.
196 │ ├── CL --> OpenCL validation tests
197 │ ├── GLES_COMPUTE --> GLES validation tests
198 │ ├── CPP --> C++ reference implementations
199 │ └── NEON --> NEON validation tests
Anthony Barbierdbdab852017-06-23 15:42:00 +0100200 └── utils --> Boiler plate code used by examples
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000201 └── Various utilities to print types, load / store assets, etc.
Anthony Barbierdbdab852017-06-23 15:42:00 +0100202
203@section S2_versions_changelog Release versions and changelog
204
205@subsection S2_1_versions Release versions
206
207All releases are numbered vYY.MM Where YY are the last two digits of the year, and MM the month number.
208If there is more than one release in a month then an extra sequential number is appended at the end:
209
210 v17.03 (First release of March 2017)
211 v17.03.1 (Second release of March 2017)
212 v17.04 (First release of April 2017)
213
214@note We're aiming at releasing one major public release with new features per quarter. All releases in between will only contain bug fixes.
215
216@subsection S2_2_changelog Changelog
217
Jenkinsb3a371b2018-05-23 11:36:53 +0100218v18.05 Public maintenance release
219 - Various bug fixes.
220 - Various optimisations.
221 - Major redesign in the interface for the neon kernels implemented in assembly.
222 - Removed arm_compute::NEGEMMLowpAArch64A53Kernel / arm_compute::NEGEMMLowpAArch64Kernel / arm_compute::NEGEMMLowpAArch64V8P4Kernel / arm_compute::NEGEMMInterleavedBlockedKernel / arm_compute::NEGEMMLowpAssemblyMatrixMultiplyCore / arm_compute::NEHGEMMAArch64FP16Kernel
223 - Added NEGEMMAssemblyWrapper and AssemblyKernelGlue which are used to execute assembly kernels in neon functions.
224 - Minor changes to the CPUInfo type to make it compatible with the new assembly gemm interface.
225 - Moved neon assembly kernels to the folder src/core/NEON/kernels/arm_gemm.
226 - Improved doxygen documentation.
227 - Improved memory management for layer's transitions.
228 - Added support for NHWC data layout in tensors.
229 - Added NHWC data layout support to:
230 - @ref NEGEMMConvolutionLayer
231 - @ref NEDirectConvolutionLayer
232 - @ref NEPoolingLayer / @ref CLPoolingLayer
233 - @ref NEBatchNormalizationLayer / @ref CLBatchNormalizationLayer
234 - @ref NEDepthwiseConvolutionLayer
235 - @ref NEScale
236 - @ref NEIm2Col
237 - Added support for dilated convolutions in @ref NEConvolutionLayer and @ref CLConvolutionLayer.
238 - New OpenCL kernels / functions:
239 - @ref CLChannelShuffleLayer / @ref CLChannelShuffleLayerKernel
240 - @ref CLConvertFullyConnectedWeightsKernel / @ref CLConvertFullyConnectedWeights
241 - @ref CLCopy / @ref CLCopyKernel
242 - @ref CLLSTMLayer
243 - @ref CLRNNLayer
244 - @ref CLWidthConcatenateLayer / @ref CLWidthConcatenateLayerKernel
245 - @ref CLWinogradFilterTransformKernel / @ref CLWinogradInputTransformKernel / @ref CLWinogradConvolutionLayer
246 - @ref CLWinogradInputTransformKernel / @ref CLWinogradInputTransform
247 - New Neon kernels / functions:
248 - @ref CLRNNLayer
249 - @ref NEConvertFullyConnectedWeightsKernel / @ref NEConvertFullyConnectedWeights.
250 - Created the validate method in @ref CLDepthwiseConvolutionLayer.
251 - Beta and gamma are no longer mandatory arguments in @ref NEBatchNormalizationLayer and @ref CLBatchNormalizationLayer.
252 - Added depth multiplier support in @ref NEDepthwiseConvolutionLayer and @ref CLDepthwiseConvolutionLayer.
253 - Added broadcast multiply support in @ref NEPixelWiseMultiplication / @ref NEPixelWiseMultiplicationKernel.
254 - Port mobilenet example to NHWC data layout.
255 - Enabled Winograd method in @ref CLConvolutionLayer.
256 - Renamed NEWinogradLayer to @ref NEWinogradConvolutionLayer.
257 - Updated @ref NEWinogradConvolutionLayer to use highly optimised assembly kernels in src/core/NEON/kernels/arm_gemm.
258 - Added memory manager support in GLES functions.
259 - Major refactoring of the graph API.
260 - Added GLES backend in the graph API.
261 - Added support for the memory manager in the graph API.
262 - Enabled Winograd Convolution method in the graph API.
263 - Added support for grouped convolutions in the graph API.
264 - Replaced NEDeconvolutionLayerUpsampleKernel with @ref NEScaleKernel in @ref NEDeconvolutionLayer.
265 - Added fast maths flag in @ref CLConvolutionLayer.
266 - Added new tests and benchmarks in validation and benchmark frameworks
267 - Merge Activation layer with Convolution Layer (NEON. CL, GLES)
268 - Added support to OpenCL 2.0 SVM
269 - Added support to import memory in OpenCL tensors.
270 - Added the prepare() method to perform any one off pre-processing before running the function.
271 - Added new examples:
272 - graph_inception_v4.cpp
273 - graph_resnext50.cpp
274 - Added memory measurement instrument for CL.
275
Jenkinsc3f34a42018-03-02 12:38:09 +0000276v18.03 Public maintenance release
277 - Various bug fixes.
278 - Fixed bug in @ref NEActivationLayer
279 - Fix in @ref CLTuner when using batches.
280 - Updated recommended NDK version to r16b (And fixed warnings).
281 - Fixed bug in validation code.
282 - Added Inception v4 graph example.
Jenkinsb3a371b2018-05-23 11:36:53 +0100283 - Renamed NEWinogradLayer.cpp to @ref NEWinogradConvolutionLayer
Jenkinsc3f34a42018-03-02 12:38:09 +0000284
Anthony Barbier06ea0482018-02-22 15:45:35 +0000285v18.02 Public major release
286 - Various NEON / OpenCL / GLES optimisations.
287 - Various bug fixes.
288 - Changed default number of threads on big LITTLE systems.
289 - Refactored examples and added:
290 - graph_mobilenet_qassym8
291 - graph_resnet
292 - graph_squeezenet_v1_1
Jenkinsc3f34a42018-03-02 12:38:09 +0000293 - Renamed @ref CLConvolutionLayer into @ref CLGEMMConvolutionLayer and created a new @ref CLConvolutionLayer to select the fastest convolution method.
294 - 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 +0000295 - Added in place support to:
Jenkinsc3f34a42018-03-02 12:38:09 +0000296 - @ref CLActivationLayer
297 - @ref CLBatchNormalizationLayer
Anthony Barbier06ea0482018-02-22 15:45:35 +0000298 - Added QASYMM8 support to:
Jenkinsc3f34a42018-03-02 12:38:09 +0000299 - @ref CLActivationLayer
300 - @ref CLDepthwiseConvolutionLayer
301 - @ref NEDepthwiseConvolutionLayer
302 - @ref NESoftmaxLayer
Anthony Barbier06ea0482018-02-22 15:45:35 +0000303 - Added FP16 support to:
Jenkinsc3f34a42018-03-02 12:38:09 +0000304 - @ref CLDepthwiseConvolutionLayer3x3
305 - @ref CLDepthwiseConvolutionLayer
306 - Added broadcasting support to @ref NEArithmeticAddition / @ref CLArithmeticAddition / @ref CLPixelWiseMultiplication
307 - Added fused batched normalization and activation to @ref CLBatchNormalizationLayer and @ref NEBatchNormalizationLayer
308 - Added support for non-square pooling to @ref NEPoolingLayer and @ref CLPoolingLayer
Anthony Barbier06ea0482018-02-22 15:45:35 +0000309 - New OpenCL kernels / functions:
Jenkinsc3f34a42018-03-02 12:38:09 +0000310 - @ref CLDirectConvolutionLayerOutputStageKernel
Anthony Barbier06ea0482018-02-22 15:45:35 +0000311 - New NEON kernels / functions
312 - Added name() method to all kernels.
313 - Added support for Winograd 5x5.
Jenkinsc3f34a42018-03-02 12:38:09 +0000314 - @ref NEPermuteKernel / @ref NEPermute
Jenkinsb3a371b2018-05-23 11:36:53 +0100315 - @ref NEWinogradLayerTransformInputKernel / NEWinogradLayer
316 - @ref NEWinogradLayerTransformOutputKernel / NEWinogradLayer
317 - @ref NEWinogradLayerTransformWeightsKernel / NEWinogradLayer
Jenkinsc3f34a42018-03-02 12:38:09 +0000318 - Renamed NEWinogradLayerKernel into @ref NEWinogradLayerBatchedGEMMKernel
Anthony Barbier06ea0482018-02-22 15:45:35 +0000319 - New GLES kernels / functions:
Jenkinsc3f34a42018-03-02 12:38:09 +0000320 - @ref GCTensorShiftKernel / @ref GCTensorShift
Anthony Barbier06ea0482018-02-22 15:45:35 +0000321
Anthony Barbierf45d5a92018-01-24 16:23:15 +0000322v18.01 Public maintenance release
323 - Various bug fixes
324 - Added some of the missing validate() methods
Jenkinsc3f34a42018-03-02 12:38:09 +0000325 - Added @ref CLDeconvolutionLayerUpsampleKernel / @ref CLDeconvolutionLayer @ref CLDeconvolutionLayerUpsample
326 - Added @ref CLPermuteKernel / @ref CLPermute
Anthony Barbierf45d5a92018-01-24 16:23:15 +0000327 - Added method to clean the programs cache in the CL Kernel library.
Jenkinsc3f34a42018-03-02 12:38:09 +0000328 - Added @ref GCArithmeticAdditionKernel / @ref GCArithmeticAddition
329 - Added @ref GCDepthwiseConvolutionLayer3x3Kernel / @ref GCDepthwiseConvolutionLayer3x3
330 - Added @ref GCNormalizePlanarYUVLayerKernel / @ref GCNormalizePlanarYUVLayer
331 - Added @ref GCScaleKernel / @ref GCScale
332 - Added @ref GCWeightsReshapeKernel / @ref GCConvolutionLayer
Anthony Barbierf45d5a92018-01-24 16:23:15 +0000333 - Added FP16 support to the following GLES compute kernels:
Jenkinsc3f34a42018-03-02 12:38:09 +0000334 - @ref GCCol2ImKernel
335 - @ref GCGEMMInterleave4x4Kernel
336 - @ref GCGEMMTranspose1xWKernel
337 - @ref GCIm2ColKernel
338 - Refactored NEON Winograd (NEWinogradLayerKernel)
339 - Added @ref NEDirectConvolutionLayerOutputStageKernel
Anthony Barbierf45d5a92018-01-24 16:23:15 +0000340 - Added QASYMM8 support to the following NEON kernels:
Jenkinsc3f34a42018-03-02 12:38:09 +0000341 - @ref NEDepthwiseConvolutionLayer3x3Kernel
342 - @ref NEFillBorderKernel
343 - @ref NEPoolingLayerKernel
Anthony Barbierf45d5a92018-01-24 16:23:15 +0000344 - Added new examples:
345 - graph_cl_mobilenet_qasymm8.cpp
346 - graph_inception_v3.cpp
347 - gc_dc.cpp
348 - More tests added to both validation and benchmarking suites.
349
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000350v17.12 Public major release
351 - Most machine learning functions on OpenCL support the new data type QASYMM8
352 - Introduced logging interface
353 - Introduced opencl timer
354 - Reworked GEMMLowp interface
355 - Added new NEON assembly kernels for GEMMLowp, SGEMM and HGEMM
356 - Added validation method for most Machine Learning kernels / functions
357 - Added new graph examples such as googlenet, mobilenet, squeezenet, vgg16 and vgg19
358 - Added sgemm example for OpenCL
359 - Added absolute difference example for GLES compute
360 - Added new tests and benchmarks in validation and benchmark frameworks
361 - Added new kernels / functions for GLES compute
362
363 - New OpenGL ES kernels / functions
Jenkinsc3f34a42018-03-02 12:38:09 +0000364 - @ref GCAbsoluteDifferenceKernel / @ref GCAbsoluteDifference
365 - @ref GCActivationLayerKernel / @ref GCActivationLayer
366 - @ref GCBatchNormalizationLayerKernel / @ref GCBatchNormalizationLayer
367 - @ref GCCol2ImKernel
368 - @ref GCDepthConcatenateLayerKernel / @ref GCDepthConcatenateLayer
369 - @ref GCDirectConvolutionLayerKernel / @ref GCDirectConvolutionLayer
370 - @ref GCDropoutLayerKernel / @ref GCDropoutLayer
371 - @ref GCFillBorderKernel / @ref GCFillBorder
372 - @ref GCGEMMInterleave4x4Kernel / @ref GCGEMMInterleave4x4
373 - @ref GCGEMMMatrixAccumulateBiasesKernel / @ref GCGEMMMatrixAdditionKernel / @ref GCGEMMMatrixMultiplyKernel / @ref GCGEMM
374 - @ref GCGEMMTranspose1xWKernel / @ref GCGEMMTranspose1xW
375 - @ref GCIm2ColKernel
376 - @ref GCNormalizationLayerKernel / @ref GCNormalizationLayer
377 - @ref GCPixelWiseMultiplicationKernel / @ref GCPixelWiseMultiplication
378 - @ref GCPoolingLayerKernel / @ref GCPoolingLayer
379 - @ref GCLogits1DMaxKernel / @ref GCLogits1DShiftExpSumKernel / @ref GCLogits1DNormKernel / @ref GCSoftmaxLayer
380 - @ref GCTransposeKernel / @ref GCTranspose
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000381
382 - New NEON kernels / functions
Jenkinsb3a371b2018-05-23 11:36:53 +0100383 - arm_compute::NEGEMMLowpAArch64A53Kernel / arm_compute::NEGEMMLowpAArch64Kernel / arm_compute::NEGEMMLowpAArch64V8P4Kernel / arm_compute::NEGEMMInterleavedBlockedKernel / arm_compute::NEGEMMLowpAssemblyMatrixMultiplyCore
384 - arm_compute::NEHGEMMAArch64FP16Kernel
Jenkinsc3f34a42018-03-02 12:38:09 +0000385 - @ref NEDepthwiseConvolutionLayer3x3Kernel / @ref NEDepthwiseIm2ColKernel / @ref NEGEMMMatrixVectorMultiplyKernel / @ref NEDepthwiseVectorToTensorKernel / @ref NEDepthwiseConvolutionLayer
386 - @ref NEGEMMLowpOffsetContributionKernel / @ref NEGEMMLowpMatrixAReductionKernel / @ref NEGEMMLowpMatrixBReductionKernel / @ref NEGEMMLowpMatrixMultiplyCore
387 - @ref NEGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPointKernel / @ref NEGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPoint
388 - @ref NEGEMMLowpQuantizeDownInt32ToUint8ScaleKernel / @ref NEGEMMLowpQuantizeDownInt32ToUint8Scale
Jenkinsb3a371b2018-05-23 11:36:53 +0100389 - NEWinogradLayer / NEWinogradLayerKernel
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000390
391 - New OpenCL kernels / functions
Jenkinsc3f34a42018-03-02 12:38:09 +0000392 - @ref CLGEMMLowpOffsetContributionKernel / @ref CLGEMMLowpMatrixAReductionKernel / @ref CLGEMMLowpMatrixBReductionKernel / @ref CLGEMMLowpMatrixMultiplyCore
393 - @ref CLGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPointKernel / @ref CLGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPoint
394 - @ref CLGEMMLowpQuantizeDownInt32ToUint8ScaleKernel / @ref CLGEMMLowpQuantizeDownInt32ToUint8Scale
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000395
396 - New graph nodes for NEON and OpenCL
Jenkinsb3a371b2018-05-23 11:36:53 +0100397 - graph::BranchLayer
398 - graph::DepthConvertLayer
399 - graph::DepthwiseConvolutionLayer
400 - graph::DequantizationLayer
401 - graph::FlattenLayer
402 - graph::QuantizationLayer
403 - graph::ReshapeLayer
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000404
Kaizenbf8b01d2017-10-12 14:26:51 +0100405v17.10 Public maintenance release
406 - Bug fixes:
407 - Check the maximum local workgroup size supported by OpenCL devices
408 - Minor documentation updates (Fixed instructions to build the examples)
Jenkinsc3f34a42018-03-02 12:38:09 +0000409 - Introduced a graph::GraphContext
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000410 - Added a few new Graph nodes, support for branches and grouping.
Kaizenbf8b01d2017-10-12 14:26:51 +0100411 - Automatically enable cl_printf in debug builds
412 - Fixed bare metal builds for armv7a
413 - Added AlexNet and cartoon effect examples
414 - 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)
415
Kaizen8938bd32017-09-28 14:38:23 +0100416v17.09 Public major release
417 - Experimental Graph support: initial implementation of a simple stream API to easily chain machine learning layers.
Jenkinsc3f34a42018-03-02 12:38:09 +0000418 - 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 +0100419 - New validation and benchmark frameworks (Boost and Google frameworks replaced by homemade framework).
420 - Most machine learning functions support both fixed point 8 and 16 bit (QS8, QS16) for both NEON and OpenCL.
421 - New NEON kernels / functions:
Jenkinsb3a371b2018-05-23 11:36:53 +0100422 - arm_compute::NEGEMMAssemblyBaseKernel arm_compute::NEGEMMAArch64Kernel
Jenkinsc3f34a42018-03-02 12:38:09 +0000423 - @ref NEDequantizationLayerKernel / @ref NEDequantizationLayer
424 - @ref NEFloorKernel / @ref NEFloor
425 - @ref NEL2NormalizeLayerKernel / @ref NEL2NormalizeLayer
426 - @ref NEQuantizationLayerKernel @ref NEMinMaxLayerKernel / @ref NEQuantizationLayer
427 - @ref NEROIPoolingLayerKernel / @ref NEROIPoolingLayer
428 - @ref NEReductionOperationKernel / @ref NEReductionOperation
429 - @ref NEReshapeLayerKernel / @ref NEReshapeLayer
Kaizen8938bd32017-09-28 14:38:23 +0100430
431 - New OpenCL kernels / functions:
Jenkinsb3a371b2018-05-23 11:36:53 +0100432 - @ref CLDepthwiseConvolutionLayer3x3NCHWKernel @ref CLDepthwiseConvolutionLayer3x3NHWCKernel @ref CLDepthwiseIm2ColKernel @ref CLDepthwiseVectorToTensorKernel @ref CLDepthwiseWeightsReshapeKernel / @ref CLDepthwiseConvolutionLayer3x3 @ref CLDepthwiseConvolutionLayer @ref CLDepthwiseSeparableConvolutionLayer
Jenkinsc3f34a42018-03-02 12:38:09 +0000433 - @ref CLDequantizationLayerKernel / @ref CLDequantizationLayer
434 - @ref CLDirectConvolutionLayerKernel / @ref CLDirectConvolutionLayer
435 - @ref CLFlattenLayer
436 - @ref CLFloorKernel / @ref CLFloor
437 - @ref CLGEMMTranspose1xW
438 - @ref CLGEMMMatrixVectorMultiplyKernel
439 - @ref CLL2NormalizeLayerKernel / @ref CLL2NormalizeLayer
440 - @ref CLQuantizationLayerKernel @ref CLMinMaxLayerKernel / @ref CLQuantizationLayer
441 - @ref CLROIPoolingLayerKernel / @ref CLROIPoolingLayer
442 - @ref CLReductionOperationKernel / @ref CLReductionOperation
443 - @ref CLReshapeLayerKernel / @ref CLReshapeLayer
Kaizen8938bd32017-09-28 14:38:23 +0100444
Anthony Barbierdbdab852017-06-23 15:42:00 +0100445v17.06 Public major release
446 - Various bug fixes
447 - Added support for fixed point 8 bit (QS8) to the various NEON machine learning kernels.
448 - Added unit tests and benchmarks (AlexNet, LeNet)
449 - Added support for sub tensors.
450 - Added infrastructure to provide GPU specific optimisation for some OpenCL kernels.
Jenkinsc3f34a42018-03-02 12:38:09 +0000451 - Added @ref OMPScheduler (OpenMP) scheduler for NEON
452 - Added @ref SingleThreadScheduler scheduler for NEON (For bare metal)
453 - User can specify his own scheduler by implementing the @ref IScheduler interface.
Anthony Barbierdbdab852017-06-23 15:42:00 +0100454 - New OpenCL kernels / functions:
Jenkinsc3f34a42018-03-02 12:38:09 +0000455 - @ref CLBatchNormalizationLayerKernel / @ref CLBatchNormalizationLayer
456 - @ref CLDepthConcatenateLayerKernel / @ref CLDepthConcatenateLayer
457 - @ref CLHOGOrientationBinningKernel @ref CLHOGBlockNormalizationKernel, @ref CLHOGDetectorKernel / @ref CLHOGDescriptor @ref CLHOGDetector @ref CLHOGGradient @ref CLHOGMultiDetection
458 - @ref CLLocallyConnectedMatrixMultiplyKernel / @ref CLLocallyConnectedLayer
459 - @ref CLWeightsReshapeKernel / @ref CLConvolutionLayerReshapeWeights
Anthony Barbierdbdab852017-06-23 15:42:00 +0100460 - New C++ kernels:
Jenkinsc3f34a42018-03-02 12:38:09 +0000461 - @ref CPPDetectionWindowNonMaximaSuppressionKernel
Anthony Barbierdbdab852017-06-23 15:42:00 +0100462 - New NEON kernels / functions:
Jenkinsc3f34a42018-03-02 12:38:09 +0000463 - @ref NEBatchNormalizationLayerKernel / @ref NEBatchNormalizationLayer
464 - @ref NEDepthConcatenateLayerKernel / @ref NEDepthConcatenateLayer
465 - @ref NEDirectConvolutionLayerKernel / @ref NEDirectConvolutionLayer
466 - @ref NELocallyConnectedMatrixMultiplyKernel / @ref NELocallyConnectedLayer
467 - @ref NEWeightsReshapeKernel / @ref NEConvolutionLayerReshapeWeights
Anthony Barbierdbdab852017-06-23 15:42:00 +0100468
469v17.05 Public bug fixes release
470 - Various bug fixes
471 - Remaining of the functions ported to use accurate padding.
472 - Library does not link against OpenCL anymore (It uses dlopen / dlsym at runtime instead to determine whether or not OpenCL is available).
473 - Added "free" method to allocator.
474 - Minimum version of g++ required for armv7 Linux changed from 4.8 to 4.9
475
476v17.04 Public bug fixes release
477
478 The following functions have been ported to use the new accurate padding:
Jenkinsc3f34a42018-03-02 12:38:09 +0000479 - @ref CLColorConvertKernel
480 - @ref CLEdgeNonMaxSuppressionKernel
481 - @ref CLEdgeTraceKernel
482 - @ref CLGaussianPyramidHorKernel
483 - @ref CLGaussianPyramidVertKernel
484 - @ref CLGradientKernel
485 - @ref NEChannelCombineKernel
486 - @ref NEFillArrayKernel
487 - @ref NEGaussianPyramidHorKernel
488 - @ref NEGaussianPyramidVertKernel
489 - @ref NEHarrisScoreFP16Kernel
490 - @ref NEHarrisScoreKernel
491 - @ref NEHOGDetectorKernel
492 - @ref NELogits1DMaxKernel
493 - NELogits1DShiftExpSumKernel
494 - NELogits1DNormKernel
495 - @ref NENonMaximaSuppression3x3FP16Kernel
496 - @ref NENonMaximaSuppression3x3Kernel
Anthony Barbierdbdab852017-06-23 15:42:00 +0100497
Anthony Barbierdbdab852017-06-23 15:42:00 +0100498v17.03.1 First Major public release of the sources
499 - Renamed the library to arm_compute
500 - New CPP target introduced for C++ kernels shared between NEON and CL functions.
501 - New padding calculation interface introduced and ported most kernels / functions to use it.
502 - New OpenCL kernels / functions:
Jenkinsc3f34a42018-03-02 12:38:09 +0000503 - @ref CLGEMMLowpMatrixMultiplyKernel / CLGEMMLowp
Anthony Barbierdbdab852017-06-23 15:42:00 +0100504 - New NEON kernels / functions:
Jenkinsc3f34a42018-03-02 12:38:09 +0000505 - @ref NENormalizationLayerKernel / @ref NENormalizationLayer
506 - @ref NETransposeKernel / @ref NETranspose
507 - @ref NELogits1DMaxKernel, NELogits1DShiftExpSumKernel, NELogits1DNormKernel / @ref NESoftmaxLayer
508 - @ref NEIm2ColKernel, @ref NECol2ImKernel, NEConvolutionLayerWeightsReshapeKernel / @ref NEConvolutionLayer
509 - @ref NEGEMMMatrixAccumulateBiasesKernel / @ref NEFullyConnectedLayer
510 - @ref NEGEMMLowpMatrixMultiplyKernel / NEGEMMLowp
Anthony Barbierdbdab852017-06-23 15:42:00 +0100511
512v17.03 Sources preview
513 - New OpenCL kernels / functions:
Jenkinsc3f34a42018-03-02 12:38:09 +0000514 - @ref CLGradientKernel, @ref CLEdgeNonMaxSuppressionKernel, @ref CLEdgeTraceKernel / @ref CLCannyEdge
515 - GEMM refactoring + FP16 support: @ref CLGEMMInterleave4x4Kernel, @ref CLGEMMTranspose1xWKernel, @ref CLGEMMMatrixMultiplyKernel, @ref CLGEMMMatrixAdditionKernel / @ref CLGEMM
516 - @ref CLGEMMMatrixAccumulateBiasesKernel / @ref CLFullyConnectedLayer
517 - @ref CLTransposeKernel / @ref CLTranspose
518 - @ref CLLKTrackerInitKernel, @ref CLLKTrackerStage0Kernel, @ref CLLKTrackerStage1Kernel, @ref CLLKTrackerFinalizeKernel / @ref CLOpticalFlow
519 - @ref CLNormalizationLayerKernel / @ref CLNormalizationLayer
520 - @ref CLLaplacianPyramid, @ref CLLaplacianReconstruct
Anthony Barbierdbdab852017-06-23 15:42:00 +0100521 - New NEON kernels / functions:
Jenkinsc3f34a42018-03-02 12:38:09 +0000522 - @ref NEActivationLayerKernel / @ref NEActivationLayer
523 - GEMM refactoring + FP16 support (Requires armv8.2 CPU): @ref NEGEMMInterleave4x4Kernel, @ref NEGEMMTranspose1xWKernel, @ref NEGEMMMatrixMultiplyKernel, @ref NEGEMMMatrixAdditionKernel / @ref NEGEMM
524 - @ref NEPoolingLayerKernel / @ref NEPoolingLayer
Anthony Barbierdbdab852017-06-23 15:42:00 +0100525
526v17.02.1 Sources preview
527 - New OpenCL kernels / functions:
Jenkinsc3f34a42018-03-02 12:38:09 +0000528 - @ref CLLogits1DMaxKernel, @ref CLLogits1DShiftExpSumKernel, @ref CLLogits1DNormKernel / @ref CLSoftmaxLayer
529 - @ref CLPoolingLayerKernel / @ref CLPoolingLayer
530 - @ref CLIm2ColKernel, @ref CLCol2ImKernel, CLConvolutionLayerWeightsReshapeKernel / @ref CLConvolutionLayer
531 - @ref CLRemapKernel / @ref CLRemap
532 - @ref CLGaussianPyramidHorKernel, @ref CLGaussianPyramidVertKernel / @ref CLGaussianPyramid, @ref CLGaussianPyramidHalf, @ref CLGaussianPyramidOrb
533 - @ref CLMinMaxKernel, @ref CLMinMaxLocationKernel / @ref CLMinMaxLocation
534 - @ref CLNonLinearFilterKernel / @ref CLNonLinearFilter
Anthony Barbierdbdab852017-06-23 15:42:00 +0100535 - New NEON FP16 kernels (Requires armv8.2 CPU)
Jenkinsc3f34a42018-03-02 12:38:09 +0000536 - @ref NEAccumulateWeightedFP16Kernel
537 - @ref NEBox3x3FP16Kernel
538 - @ref NENonMaximaSuppression3x3FP16Kernel
Anthony Barbierdbdab852017-06-23 15:42:00 +0100539
540v17.02 Sources preview
541 - New OpenCL kernels / functions:
Jenkinsc3f34a42018-03-02 12:38:09 +0000542 - @ref CLActivationLayerKernel / @ref CLActivationLayer
543 - @ref CLChannelCombineKernel / @ref CLChannelCombine
544 - @ref CLDerivativeKernel / @ref CLChannelExtract
545 - @ref CLFastCornersKernel / @ref CLFastCorners
546 - @ref CLMeanStdDevKernel / @ref CLMeanStdDev
Anthony Barbierdbdab852017-06-23 15:42:00 +0100547 - New NEON kernels / functions:
Jenkinsc3f34a42018-03-02 12:38:09 +0000548 - HOG / SVM: @ref NEHOGOrientationBinningKernel, @ref NEHOGBlockNormalizationKernel, @ref NEHOGDetectorKernel, NEHOGNonMaximaSuppressionKernel / @ref NEHOGDescriptor, @ref NEHOGDetector, @ref NEHOGGradient, @ref NEHOGMultiDetection
549 - @ref NENonLinearFilterKernel / @ref NENonLinearFilter
Anthony Barbierdbdab852017-06-23 15:42:00 +0100550 - Introduced a CLScheduler to manage the default context and command queue used by the runtime library and create synchronisation events.
551 - Switched all the kernels / functions to use tensors instead of images.
552 - Updated documentation to include instructions to build the library from sources.
553
554v16.12 Binary preview release
555 - Original release
556
557@section S3_how_to_build How to build the library and the examples
558
559@subsection S3_1_build_options Build options
560
561scons 2.3 or above is required to build the library.
562To see the build options available simply run ```scons -h```:
563
564 debug: Debug (yes|no)
565 default: False
566 actual: False
567
568 asserts: Enable asserts (this flag is forced to 1 for debug=1) (yes|no)
569 default: False
570 actual: False
571
572 arch: Target Architecture (armv7a|arm64-v8a|arm64-v8.2-a|x86_32|x86_64)
573 default: armv7a
574 actual: armv7a
575
576 os: Target OS (linux|android|bare_metal)
577 default: linux
578 actual: linux
579
Anthony Barbier06ea0482018-02-22 15:45:35 +0000580 build: Build type (native|cross_compile|embed_only)
Anthony Barbierdbdab852017-06-23 15:42:00 +0100581 default: cross_compile
582 actual: cross_compile
583
584 examples: Build example programs (yes|no)
585 default: True
586 actual: True
587
588 Werror: Enable/disable the -Werror compilation flag (yes|no)
589 default: True
590 actual: True
591
592 opencl: Enable OpenCL support (yes|no)
593 default: True
594 actual: True
595
596 neon: Enable Neon support (yes|no)
597 default: False
598 actual: False
599
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000600 gles_compute: Enable OpenGL ES Compute Shader support (yes|no)
601 default: False
602 actual: False
603
604 embed_kernels: Embed OpenCL kernels and OpenGL ES compute shader in library binary (yes|no)
Anthony Barbierf45d5a92018-01-24 16:23:15 +0000605 default: True
606 actual: True
Anthony Barbierdbdab852017-06-23 15:42:00 +0100607
608 set_soname: Set the library's soname and shlibversion (requires SCons 2.4 or above) (yes|no)
609 default: False
610 actual: False
611
612 openmp: Enable OpenMP backend (yes|no)
613 default: False
614 actual: False
615
616 cppthreads: Enable C++11 threads backend (yes|no)
617 default: True
618 actual: True
619
620 build_dir: Specify sub-folder for the build ( /path/to/build_dir )
621 default: .
622 actual: .
623
624 extra_cxx_flags: Extra CXX flags to be appended to the build command
625 default:
626 actual:
627
628 pmu: Enable PMU counters (yes|no)
629 default: False
630 actual: False
631
Kaizen8938bd32017-09-28 14:38:23 +0100632 mali: Enable Mali hardware counters (yes|no)
633 default: False
634 actual: False
635
Anthony Barbierdbdab852017-06-23 15:42:00 +0100636 validation_tests: Build validation test programs (yes|no)
637 default: False
638 actual: False
639
640 benchmark_tests: Build benchmark test programs (yes|no)
641 default: False
642 actual: False
643
644@b debug / @b asserts:
645 - With debug=1 asserts are enabled, and the library is built with symbols and no optimisations enabled.
646 - 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)
647 - 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).
648
649@b arch: The x86_32 and x86_64 targets can only be used with neon=0 and opencl=1.
650
651@b os: Choose the operating system you are targeting: Linux, Android or bare metal.
652@note bare metal can only be used for NEON (not OpenCL), only static libraries get built and NEON's multi-threading support is disabled.
653
654@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.
655
656@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.
657
Anthony Barbier06ea0482018-02-22 15:45:35 +0000658There 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.
659
Anthony Barbierdbdab852017-06-23 15:42:00 +0100660@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).
661
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000662@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 +0100663
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000664@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 +0100665
666@b set_soname: Do you want to build the versioned version of the library ?
667
668If enabled the library will contain a SONAME and SHLIBVERSION and some symlinks will automatically be created between the objects.
669Example:
670 libarm_compute_core.so -> libarm_compute_core.so.1.0.0
671 libarm_compute_core.so.1 -> libarm_compute_core.so.1.0.0
672 libarm_compute_core.so.1.0.0
673
674@note This options is disabled by default as it requires SCons version 2.4 or above.
675
676@b extra_cxx_flags: Custom CXX flags which will be appended to the end of the build command.
677
678@b build_dir: Build the library in a subfolder of the "build" folder. (Allows to build several configurations in parallel).
679
680@b examples: Build or not the examples
681
682@b validation_tests: Enable the build of the validation suite.
683
Anthony Barbierdbdab852017-06-23 15:42:00 +0100684@b benchmark_tests: Enable the build of the benchmark tests
685
686@b pmu: Enable the PMU cycle counter to measure execution time in benchmark tests. (Your device needs to support it)
687
Kaizen8938bd32017-09-28 14:38:23 +0100688@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 +0100689
690@b openmp Build in the OpenMP scheduler for NEON.
691
692@note Only works when building with g++ not clang++
693
694@b cppthreads Build in the C++11 scheduler for NEON.
695
Jenkinsc3f34a42018-03-02 12:38:09 +0000696@sa Scheduler::set
Anthony Barbierdbdab852017-06-23 15:42:00 +0100697
Kaizen8938bd32017-09-28 14:38:23 +0100698@subsection S3_2_linux Building for Linux
Anthony Barbierdbdab852017-06-23 15:42:00 +0100699
700@subsubsection S3_2_1_library How to build the library ?
701
702For Linux, the library was successfully built and tested using the following Linaro GCC toolchain:
703
704 - gcc-linaro-arm-linux-gnueabihf-4.9-2014.07_linux
705 - gcc-linaro-4.9-2016.02-x86_64_aarch64-linux-gnu
706 - gcc-linaro-6.3.1-2017.02-i686_aarch64-linux-gnu
707
Anthony Barbierdbdab852017-06-23 15:42:00 +0100708To cross-compile the library in debug mode, with NEON only support, for Linux 32bit:
709
710 scons Werror=1 -j8 debug=1 neon=1 opencl=0 os=linux arch=armv7a
711
712To cross-compile the library in asserts mode, with OpenCL only support, for Linux 64bit:
713
714 scons Werror=1 -j8 debug=0 asserts=1 neon=0 opencl=1 embed_kernels=1 os=linux arch=arm64-v8a
715
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000716To cross-compile the library in asserts mode, with GLES_COMPUTE only support, for Linux 64bit:
717
718 scons Werror=1 -j8 debug=0 asserts=1 neon=0 opencl=0 gles_compute=1 embed_kernels=1 os=linux arch=arm64-v8a
719
Anthony Barbierdbdab852017-06-23 15:42:00 +0100720You can also compile the library natively on an ARM device by using <b>build=native</b>:
721
722 scons Werror=1 -j8 debug=0 neon=1 opencl=0 os=linux arch=arm64-v8a build=native
723 scons Werror=1 -j8 debug=0 neon=1 opencl=0 os=linux arch=armv7a build=native
724
725@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.
726
727For example on a 64bit Debian based system you would have to install <b>g++-arm-linux-gnueabihf</b>
728
729 apt-get install g++-arm-linux-gnueabihf
730
731Then run
732
733 scons Werror=1 -j8 debug=0 neon=1 opencl=0 os=linux arch=armv7a build=cross_compile
734
735or simply remove the build parameter as build=cross_compile is the default value:
736
737 scons Werror=1 -j8 debug=0 neon=1 opencl=0 os=linux arch=armv7a
738
739@attention To cross compile with opencl=1 you need to make sure to have a version of libOpenCL matching your target architecture.
740
741@subsubsection S3_2_2_examples How to manually build the examples ?
742
743The 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.
744
Jenkinsb3a371b2018-05-23 11:36:53 +0100745@note The following command lines assume the arm_compute 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 Barbierdbdab852017-06-23 15:42:00 +0100746
747To cross compile a NEON example for Linux 32bit:
748
Kaizenbf8b01d2017-10-12 14:26:51 +0100749 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 +0100750
751To cross compile a NEON example for Linux 64bit:
752
Kaizenbf8b01d2017-10-12 14:26:51 +0100753 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 +0100754
755(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)
756
757To cross compile an OpenCL example for Linux 32bit:
758
Jenkinsb3a371b2018-05-23 11:36:53 +0100759 arm-linux-gnueabihf-g++ examples/cl_convolution.cpp utils/Utils.cpp -I. -Iinclude -std=c++11 -mfpu=neon -L. -larm_compute -larm_compute_core -o cl_convolution -DARM_COMPUTE_CL
Anthony Barbierdbdab852017-06-23 15:42:00 +0100760
761To cross compile an OpenCL example for Linux 64bit:
762
Jenkinsb3a371b2018-05-23 11:36:53 +0100763 aarch64-linux-gnu-g++ examples/cl_convolution.cpp utils/Utils.cpp -I. -Iinclude -std=c++11 -L. -larm_compute -larm_compute_core -o cl_convolution -DARM_COMPUTE_CL
Kaizenbf8b01d2017-10-12 14:26:51 +0100764
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000765To cross compile a GLES example for Linux 32bit:
766
767 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
768
769To cross compile a GLES example for Linux 64bit:
770
771 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
772
Kaizenbf8b01d2017-10-12 14:26:51 +0100773(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)
774
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000775To 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.
776
777@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 +0100778
779i.e. to cross compile the "graph_lenet" example for Linux 32bit:
780
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000781 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 +0100782
783i.e. to cross compile the "graph_lenet" example for Linux 64bit:
784
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000785 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 +0100786
787(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)
788
giorgio-arena869d4242017-10-23 16:58:59 +0100789@note If compiling using static libraries, this order must be followed when linking: arm_compute_graph_static, arm_compute, arm_compute_core
790
Anthony Barbierdbdab852017-06-23 15:42:00 +0100791To compile natively (i.e directly on an ARM device) for NEON for Linux 32bit:
792
Kaizenbf8b01d2017-10-12 14:26:51 +0100793 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 +0100794
795To compile natively (i.e directly on an ARM device) for NEON for Linux 64bit:
796
Kaizenbf8b01d2017-10-12 14:26:51 +0100797 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 +0100798
799(notice the only difference with the 32 bit command is that we don't need the -mfpu option)
800
801To compile natively (i.e directly on an ARM device) for OpenCL for Linux 32bit or Linux 64bit:
802
Jenkinsb3a371b2018-05-23 11:36:53 +0100803 g++ examples/cl_convolution.cpp utils/Utils.cpp -I. -Iinclude -std=c++11 -larm_compute -larm_compute_core -o cl_convolution -DARM_COMPUTE_CL
Anthony Barbierdbdab852017-06-23 15:42:00 +0100804
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000805To compile natively (i.e directly on an ARM device) for GLES for Linux 32bit or Linux 64bit:
Kaizenbf8b01d2017-10-12 14:26:51 +0100806
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000807 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 +0100808
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000809To 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.
810@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 +0100811
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000812i.e. to natively compile the "graph_lenet" example for Linux 32bit:
Kaizenbf8b01d2017-10-12 14:26:51 +0100813
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000814 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
815
816i.e. to natively compile the "graph_lenet" example for Linux 64bit:
817
818 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 +0100819
820(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 +0100821
giorgio-arena869d4242017-10-23 16:58:59 +0100822@note If compiling using static libraries, this order must be followed when linking: arm_compute_graph_static, arm_compute, arm_compute_core
823
Anthony Barbierdbdab852017-06-23 15:42:00 +0100824@note These two commands assume libarm_compute.so is available in your library path, if not add the path to it using -L
825
826To run the built executable simply run:
827
828 LD_LIBRARY_PATH=build ./neon_convolution
829
830or
831
832 LD_LIBRARY_PATH=build ./cl_convolution
833
Jenkinsc3f34a42018-03-02 12:38:09 +0000834@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.
835
836For example:
Jenkinsb3a371b2018-05-23 11:36:53 +0100837
Jenkinsc3f34a42018-03-02 12:38:09 +0000838 LD_LIBRARY_PATH=. ./graph_lenet
839
840 ./graph_lenet
841
842 Usage: ./graph_lenet [target] [path_to_data] [batches]
843
844 No data folder provided: using random values
845
846 Test passed
847
848In 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.
849
Kaizen8938bd32017-09-28 14:38:23 +0100850@subsection S3_3_android Building for Android
Anthony Barbierdbdab852017-06-23 15:42:00 +0100851
852For Android, the library was successfully built and tested using Google's standalone toolchains:
Jenkinsc3f34a42018-03-02 12:38:09 +0000853 - clang++ from NDK r16b for armv7a
854 - clang++ from NDK r16b for arm64-v8a
Anthony Barbierdbdab852017-06-23 15:42:00 +0100855
856Here is a guide to <a href="https://developer.android.com/ndk/guides/standalone_toolchain.html">create your Android standalone toolchains from the NDK</a>
857
Jenkinsc3f34a42018-03-02 12:38:09 +0000858- Download the NDK r16b from here: https://developer.android.com/ndk/downloads/index.html
Anthony Barbierdbdab852017-06-23 15:42:00 +0100859- Make sure you have Python 2 installed on your machine.
860- Generate the 32 and/or 64 toolchains by running the following commands:
Jenkinsb3a371b2018-05-23 11:36:53 +0100861<!-- Leave 2 blank lines here or the formatting of the commands below gets messed up --!>
Anthony Barbierdbdab852017-06-23 15:42:00 +0100862
Jenkinsb3a371b2018-05-23 11:36:53 +0100863
864<!-- End of the 2 blank lines --!>
Jenkinsc3f34a42018-03-02 12:38:09 +0000865 $NDK/build/tools/make_standalone_toolchain.py --arch arm64 --install-dir $MY_TOOLCHAINS/aarch64-linux-android-ndk-r16b --stl gnustl --api 21
866 $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 +0100867
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000868@attention Due to some NDK issues make sure you use clang++ & gnustl
Anthony Barbierdbdab852017-06-23 15:42:00 +0100869
Jenkinsb3a371b2018-05-23 11:36:53 +0100870@note Make sure to add the toolchains to your PATH:
871
872 export PATH=$PATH:$MY_TOOLCHAINS/aarch64-linux-android-ndk-r16b/bin:$MY_TOOLCHAINS/arm-linux-android-ndk-r16b/bin
Anthony Barbierdbdab852017-06-23 15:42:00 +0100873
874@subsubsection S3_3_1_library How to build the library ?
875
Anthony Barbierdbdab852017-06-23 15:42:00 +0100876To cross-compile the library in debug mode, with NEON only support, for Android 32bit:
877
878 CXX=clang++ CC=clang scons Werror=1 -j8 debug=1 neon=1 opencl=0 os=android arch=armv7a
879
880To cross-compile the library in asserts mode, with OpenCL only support, for Android 64bit:
881
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000882 CXX=clang++ CC=clang scons Werror=1 -j8 debug=0 asserts=1 neon=0 opencl=1 embed_kernels=1 os=android arch=arm64-v8a
883
884To cross-compile the library in asserts mode, with GLES_COMPUTE only support, for Android 64bit:
885
886 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 +0100887
888@subsubsection S3_3_2_examples How to manually build the examples ?
889
890The 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.
891
Jenkinsb3a371b2018-05-23 11:36:53 +0100892@note The following command lines assume the arm_compute 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 Barbierdbdab852017-06-23 15:42:00 +0100893
894Once you've got your Android standalone toolchain built and added to your path you can do the following:
895
896To cross compile a NEON example:
897
898 #32 bit:
Kaizenbf8b01d2017-10-12 14:26:51 +0100899 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 +0100900 #64 bit:
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000901 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 +0100902
903To cross compile an OpenCL example:
904
905 #32 bit:
Jenkinsb3a371b2018-05-23 11:36:53 +0100906 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 -DARM_COMPUTE_CL
Anthony Barbierdbdab852017-06-23 15:42:00 +0100907 #64 bit:
Jenkinsb3a371b2018-05-23 11:36:53 +0100908 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 -DARM_COMPUTE_CL
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000909
910To cross compile a GLES example:
Anthony Barbierf45d5a92018-01-24 16:23:15 +0000911
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000912 #32 bit:
913 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
914 #64 bit:
915 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 +0100916
917To cross compile the examples with the Graph API, such as graph_lenet.cpp, you need to link the library arm_compute_graph also.
918(notice the compute library has to be built with both neon and opencl enabled - neon=1 and opencl=1)
919
920 #32 bit:
Jenkinsb3a371b2018-05-23 11:36:53 +0100921 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 -DARM_COMPUTE_CL
Kaizenbf8b01d2017-10-12 14:26:51 +0100922 #64 bit:
Jenkinsb3a371b2018-05-23 11:36:53 +0100923 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 -DARM_COMPUTE_CL
Anthony Barbierdbdab852017-06-23 15:42:00 +0100924
925@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 +0000926@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 +0100927
928Then you need to do is upload the executable and the shared library to the device using ADB:
929
930 adb push neon_convolution_arm /data/local/tmp/
931 adb push cl_convolution_arm /data/local/tmp/
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000932 adb push gc_absdiff_arm /data/local/tmp/
Anthony Barbierdbdab852017-06-23 15:42:00 +0100933 adb shell chmod 777 -R /data/local/tmp/
934
935And finally to run the example:
936
937 adb shell /data/local/tmp/neon_convolution_arm
938 adb shell /data/local/tmp/cl_convolution_arm
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000939 adb shell /data/local/tmp/gc_absdiff_arm
Anthony Barbierdbdab852017-06-23 15:42:00 +0100940
941For 64bit:
942
943 adb push neon_convolution_aarch64 /data/local/tmp/
944 adb push cl_convolution_aarch64 /data/local/tmp/
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000945 adb push gc_absdiff_aarch64 /data/local/tmp/
Anthony Barbierdbdab852017-06-23 15:42:00 +0100946 adb shell chmod 777 -R /data/local/tmp/
947
948And finally to run the example:
949
950 adb shell /data/local/tmp/neon_convolution_aarch64
951 adb shell /data/local/tmp/cl_convolution_aarch64
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000952 adb shell /data/local/tmp/gc_absdiff_aarch64
Anthony Barbierdbdab852017-06-23 15:42:00 +0100953
Jenkinsc3f34a42018-03-02 12:38:09 +0000954@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.
955
956For example:
957 adb shell /data/local/tmp/graph_lenet
958
959 /data/local/tmp/graph_lenet
960
961 Usage: /data/local/tmp/graph_lenet [target] [path_to_data] [batches]
962
963 No data folder provided: using random values
964
965 Test passed
966
967In 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.
968
Kaizenbf8b01d2017-10-12 14:26:51 +0100969@subsection S3_4_bare_metal Building for bare metal
970
971For bare metal, the library was successfully built using linaros's latest (gcc-linaro-6.3.1-2017.05) bare metal toolchains:
972 - arm-eabi for armv7a
973 - aarch64-elf for arm64-v8a
974
975Download 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>.
976
977@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
978
979@subsubsection S3_4_1_library How to build the library ?
980
981To cross-compile the library with NEON support for baremetal arm64-v8a:
982
983 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
984
985@subsubsection S3_4_2_examples How to manually build the examples ?
986
987Examples 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>.
988
989@subsection S3_5_windows_host Building on a Windows host system
Kaizen8938bd32017-09-28 14:38:23 +0100990
991Using `scons` directly from the Windows command line is known to cause
992problems. The reason seems to be that if `scons` is setup for cross-compilation
993it gets confused about Windows style paths (using backslashes). Thus it is
994recommended to follow one of the options outlined below.
995
Kaizenbf8b01d2017-10-12 14:26:51 +0100996@subsubsection S3_5_1_ubuntu_on_windows Bash on Ubuntu on Windows
Kaizen8938bd32017-09-28 14:38:23 +0100997
998The best and easiest option is to use
999<a href="https://msdn.microsoft.com/en-gb/commandline/wsl/about">Ubuntu on Windows</a>.
1000This feature is still marked as *beta* and thus might not be available.
1001However, if it is building the library is as simple as opening a *Bash on
1002Ubuntu on Windows* shell and following the general guidelines given above.
1003
Kaizenbf8b01d2017-10-12 14:26:51 +01001004@subsubsection S3_5_2_cygwin Cygwin
Kaizen8938bd32017-09-28 14:38:23 +01001005
1006If the Windows subsystem for Linux is not available <a href="https://www.cygwin.com/">Cygwin</a>
1007can be used to install and run `scons`. In addition to the default packages
1008installed by Cygwin `scons` has to be selected in the installer. (`git` might
1009also be useful but is not strictly required if you already have got the source
1010code of the library.) Linaro provides pre-built versions of
1011<a href="http://releases.linaro.org/components/toolchain/binaries/">GCC cross-compilers</a>
1012that can be used from the Cygwin terminal. When building for Android the
1013compiler is included in the Android standalone toolchain. After everything has
1014been set up in the Cygwin terminal the general guide on building the library
1015can be followed.
1016
Kaizenbf8b01d2017-10-12 14:26:51 +01001017@subsection S3_6_cl_stub_library The OpenCL stub library
Anthony Barbierdbdab852017-06-23 15:42:00 +01001018
1019In 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.
1020
1021If 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.
1022
1023@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.
1024
1025To cross-compile the stub OpenCL library simply run:
1026
1027 <target-prefix>-gcc -o libOpenCL.so -Iinclude opencl-1.2-stubs/opencl_stubs.c -fPIC -shared
1028
1029For example:
1030
Anthony Barbierdbdab852017-06-23 15:42:00 +01001031 #Linux 32bit
1032 arm-linux-gnueabihf-gcc -o libOpenCL.so -Iinclude opencl-1.2-stubs/opencl_stubs.c -fPIC -shared
1033 #Linux 64bit
1034 aarch64-linux-gnu-gcc -o libOpenCL.so -Iinclude -shared opencl-1.2-stubs/opencl_stubs.c -fPIC
1035 #Android 32bit
1036 arm-linux-androideabi-clang -o libOpenCL.so -Iinclude -shared opencl-1.2-stubs/opencl_stubs.c -fPIC -shared
1037 #Android 64bit
Anthony Barbier8140e1e2017-12-14 23:48:46 +00001038 aarch64-linux-android-clang -o libOpenCL.so -Iinclude -shared opencl-1.2-stubs/opencl_stubs.c -fPIC -shared
1039
1040@subsection S3_7_gles_stub_library The Linux OpenGLES and EGL stub libraries
1041
1042In 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.
1043
1044@note The stub libraries are only needed on Linux. For Android, the NDK toolchains already provide the meta-EGL and meta-GLES libraries.
1045
1046To cross-compile the stub OpenGLES and EGL libraries simply run:
1047
1048 <target-prefix>-gcc -o libEGL.so -Iinclude/linux opengles-3.1-stubs/EGL.c -fPIC -shared
1049 <target-prefix>-gcc -o libGLESv2.so -Iinclude/linux opengles-3.1-stubs/GLESv2.c -fPIC -shared
1050
1051 #Linux 32bit
1052 arm-linux-gnueabihf-gcc -o libEGL.so -Iinclude/linux opengles-3.1-stubs/EGL.c -fPIC -shared
1053 arm-linux-gnueabihf-gcc -o libGLESv2.so -Iinclude/linux opengles-3.1-stubs/GLESv2.c -fPIC -shared
1054
1055 #Linux 64bit
1056 aarch64-linux-gnu-gcc -o libEGL.so -Iinclude/linux opengles-3.1-stubs/EGL.c -fPIC -shared
1057 aarch64-linux-gnu-gcc -o libGLESv2.so -Iinclude/linux opengles-3.1-stubs/GLESv2.c -fPIC -shared
Anthony Barbierdbdab852017-06-23 15:42:00 +01001058*/
Jenkinsc3f34a42018-03-02 12:38:09 +00001059} // namespace arm_compute