blob: 8f74a75403e6f9e4c5c67f854f0950328d2dcf7e [file] [log] [blame]
Vidhya Sudhan Loganathand646ae12018-11-19 15:18:20 +00001///
2/// Copyright (c) 2017-2018 ARM Limited.
3///
4/// SPDX-License-Identifier: MIT
5///
6/// Permission is hereby granted, free of charge, to any person obtaining a copy
7/// of this software and associated documentation files (the "Software"), to
8/// deal in the Software without restriction, including without limitation the
9/// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10/// sell copies of the Software, and to permit persons to whom the Software is
11/// furnished to do so, subject to the following conditions:
12///
13/// The above copyright notice and this permission notice shall be included in all
14/// copies or substantial portions of the Software.
15///
16/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22/// SOFTWARE.
23///
Anthony Barbier3762e742018-03-02 11:49:33 +000024namespace arm_compute
25{
Anthony Barbier6ff3b192017-09-04 18:44:23 +010026/** @mainpage Introduction
27
28@tableofcontents
29
30The Computer Vision and Machine Learning library is a set of functions optimised for both ARM CPUs and GPUs using SIMD technologies.
31
32Several builds of the library are available using various configurations:
33 - OS: Linux, Android or bare metal.
34 - Architecture: armv7a (32bit) or arm64-v8a (64bit)
Anthony Barbier20dbb822017-12-13 21:19:39 +000035 - Technology: NEON / OpenCL / GLES_COMPUTE / NEON and OpenCL and GLES_COMPUTE
Anthony Barbier6ff3b192017-09-04 18:44:23 +010036 - 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.
37
38@section S0_1_contact Contact / Support
39
40Please email developer@arm.com
41
42In 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:
43
44 $ strings android-armv7a-cl-asserts/libarm_compute.so | grep arm_compute_version
45 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
46
Anthony Barbier14c86a92017-12-14 16:27:41 +000047@section S0_2_prebuilt_binaries Pre-built binaries
48
49For each release we provide some pre-built binaries of the library [here](https://github.com/ARM-software/ComputeLibrary/releases)
50
51These binaries have been built using the following toolchains:
Isabella Gottardibe2de402018-11-21 15:23:49 +000052 - Linux armv7a: gcc-linaro-4.9-2016.02-x86_64_arm-linux-gnueabihf
Anthony Barbier14c86a92017-12-14 16:27:41 +000053 - Linux arm64-v8a: gcc-linaro-4.9-2016.02-x86_64_aarch64-linux-gnu
Anthony Barbierd51ea0a2018-08-07 17:48:03 +010054 - Android armv7a: clang++ / libc++ NDK r17b
55 - Android am64-v8a: clang++ / libc++ NDK r17b
Anthony Barbier14c86a92017-12-14 16:27:41 +000056
57@warning Make sure to use a compatible toolchain to build your application or you will get some std::bad_alloc errors at runtime.
58
Anthony Barbier6ff3b192017-09-04 18:44:23 +010059@section S1_file_organisation File organisation
60
61This archive contains:
62 - The arm_compute header and source files
63 - The latest Khronos OpenCL 1.2 C headers from the <a href="https://www.khronos.org/registry/cl/">Khronos OpenCL registry</a>
64 - 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 +000065 - The latest Khronos OpenGL ES 3.1 C headers from the <a href="https://www.khronos.org/registry/gles/">Khronos OpenGL ES registry</a>
66 - The latest Khronos EGL 1.5 C headers from the <a href="https://www.khronos.org/registry/gles/">Khronos EGL registry</a>
67 - 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 +010068 - An examples folder containing a few examples to compile and link against the library.
69 - A @ref utils folder containing headers with some boiler plate code used by the examples.
70 - This documentation.
71
72You should have the following file organisation:
73
74 .
75 ├── arm_compute --> All the arm_compute headers
76 │   ├── core
77 │   │   ├── CL
Anthony Barbier6a5627a2017-09-26 14:42:02 +010078 │   │   │   ├── CLKernelLibrary.h --> Manages all the OpenCL kernels compilation and caching, provides accessors for the OpenCL Context.
Anthony Barbier6ff3b192017-09-04 18:44:23 +010079 │   │   │   ├── CLKernels.h --> Includes all the OpenCL kernels at once
80 │   │   │   ├── CL specialisation of all the generic objects interfaces (ICLTensor, ICLImage, etc.)
81 │   │   │   ├── kernels --> Folder containing all the OpenCL kernels
82 │   │   │   │   └── CL*Kernel.h
83 │   │   │   └── OpenCL.h --> Wrapper to configure the Khronos OpenCL C++ header
84 │   │ ├── CPP
Anthony Barbier6a5627a2017-09-26 14:42:02 +010085 │   │   │   ├── CPPKernels.h --> Includes all the CPP kernels at once
Anthony Barbier6ff3b192017-09-04 18:44:23 +010086 │   │ │   └── kernels --> Folder containing all the CPP kernels
Anthony Barbier6a5627a2017-09-26 14:42:02 +010087 │   │   │      └── CPP*Kernel.h
Anthony Barbier20dbb822017-12-13 21:19:39 +000088 │   │   ├── GLES_COMPUTE
89 │   │   │   ├── GCKernelLibrary.h --> Manages all the GLES kernels compilation and caching, provides accessors for the GLES Context.
90 │   │   │   ├── GCKernels.h --> Includes all the GLES kernels at once
91 │   │   │   ├── GLES specialisation of all the generic objects interfaces (IGCTensor, IGCImage, etc.)
92 │   │   │   ├── kernels --> Folder containing all the GLES kernels
93 │   │   │   │   └── GC*Kernel.h
94 │   │   │   └── OpenGLES.h --> Wrapper to configure the Khronos EGL and OpenGL ES C header
Anthony Barbier6ff3b192017-09-04 18:44:23 +010095 │   │   ├── NEON
96 │   │   │   ├── kernels --> Folder containing all the NEON kernels
Anthony Barbier38e7f1f2018-05-21 13:37:47 +010097 │   │   │   │ ├── assembly --> headers for assembly optimised NEON kernels.
98 │   │   │   │ ├── convolution --> headers for convolution assembly optimised NEON kernels.
99 │   │   │   │   │   ├── common --> headers for code which is common to several convolution implementations.
100 │   │   │   │   │   ├── depthwise --> headers for Depthwise convolultion assembly implementation
101 │   │   │   │   │   └── winograd --> headers for Winograd convolution assembly implementation
102 │   │   │   │ ├── detail --> Common code for several intrinsics implementations.
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100103 │   │   │   │   └── NE*Kernel.h
104 │   │   │   └── NEKernels.h --> Includes all the NEON kernels at once
105 │   │   ├── All common basic types (Types.h, Window, Coordinates, Iterator, etc.)
106 │   │   ├── All generic objects interfaces (ITensor, IImage, etc.)
107 │   │   └── Objects metadata classes (ImageInfo, TensorInfo, MultiImageInfo)
Anthony Barbier6a5627a2017-09-26 14:42:02 +0100108 │   ├── graph
Anthony Barbier38e7f1f2018-05-21 13:37:47 +0100109 │   │   ├── algorithms
110 │   │   │   └── Generic algorithms used by the graph backend (e.g Order of traversal)
111 │   │   ├── backends --> The backend specific code
112 │   │   │   ├── CL --> OpenCL specific operations
113 │   │   │   ├── GLES --> OpenGLES Compute Shaders specific operations
114 │   │   │   └── NEON --> NEON specific operations
115 │   │   ├── detail
116 │   │   │   └── Collection of internal utilities.
117 │   │   ├── frontend
118 │   │   │   └── Code related to the stream frontend interface.
119 │   │   ├── mutators
120 │   │   │   └── Used to modify / optimise the Graph intermediate representation(Operator fusion, in place operations, etc.)
Anthony Barbier6a5627a2017-09-26 14:42:02 +0100121 │   │   ├── nodes
122 │   │   │   └── The various nodes supported by the graph API
Anthony Barbier38e7f1f2018-05-21 13:37:47 +0100123 │   │   ├── printers
124 │   │   │   └── Debug printers
Anthony Barbier6a5627a2017-09-26 14:42:02 +0100125 │   │   └── Graph objects ( INode, ITensorAccessor, Graph, etc.)
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100126 │   └── runtime
127 │   ├── CL
128 │   │   ├── CL objects & allocators (CLArray, CLImage, CLTensor, etc.)
129 │   │   ├── functions --> Folder containing all the OpenCL functions
130 │   │   │   └── CL*.h
Anthony Barbier6a5627a2017-09-26 14:42:02 +0100131 │   │   ├── CLScheduler.h --> Interface to enqueue OpenCL kernels and get/set the OpenCL CommandQueue and ICLTuner.
Anthony Barbier38e7f1f2018-05-21 13:37:47 +0100132 │   │   ├── CLFunctions.h --> Includes all the OpenCL functions at once
133 │   │   └── tuners
134 │   │      └── Local workgroup size tuners for specific architectures / GPUs
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100135 │   ├── CPP
Anthony Barbier6a5627a2017-09-26 14:42:02 +0100136 │      │   ├── CPPKernels.h --> Includes all the CPP functions at once.
Anthony Barbier38e7f1f2018-05-21 13:37:47 +0100137 │   │   ├── CPPScheduler.h --> Basic pool of threads to execute CPP/NEON code on several cores in parallel
138 │   │   └── functions --> Folder containing all the CPP functions
139 │   │      └── CPP*.h
Anthony Barbier20dbb822017-12-13 21:19:39 +0000140 │   ├── GLES_COMPUTE
141 │   │   ├── GLES objects & allocators (GCArray, GCImage, GCTensor, etc.)
142 │   │   ├── functions --> Folder containing all the GLES functions
143 │   │   │   └── GC*.h
144 │   │   ├── GCScheduler.h --> Interface to enqueue GLES kernels and get/set the GLES CommandQueue.
145 │   │   └── GCFunctions.h --> Includes all the GLES functions at once
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100146 │   ├── NEON
147 │   │ ├── functions --> Folder containing all the NEON functions
148 │   │ │   └── NE*.h
149 │   │ └── NEFunctions.h --> Includes all the NEON functions at once
Anthony Barbier6a5627a2017-09-26 14:42:02 +0100150 │   ├── OMP
151 │   │   └── OMPScheduler.h --> OpenMP scheduler (Alternative to the CPPScheduler)
152 │ ├── Memory manager files (LifetimeManager, PoolManager, etc.)
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100153 │   └── Basic implementations of the generic object interfaces (Array, Image, Tensor, etc.)
Anthony Barbiera8a28f62018-02-26 19:16:32 +0000154 ├── data -> Contains test images and reference data dumps used by validation tests
155 ├── docs -> Contains Doxyfile and Doxygen sources used to generate the HTML pages in the documentation folder.
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100156 ├── documentation
157 │   ├── index.xhtml
158 │   └── ...
159 ├── documentation.xhtml -> documentation/index.xhtml
160 ├── examples
Anthony Barbier20dbb822017-12-13 21:19:39 +0000161 │   ├── cl_*.cpp --> OpenCL examples
Anthony Barbier14c86a92017-12-14 16:27:41 +0000162 │   ├── gc_*.cpp --> GLES compute shaders examples
Anthony Barbier20dbb822017-12-13 21:19:39 +0000163 │   ├── graph_*.cpp --> Graph examples
164 │   ├── neoncl_*.cpp --> NEON / OpenCL interoperability examples
165 │   └── neon_*.cpp --> NEON examples
Anthony Barbier38e7f1f2018-05-21 13:37:47 +0100166 ├── graph.h --> Includes all the Graph headers at once.
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100167 ├── include
Anthony Barbier6a5627a2017-09-26 14:42:02 +0100168 │   ├── CL
169 │   │ └── Khronos OpenCL C headers and C++ wrapper
170 │   ├── half --> FP16 library available from http://half.sourceforge.net
Anthony Barbier14c86a92017-12-14 16:27:41 +0000171 │   ├── libnpy --> Library to load / write npy buffers, available from https://github.com/llohse/libnpy
172 │  └── linux --> Headers only needed for Linux builds
173 │   └── Khronos EGL and OpenGLES headers
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100174 ├── opencl-1.2-stubs
Anthony Barbier14c86a92017-12-14 16:27:41 +0000175 │ └── opencl_stubs.c --> OpenCL stubs implementation
176 ├── opengles-3.1-stubs
177 │   ├── EGL.c --> EGL stubs implementation
178 │   └── GLESv2.c --> GLESv2 stubs implementation
Anthony Barbier6a5627a2017-09-26 14:42:02 +0100179 ├── scripts
180 │   ├── caffe_data_extractor.py --> Basic script to export weights from Caffe to npy files
181 │   └── tensorflow_data_extractor.py --> Basic script to export weights from Tensor Flow to npy files
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100182 ├── src
183 │   ├── core
184 │ │ └── ... (Same structure as headers)
Anthony Barbier20dbb822017-12-13 21:19:39 +0000185 │   │ ├── CL
186 │   │ │ └── cl_kernels --> All the OpenCL kernels
187 │   │ └── GLES_COMPUTE
188 │   │ └── cs_shaders --> All the OpenGL ES Compute Shaders
Anthony Barbier6a5627a2017-09-26 14:42:02 +0100189 │   ├── graph
190 │ │ └── ... (Same structure as headers)
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100191 │ └── runtime
192 │ └── ... (Same structure as headers)
Anthony Barbier6a5627a2017-09-26 14:42:02 +0100193 ├── support
194 │ └── Various headers to work around toolchains / platform issues.
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100195 ├── tests
196 │   ├── All test related files shared between validation and benchmark
Anthony Barbier38e7f1f2018-05-21 13:37:47 +0100197 │   ├── benchmark --> Sources for benchmarking
198 │ │ ├── Benchmark specific files
199 │   │ ├── fixtures
200 │ │ │ └── Backend agnostic fixtures to initialise and run the functions to test.
201 │ │ ├── CL --> OpenCL benchmarking tests
202 │ │ ├── GLES_COMPUTE --> GLES benchmarking tests
203 │ │ └── NEON --> NEON benchmarking tests
Anthony Barbier6a5627a2017-09-26 14:42:02 +0100204 │   ├── CL --> OpenCL accessors
Anthony Barbier20dbb822017-12-13 21:19:39 +0000205 │   ├── GLES_COMPUTE --> GLES accessors
Anthony Barbier6a5627a2017-09-26 14:42:02 +0100206 │   ├── NEON --> NEON accessors
Anthony Barbier6a5627a2017-09-26 14:42:02 +0100207 │   ├── datasets
208 │ │ └── Datasets for all the validation / benchmark tests, layer configurations for various networks, etc.
209 │   ├── framework
210 │ │ └── Boiler plate code for both validation and benchmark test suites (Command line parsers, instruments, output loggers, etc.)
211 │   ├── networks
212 │ │ └── Examples of how to instantiate networks.
Anthony Barbier38e7f1f2018-05-21 13:37:47 +0100213 │   └── validation --> Sources for validation
214 │ ├── Validation specific files
215 │   ├── fixtures
216 │ │ └── Backend agnostic fixtures to initialise and run the functions to test.
217 │   ├── reference
218 │ │ └── Reference implementation used to validate the results of the various backends.
219 │ ├── CL --> OpenCL validation tests
220 │ ├── GLES_COMPUTE --> GLES validation tests
221 │ ├── CPP --> C++ reference implementations
222 │ └── NEON --> NEON validation tests
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100223 └── utils --> Boiler plate code used by examples
Anthony Barbier20dbb822017-12-13 21:19:39 +0000224 └── Various utilities to print types, load / store assets, etc.
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100225
226@section S2_versions_changelog Release versions and changelog
227
228@subsection S2_1_versions Release versions
229
230All releases are numbered vYY.MM Where YY are the last two digits of the year, and MM the month number.
231If there is more than one release in a month then an extra sequential number is appended at the end:
232
233 v17.03 (First release of March 2017)
234 v17.03.1 (Second release of March 2017)
235 v17.04 (First release of April 2017)
236
237@note We're aiming at releasing one major public release with new features per quarter. All releases in between will only contain bug fixes.
238
239@subsection S2_2_changelog Changelog
240
giuros01a69a88b2019-01-31 16:29:19 +0000241v19.02 Public major release
Isabella Gottardi869ec972019-02-12 19:52:44 +0000242 - Various bug fixes.
243 - Various optimisations.
244 - New Neon kernels / functions:
245 - @ref NETileKernel / @ref NETile
246 - @ref NEFuseBatchNormalizationKernel / @ref NEFuseBatchNormalization
247 - @ref NEElementwiseOperationKernel
248 - @ref NEElementwiseMax
249 - @ref NEElementwiseMin
250 - @ref NEElementwiseSquaredDiff
251 - @ref NESelectKernel / @ref NESelect
252 - @ref NESplit
253 - @ref NESlice
254 - @ref NEUnstack
255 - @ref NEStridedSliceKernel / @ref NEStridedSlice
256 - @ref NEElementwiseUnaryKernel
257 - @ref NERsqrtLayer
258 - @ref NEExpLayer
259 - @ref NEReverseKernel / @ref NEReverse
260 - @ref NEArgMinMaxLayer
261 - @ref NEStackLayerKernel / @ref NEStackLayer
262 - @ref NERangeKernel / @ref NERange
263 - @ref NEPadLayer
264 - @ref NEMemsetKernel
265 - @ref NEGatherKernel / @ref NEGather
266 - @ref NEElementwiseComparison
267 - @ref NEElementwiseComparisonStatic
268 - @ref NEComparisonOperationKernel
269 - @ref NEElementwiseDivision
270 - New OpenCL kernels / functions:
271 - @ref CLSelectKernel / @ref CLSelect
272 - @ref CLTileKernel / @ref CLTile
273 - @ref CLComparisonKernel / @ref CLComparison
274 - @ref CLArgMinMaxLayer
275 - @ref CLElementwiseMax
276 - @ref CLElementwiseMin
277 - @ref CLElementwiseSquaredDiff
278 - @ref CLStackLayerKernel / @ref CLStackLayer
279 - @ref CLReverse / @ref CLReverseKernel
280 - @ref CLRsqrtLayer
281 - @ref CLExpLayer
282 - @ref CLElementWiseUnaryLayerKernel
283 - @ref CLGEMMReshapeLHSMatrixKernel
284 - @ref CLGEMMReshapeRHSMatrixKernel
285 - @ref CLGEMMMatrixMultiplyReshapedKernel
286 - @ref CLRangeKernel / @ref CLRange
287 - @ref CLUnstack
288 - @ref CLGatherKernel / @ref CLGather
289 - @ref CLGEMMLowpMatrixMultiplyReshapedKernel
290 - New CPP kernels / functions:
291 - @ref CPPDetectionOutputLayer
292 - @ref CPPTopKV / @ref CPPTopKVKernel
Isabella Gottardi869ec972019-02-12 19:52:44 +0000293 - Added new examples:
294 - graph_ssd_mobilenet.cpp
295 - graph_mobilenet_v2.cpp
296 - graph_resnet12.cpp
297 - graph_srcnn955.cpp
298 - graph_vgg_vdsr.cpp
299 - graph_inception_resnet_v1.cpp
300 - Add 4D tensors support to
301 - @ref NESoftmaxLayer
302 - Fused activation in @ref CLWinogradConvolutionLayer
303 - Extented @ref NEPermute to support more cases
304 - Added NEON/SVE GEMM Hybrid kernels
305 - Added u8 and s8 hybrid assembly kernels
306 - Introduced GEMM strategy name in NEGEMMAssemblyWrapper
307 - Improved @ref CLTuner
308 - Fused the bias addition within @ref CLGEMM
309 - Added support for QASYMM8 LOGISTIC activation in @ref NEActivationLayer
310 - Added NHWC data layout support to:
311 - @ref NEScale for F16
312 - @ref CLNormalizationLayer IN_MAP_2D for FP32/FP16
313 - @ref NEL2NormalizeLayer for FP32/FP16
314 - @ref NENormalizationLayer IN_MAP_2D for FP32/FP16
315 - @ref CLROIAlignLayer
Manuel Bottiniec5f85f2019-02-13 16:34:56 +0000316 - @ref CLGenerateProposalsLayer
Isabella Gottardi869ec972019-02-12 19:52:44 +0000317 - Added QASYMM8 support to the following kernels:
318 - @ref NEArithmeticAdditionKernel
319 - @ref NEScale
320 - Added new tests and improved validation and benchmarking suites.
giuros01a69a88b2019-01-31 16:29:19 +0000321 - Deprecated functions/interfaces
322 - Usage of inner_border_right and inner_border_top has been deprecated in @ref CLDeconvolutionLayer and @ref NEDeconvolutionLayer
323
Isabella Gottardi8773d7c2018-11-20 09:56:46 +0000324v18.11 Public major release
325 - Various bug fixes.
326 - Various optimisations.
327 - New Neon kernels / functions:
328 - @ref NEChannelShuffleLayer / @ref NEChannelShuffleLayerKernel
329 - @ref NEReduceMean
330 - @ref NEReorgLayer / @ref NEReorgLayerKernel
331 - @ref NEPriorBoxLayer / @ref NEPriorBoxLayerKernel
332 - @ref NEUpsampleLayer / @ref NEUpsampleLayerKernel
333 - @ref NEYOLOLayer / @ref NEYOLOLayerKernel
334 - New OpenCL kernels / functions:
335 - @ref CLBatchToSpaceLayer / @ref CLBatchToSpaceLayerKernel
336 - @ref CLBoundingBoxTransform / @ref CLBoundingBoxTransformKernel
Manuel Bottiniec5f85f2019-02-13 16:34:56 +0000337 - @ref CLComputeAllAnchorsKernel
338 - @ref CLGenerateProposalsLayer
Isabella Gottardi8773d7c2018-11-20 09:56:46 +0000339 - @ref CLNormalizePlanarYUVLayer / @ref CLNormalizePlanarYUVLayerKernel
340 - @ref CLReorgLayer / @ref CLReorgLayerKernel
341 - @ref CLSpaceToBatchLayer / @ref CLSpaceToBatchLayerKernel
342 - @ref CLPadLayer
343 - @ref CLReduceMean
344 - @ref CLPriorBoxLayer / @ref CLPriorBoxLayerKernel
345 - @ref CLROIAlignLayer / @ref CLROIAlignLayerKernel
346 - @ref CLSlice
347 - @ref CLSplit
348 - @ref CLStridedSlice / @ref CLStridedSliceKernel
349 - @ref CLUpsampleLayer / @ref CLUpsampleLayerKernel
350 - @ref CLYOLOLayer / @ref CLYOLOLayerKernel
351 - New CPP kernels / functions:
352 - @ref CPPBoxWithNonMaximaSuppressionLimit / @ref CPPBoxWithNonMaximaSuppressionLimitKernel
353 - Added the validate method in:
354 - @ref NEDepthConvertLayer
355 - @ref NEFloor / @ref CLFloor
356 - @ref NEGEMMMatrixAdditionKernel
357 - @ref NEReshapeLayer / @ref CLReshapeLayer
358 - @ref CLScale
359 - Added new examples:
360 - graph_shufflenet.cpp
361 - graph_yolov3.cpp
362 - Added documentation for add a new function or kernel.
363 - Improved doxygen documentation adding a list of the existing functions.
364 - Add 4D tensors support to
365 - @ref CLWidthConcatenateLayer
366 - @ref CLFlattenLayer
367 - @ref CLSoftmaxLayer
368 - Add dot product support for @ref CLDepthwiseConvolutionLayer3x3NHWCKernel non-unit stride
369 - Add SVE support
370 - Fused batch normalization into convolution layer weights in @ref CLFuseBatchNormalization
371 - Fuses activation in @ref CLDepthwiseConvolutionLayer3x3NCHWKernel, @ref CLDepthwiseConvolutionLayer3x3NHWCKernel and @ref NEGEMMConvolutionLayer
372 - Added NHWC data layout support to:
373 - @ref CLChannelShuffleLayer
374 - @ref CLDeconvolutionLayer
375 - @ref CLL2NormalizeLayer
376 - Added QASYMM8 support to the following kernels:
377 - @ref CLScaleKernel
378 - @ref NEDepthwiseConvolutionLayer3x3Kernel
379 - @ref CLPixelWiseMultiplicationKernel
380 - Added FP16 support to the following kernels:
381 - @ref CLDepthwiseConvolutionLayer3x3NHWCKernel
382 - @ref NEDepthwiseConvolutionLayer3x3Kernel
383 - @ref CLNormalizePlanarYUVLayerKernel
384 - @ref CLWinogradConvolutionLayer (5x5 kernel)
385 - More tests added to both validation and benchmarking suites.
386
Anthony Barbierd51ea0a2018-08-07 17:48:03 +0100387v18.08 Public major release
388 - Various bug fixes.
Michele Di Giorgio02baf012018-08-20 18:10:38 +0100389 - Various optimisations.
Anthony Barbierd51ea0a2018-08-07 17:48:03 +0100390 - Updated recommended NDK version to r17b.
Michele Di Giorgio02baf012018-08-20 18:10:38 +0100391 - Removed support for QS8/QS16 data types.
392 - Added support for grouped convolution in @ref CLConvolutionLayer.
393 - Added NHWC data layout support to:
394 - @ref NEDepthConcatenateLayer / @ref CLDepthConcatenateLayer
395 - @ref NEWinogradConvolutionLayer / @ref CLWinogradConvolutionLayer
396 - @ref CLDepthwiseConvolutionLayer
397 - @ref CLDirectConvolutionLayer
398 - @ref CLConvolutionLayer
399 - @ref CLScale
400 - @ref CLIm2ColKernel
401 - New Neon kernels / functions:
402 - @ref NERNNLayer
403 - New OpenCL kernels / functions:
404 - @ref CLArithmeticDivision
405 - Introduced prepare() stage support in the graph API for GLES.
406 - Added support for memory reusage when trying to allocate smaller CLTensors.
407 - Enabled NHWC execution on graph examples.
408 - Added JPEG accessor for validation purposes.
409 - Added validate methods to some kernels / functions.
Anthony Barbierd51ea0a2018-08-07 17:48:03 +0100410
411v18.05 Public major release
Pablo Tellob5cc95b2018-05-15 11:49:33 +0100412 - Various bug fixes.
413 - Various optimisations.
Pablo Telloeb82fd22018-02-23 13:43:50 +0000414 - Major redesign in the interface for the neon kernels implemented in assembly.
415 - Removed arm_compute::NEGEMMLowpAArch64A53Kernel / arm_compute::NEGEMMLowpAArch64Kernel / arm_compute::NEGEMMLowpAArch64V8P4Kernel / arm_compute::NEGEMMInterleavedBlockedKernel / arm_compute::NEGEMMLowpAssemblyMatrixMultiplyCore / arm_compute::NEHGEMMAArch64FP16Kernel
416 - Added NEGEMMAssemblyWrapper and AssemblyKernelGlue which are used to execute assembly kernels in neon functions.
417 - Minor changes to the CPUInfo type to make it compatible with the new assembly gemm interface.
Pablo Tellob5cc95b2018-05-15 11:49:33 +0100418 - Moved neon assembly kernels to the folder src/core/NEON/kernels/arm_gemm.
419 - Improved doxygen documentation.
420 - Improved memory management for layer's transitions.
421 - Added support for NHWC data layout in tensors.
422 - Added NHWC data layout support to:
423 - @ref NEGEMMConvolutionLayer
424 - @ref NEDirectConvolutionLayer
425 - @ref NEPoolingLayer / @ref CLPoolingLayer
426 - @ref NEBatchNormalizationLayer / @ref CLBatchNormalizationLayer
427 - @ref NEDepthwiseConvolutionLayer
428 - @ref NEScale
429 - @ref NEIm2Col
430 - Added support for dilated convolutions in @ref NEConvolutionLayer and @ref CLConvolutionLayer.
431 - New OpenCL kernels / functions:
432 - @ref CLChannelShuffleLayer / @ref CLChannelShuffleLayerKernel
433 - @ref CLConvertFullyConnectedWeightsKernel / @ref CLConvertFullyConnectedWeights
434 - @ref CLCopy / @ref CLCopyKernel
Anthony Barbier38e7f1f2018-05-21 13:37:47 +0100435 - @ref CLLSTMLayer
Pablo Tellob5cc95b2018-05-15 11:49:33 +0100436 - @ref CLRNNLayer
437 - @ref CLWidthConcatenateLayer / @ref CLWidthConcatenateLayerKernel
438 - @ref CLWinogradFilterTransformKernel / @ref CLWinogradInputTransformKernel / @ref CLWinogradConvolutionLayer
439 - @ref CLWinogradInputTransformKernel / @ref CLWinogradInputTransform
440 - New Neon kernels / functions:
Pablo Tellob5cc95b2018-05-15 11:49:33 +0100441 - @ref NEConvertFullyConnectedWeightsKernel / @ref NEConvertFullyConnectedWeights.
442 - Created the validate method in @ref CLDepthwiseConvolutionLayer.
443 - Beta and gamma are no longer mandatory arguments in @ref NEBatchNormalizationLayer and @ref CLBatchNormalizationLayer.
444 - Added depth multiplier support in @ref NEDepthwiseConvolutionLayer and @ref CLDepthwiseConvolutionLayer.
445 - Added broadcast multiply support in @ref NEPixelWiseMultiplication / @ref NEPixelWiseMultiplicationKernel.
446 - Port mobilenet example to NHWC data layout.
447 - Enabled Winograd method in @ref CLConvolutionLayer.
448 - Renamed NEWinogradLayer to @ref NEWinogradConvolutionLayer.
449 - Updated @ref NEWinogradConvolutionLayer to use highly optimised assembly kernels in src/core/NEON/kernels/arm_gemm.
450 - Added memory manager support in GLES functions.
451 - Major refactoring of the graph API.
452 - Added GLES backend in the graph API.
453 - Added support for the memory manager in the graph API.
454 - Enabled Winograd Convolution method in the graph API.
455 - Added support for grouped convolutions in the graph API.
456 - Replaced NEDeconvolutionLayerUpsampleKernel with @ref NEScaleKernel in @ref NEDeconvolutionLayer.
457 - Added fast maths flag in @ref CLConvolutionLayer.
458 - Added new tests and benchmarks in validation and benchmark frameworks
459 - Merge Activation layer with Convolution Layer (NEON. CL, GLES)
460 - Added support to OpenCL 2.0 SVM
461 - Added support to import memory in OpenCL tensors.
462 - Added the prepare() method to perform any one off pre-processing before running the function.
463 - Added new examples:
464 - graph_inception_v4.cpp
Anthony Barbier38e7f1f2018-05-21 13:37:47 +0100465 - graph_resnext50.cpp
Pablo Tellob5cc95b2018-05-15 11:49:33 +0100466 - Added memory measurement instrument for CL.
Pablo Telloeb82fd22018-02-23 13:43:50 +0000467
Anthony Barbier577fbdf2018-03-01 15:17:54 +0000468v18.03 Public maintenance release
469 - Various bug fixes.
Anthony Barbier3762e742018-03-02 11:49:33 +0000470 - Fixed bug in @ref NEActivationLayer
471 - Fix in @ref CLTuner when using batches.
Anthony Barbier577fbdf2018-03-01 15:17:54 +0000472 - Updated recommended NDK version to r16b (And fixed warnings).
473 - Fixed bug in validation code.
474 - Added Inception v4 graph example.
Georgios Pinitas9fb11592018-04-26 20:34:58 +0100475 - Renamed NEWinogradLayer.cpp to @ref NEWinogradConvolutionLayer
Anthony Barbier577fbdf2018-03-01 15:17:54 +0000476
Anthony Barbier2d0ce772018-02-21 15:35:36 +0000477v18.02 Public major release
478 - Various NEON / OpenCL / GLES optimisations.
479 - Various bug fixes.
480 - Changed default number of threads on big LITTLE systems.
481 - Refactored examples and added:
482 - graph_mobilenet_qassym8
483 - graph_resnet
484 - graph_squeezenet_v1_1
Anthony Barbier3762e742018-03-02 11:49:33 +0000485 - Renamed @ref CLConvolutionLayer into @ref CLGEMMConvolutionLayer and created a new @ref CLConvolutionLayer to select the fastest convolution method.
486 - Renamed @ref NEConvolutionLayer into @ref NEGEMMConvolutionLayer and created a new @ref NEConvolutionLayer to select the fastest convolution method.
Anthony Barbier2d0ce772018-02-21 15:35:36 +0000487 - Added in place support to:
Anthony Barbier3762e742018-03-02 11:49:33 +0000488 - @ref CLActivationLayer
489 - @ref CLBatchNormalizationLayer
Anthony Barbier2d0ce772018-02-21 15:35:36 +0000490 - Added QASYMM8 support to:
Anthony Barbier3762e742018-03-02 11:49:33 +0000491 - @ref CLActivationLayer
492 - @ref CLDepthwiseConvolutionLayer
493 - @ref NEDepthwiseConvolutionLayer
494 - @ref NESoftmaxLayer
Anthony Barbier2d0ce772018-02-21 15:35:36 +0000495 - Added FP16 support to:
Anthony Barbier3762e742018-03-02 11:49:33 +0000496 - @ref CLDepthwiseConvolutionLayer3x3
497 - @ref CLDepthwiseConvolutionLayer
498 - Added broadcasting support to @ref NEArithmeticAddition / @ref CLArithmeticAddition / @ref CLPixelWiseMultiplication
499 - Added fused batched normalization and activation to @ref CLBatchNormalizationLayer and @ref NEBatchNormalizationLayer
500 - Added support for non-square pooling to @ref NEPoolingLayer and @ref CLPoolingLayer
Anthony Barbier2d0ce772018-02-21 15:35:36 +0000501 - New OpenCL kernels / functions:
Anthony Barbier3762e742018-03-02 11:49:33 +0000502 - @ref CLDirectConvolutionLayerOutputStageKernel
Pablo Tellof6c572c2018-02-14 12:47:30 +0000503 - New NEON kernels / functions
Anthony Barbier2d0ce772018-02-21 15:35:36 +0000504 - Added name() method to all kernels.
505 - Added support for Winograd 5x5.
Anthony Barbier3762e742018-03-02 11:49:33 +0000506 - @ref NEPermuteKernel / @ref NEPermute
Georgios Pinitas9fb11592018-04-26 20:34:58 +0100507 - @ref NEWinogradLayerTransformInputKernel / NEWinogradLayer
508 - @ref NEWinogradLayerTransformOutputKernel / NEWinogradLayer
509 - @ref NEWinogradLayerTransformWeightsKernel / NEWinogradLayer
Anthony Barbiere1553372018-07-16 18:53:52 +0100510 - Renamed NEWinogradLayerKernel into NEWinogradLayerBatchedGEMMKernel
Anthony Barbier2d0ce772018-02-21 15:35:36 +0000511 - New GLES kernels / functions:
Anthony Barbier3762e742018-03-02 11:49:33 +0000512 - @ref GCTensorShiftKernel / @ref GCTensorShift
Pablo Tellof6c572c2018-02-14 12:47:30 +0000513
Anthony Barbier64c95a02018-01-22 18:48:55 +0000514v18.01 Public maintenance release
515 - Various bug fixes
516 - Added some of the missing validate() methods
Anthony Barbier3762e742018-03-02 11:49:33 +0000517 - Added @ref CLDeconvolutionLayerUpsampleKernel / @ref CLDeconvolutionLayer @ref CLDeconvolutionLayerUpsample
518 - Added @ref CLPermuteKernel / @ref CLPermute
Anthony Barbier64c95a02018-01-22 18:48:55 +0000519 - Added method to clean the programs cache in the CL Kernel library.
Anthony Barbier3762e742018-03-02 11:49:33 +0000520 - Added @ref GCArithmeticAdditionKernel / @ref GCArithmeticAddition
521 - Added @ref GCDepthwiseConvolutionLayer3x3Kernel / @ref GCDepthwiseConvolutionLayer3x3
522 - Added @ref GCNormalizePlanarYUVLayerKernel / @ref GCNormalizePlanarYUVLayer
523 - Added @ref GCScaleKernel / @ref GCScale
524 - Added @ref GCWeightsReshapeKernel / @ref GCConvolutionLayer
Anthony Barbier64c95a02018-01-22 18:48:55 +0000525 - Added FP16 support to the following GLES compute kernels:
Anthony Barbier3762e742018-03-02 11:49:33 +0000526 - @ref GCCol2ImKernel
527 - @ref GCGEMMInterleave4x4Kernel
528 - @ref GCGEMMTranspose1xWKernel
529 - @ref GCIm2ColKernel
530 - Refactored NEON Winograd (NEWinogradLayerKernel)
531 - Added @ref NEDirectConvolutionLayerOutputStageKernel
Anthony Barbier64c95a02018-01-22 18:48:55 +0000532 - Added QASYMM8 support to the following NEON kernels:
Anthony Barbier3762e742018-03-02 11:49:33 +0000533 - @ref NEDepthwiseConvolutionLayer3x3Kernel
534 - @ref NEFillBorderKernel
535 - @ref NEPoolingLayerKernel
Anthony Barbier64c95a02018-01-22 18:48:55 +0000536 - Added new examples:
537 - graph_cl_mobilenet_qasymm8.cpp
538 - graph_inception_v3.cpp
539 - gc_dc.cpp
540 - More tests added to both validation and benchmarking suites.
541
Gian Marcoff850932017-12-11 12:37:17 +0000542v17.12 Public major release
543 - Most machine learning functions on OpenCL support the new data type QASYMM8
544 - Introduced logging interface
545 - Introduced opencl timer
546 - Reworked GEMMLowp interface
547 - Added new NEON assembly kernels for GEMMLowp, SGEMM and HGEMM
548 - Added validation method for most Machine Learning kernels / functions
549 - Added new graph examples such as googlenet, mobilenet, squeezenet, vgg16 and vgg19
550 - Added sgemm example for OpenCL
551 - Added absolute difference example for GLES compute
552 - Added new tests and benchmarks in validation and benchmark frameworks
553 - Added new kernels / functions for GLES compute
554
555 - New OpenGL ES kernels / functions
Anthony Barbier3762e742018-03-02 11:49:33 +0000556 - @ref GCAbsoluteDifferenceKernel / @ref GCAbsoluteDifference
557 - @ref GCActivationLayerKernel / @ref GCActivationLayer
558 - @ref GCBatchNormalizationLayerKernel / @ref GCBatchNormalizationLayer
559 - @ref GCCol2ImKernel
560 - @ref GCDepthConcatenateLayerKernel / @ref GCDepthConcatenateLayer
561 - @ref GCDirectConvolutionLayerKernel / @ref GCDirectConvolutionLayer
562 - @ref GCDropoutLayerKernel / @ref GCDropoutLayer
563 - @ref GCFillBorderKernel / @ref GCFillBorder
564 - @ref GCGEMMInterleave4x4Kernel / @ref GCGEMMInterleave4x4
565 - @ref GCGEMMMatrixAccumulateBiasesKernel / @ref GCGEMMMatrixAdditionKernel / @ref GCGEMMMatrixMultiplyKernel / @ref GCGEMM
566 - @ref GCGEMMTranspose1xWKernel / @ref GCGEMMTranspose1xW
567 - @ref GCIm2ColKernel
568 - @ref GCNormalizationLayerKernel / @ref GCNormalizationLayer
569 - @ref GCPixelWiseMultiplicationKernel / @ref GCPixelWiseMultiplication
570 - @ref GCPoolingLayerKernel / @ref GCPoolingLayer
571 - @ref GCLogits1DMaxKernel / @ref GCLogits1DShiftExpSumKernel / @ref GCLogits1DNormKernel / @ref GCSoftmaxLayer
572 - @ref GCTransposeKernel / @ref GCTranspose
Gian Marcoff850932017-12-11 12:37:17 +0000573
574 - New NEON kernels / functions
Pablo Telloeb82fd22018-02-23 13:43:50 +0000575 - arm_compute::NEGEMMLowpAArch64A53Kernel / arm_compute::NEGEMMLowpAArch64Kernel / arm_compute::NEGEMMLowpAArch64V8P4Kernel / arm_compute::NEGEMMInterleavedBlockedKernel / arm_compute::NEGEMMLowpAssemblyMatrixMultiplyCore
576 - arm_compute::NEHGEMMAArch64FP16Kernel
Anthony Barbier3762e742018-03-02 11:49:33 +0000577 - @ref NEDepthwiseConvolutionLayer3x3Kernel / @ref NEDepthwiseIm2ColKernel / @ref NEGEMMMatrixVectorMultiplyKernel / @ref NEDepthwiseVectorToTensorKernel / @ref NEDepthwiseConvolutionLayer
578 - @ref NEGEMMLowpOffsetContributionKernel / @ref NEGEMMLowpMatrixAReductionKernel / @ref NEGEMMLowpMatrixBReductionKernel / @ref NEGEMMLowpMatrixMultiplyCore
579 - @ref NEGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPointKernel / @ref NEGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPoint
580 - @ref NEGEMMLowpQuantizeDownInt32ToUint8ScaleKernel / @ref NEGEMMLowpQuantizeDownInt32ToUint8Scale
Georgios Pinitas9fb11592018-04-26 20:34:58 +0100581 - NEWinogradLayer / NEWinogradLayerKernel
Gian Marcoff850932017-12-11 12:37:17 +0000582
583 - New OpenCL kernels / functions
Anthony Barbier3762e742018-03-02 11:49:33 +0000584 - @ref CLGEMMLowpOffsetContributionKernel / @ref CLGEMMLowpMatrixAReductionKernel / @ref CLGEMMLowpMatrixBReductionKernel / @ref CLGEMMLowpMatrixMultiplyCore
585 - @ref CLGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPointKernel / @ref CLGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPoint
586 - @ref CLGEMMLowpQuantizeDownInt32ToUint8ScaleKernel / @ref CLGEMMLowpQuantizeDownInt32ToUint8Scale
Gian Marcoff850932017-12-11 12:37:17 +0000587
588 - New graph nodes for NEON and OpenCL
Georgios Pinitasd9eb2752018-04-03 13:44:29 +0100589 - graph::BranchLayer
590 - graph::DepthConvertLayer
591 - graph::DepthwiseConvolutionLayer
592 - graph::DequantizationLayer
593 - graph::FlattenLayer
594 - graph::QuantizationLayer
595 - graph::ReshapeLayer
Gian Marcoff850932017-12-11 12:37:17 +0000596
Anthony Barbier3c5b4ff2017-10-12 13:20:52 +0100597v17.10 Public maintenance release
598 - Bug fixes:
599 - Check the maximum local workgroup size supported by OpenCL devices
600 - Minor documentation updates (Fixed instructions to build the examples)
Anthony Barbier3762e742018-03-02 11:49:33 +0000601 - Introduced a graph::GraphContext
Anthony Barbier3c5b4ff2017-10-12 13:20:52 +0100602 - Added a few new Graph nodes, support for branches and grouping.
603 - Automatically enable cl_printf in debug builds
604 - Fixed bare metal builds for armv7a
605 - Added AlexNet and cartoon effect examples
606 - 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)
607
Anthony Barbier6a5627a2017-09-26 14:42:02 +0100608v17.09 Public major release
609 - Experimental Graph support: initial implementation of a simple stream API to easily chain machine learning layers.
Anthony Barbier3762e742018-03-02 11:49:33 +0000610 - Memory Manager (@ref BlobLifetimeManager, @ref BlobMemoryPool, @ref ILifetimeManager, @ref IMemoryGroup, @ref IMemoryManager, @ref IMemoryPool, @ref IPoolManager, @ref MemoryManagerOnDemand, @ref PoolManager)
Anthony Barbier6a5627a2017-09-26 14:42:02 +0100611 - New validation and benchmark frameworks (Boost and Google frameworks replaced by homemade framework).
612 - Most machine learning functions support both fixed point 8 and 16 bit (QS8, QS16) for both NEON and OpenCL.
613 - New NEON kernels / functions:
Pablo Telloeb82fd22018-02-23 13:43:50 +0000614 - arm_compute::NEGEMMAssemblyBaseKernel arm_compute::NEGEMMAArch64Kernel
Anthony Barbier3762e742018-03-02 11:49:33 +0000615 - @ref NEDequantizationLayerKernel / @ref NEDequantizationLayer
616 - @ref NEFloorKernel / @ref NEFloor
617 - @ref NEL2NormalizeLayerKernel / @ref NEL2NormalizeLayer
618 - @ref NEQuantizationLayerKernel @ref NEMinMaxLayerKernel / @ref NEQuantizationLayer
619 - @ref NEROIPoolingLayerKernel / @ref NEROIPoolingLayer
620 - @ref NEReductionOperationKernel / @ref NEReductionOperation
621 - @ref NEReshapeLayerKernel / @ref NEReshapeLayer
Anthony Barbier6a5627a2017-09-26 14:42:02 +0100622
623 - New OpenCL kernels / functions:
giuros016d109962019-01-07 17:47:19 +0000624 - @ref CLDepthwiseConvolutionLayer3x3NCHWKernel @ref CLDepthwiseConvolutionLayer3x3NHWCKernel @ref CLDepthwiseIm2ColKernel @ref CLDepthwiseVectorToTensorKernel CLDepthwiseWeightsReshapeKernel / @ref CLDepthwiseConvolutionLayer3x3 @ref CLDepthwiseConvolutionLayer @ref CLDepthwiseSeparableConvolutionLayer
Anthony Barbier3762e742018-03-02 11:49:33 +0000625 - @ref CLDequantizationLayerKernel / @ref CLDequantizationLayer
626 - @ref CLDirectConvolutionLayerKernel / @ref CLDirectConvolutionLayer
627 - @ref CLFlattenLayer
628 - @ref CLFloorKernel / @ref CLFloor
629 - @ref CLGEMMTranspose1xW
630 - @ref CLGEMMMatrixVectorMultiplyKernel
631 - @ref CLL2NormalizeLayerKernel / @ref CLL2NormalizeLayer
632 - @ref CLQuantizationLayerKernel @ref CLMinMaxLayerKernel / @ref CLQuantizationLayer
633 - @ref CLROIPoolingLayerKernel / @ref CLROIPoolingLayer
634 - @ref CLReductionOperationKernel / @ref CLReductionOperation
635 - @ref CLReshapeLayerKernel / @ref CLReshapeLayer
Anthony Barbier6a5627a2017-09-26 14:42:02 +0100636
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100637v17.06 Public major release
638 - Various bug fixes
639 - Added support for fixed point 8 bit (QS8) to the various NEON machine learning kernels.
640 - Added unit tests and benchmarks (AlexNet, LeNet)
641 - Added support for sub tensors.
642 - Added infrastructure to provide GPU specific optimisation for some OpenCL kernels.
Anthony Barbier3762e742018-03-02 11:49:33 +0000643 - Added @ref OMPScheduler (OpenMP) scheduler for NEON
644 - Added @ref SingleThreadScheduler scheduler for NEON (For bare metal)
645 - User can specify his own scheduler by implementing the @ref IScheduler interface.
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100646 - New OpenCL kernels / functions:
Anthony Barbier3762e742018-03-02 11:49:33 +0000647 - @ref CLBatchNormalizationLayerKernel / @ref CLBatchNormalizationLayer
648 - @ref CLDepthConcatenateLayerKernel / @ref CLDepthConcatenateLayer
649 - @ref CLHOGOrientationBinningKernel @ref CLHOGBlockNormalizationKernel, @ref CLHOGDetectorKernel / @ref CLHOGDescriptor @ref CLHOGDetector @ref CLHOGGradient @ref CLHOGMultiDetection
650 - @ref CLLocallyConnectedMatrixMultiplyKernel / @ref CLLocallyConnectedLayer
651 - @ref CLWeightsReshapeKernel / @ref CLConvolutionLayerReshapeWeights
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100652 - New C++ kernels:
Anthony Barbier3762e742018-03-02 11:49:33 +0000653 - @ref CPPDetectionWindowNonMaximaSuppressionKernel
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100654 - New NEON kernels / functions:
Anthony Barbier3762e742018-03-02 11:49:33 +0000655 - @ref NEBatchNormalizationLayerKernel / @ref NEBatchNormalizationLayer
656 - @ref NEDepthConcatenateLayerKernel / @ref NEDepthConcatenateLayer
657 - @ref NEDirectConvolutionLayerKernel / @ref NEDirectConvolutionLayer
658 - @ref NELocallyConnectedMatrixMultiplyKernel / @ref NELocallyConnectedLayer
659 - @ref NEWeightsReshapeKernel / @ref NEConvolutionLayerReshapeWeights
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100660
661v17.05 Public bug fixes release
662 - Various bug fixes
663 - Remaining of the functions ported to use accurate padding.
664 - Library does not link against OpenCL anymore (It uses dlopen / dlsym at runtime instead to determine whether or not OpenCL is available).
665 - Added "free" method to allocator.
666 - Minimum version of g++ required for armv7 Linux changed from 4.8 to 4.9
667
668v17.04 Public bug fixes release
669
670 The following functions have been ported to use the new accurate padding:
Anthony Barbier3762e742018-03-02 11:49:33 +0000671 - @ref CLColorConvertKernel
672 - @ref CLEdgeNonMaxSuppressionKernel
673 - @ref CLEdgeTraceKernel
674 - @ref CLGaussianPyramidHorKernel
675 - @ref CLGaussianPyramidVertKernel
676 - @ref CLGradientKernel
677 - @ref NEChannelCombineKernel
678 - @ref NEFillArrayKernel
679 - @ref NEGaussianPyramidHorKernel
680 - @ref NEGaussianPyramidVertKernel
Georgios Pinitas09d34512018-08-30 16:02:11 +0100681 - NEHarrisScoreFP16Kernel
Anthony Barbier3762e742018-03-02 11:49:33 +0000682 - @ref NEHarrisScoreKernel
683 - @ref NEHOGDetectorKernel
684 - @ref NELogits1DMaxKernel
685 - NELogits1DShiftExpSumKernel
686 - NELogits1DNormKernel
687 - @ref NENonMaximaSuppression3x3FP16Kernel
688 - @ref NENonMaximaSuppression3x3Kernel
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100689
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100690v17.03.1 First Major public release of the sources
691 - Renamed the library to arm_compute
692 - New CPP target introduced for C++ kernels shared between NEON and CL functions.
693 - New padding calculation interface introduced and ported most kernels / functions to use it.
694 - New OpenCL kernels / functions:
Anthony Barbier3762e742018-03-02 11:49:33 +0000695 - @ref CLGEMMLowpMatrixMultiplyKernel / CLGEMMLowp
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100696 - New NEON kernels / functions:
Anthony Barbier3762e742018-03-02 11:49:33 +0000697 - @ref NENormalizationLayerKernel / @ref NENormalizationLayer
698 - @ref NETransposeKernel / @ref NETranspose
699 - @ref NELogits1DMaxKernel, NELogits1DShiftExpSumKernel, NELogits1DNormKernel / @ref NESoftmaxLayer
700 - @ref NEIm2ColKernel, @ref NECol2ImKernel, NEConvolutionLayerWeightsReshapeKernel / @ref NEConvolutionLayer
701 - @ref NEGEMMMatrixAccumulateBiasesKernel / @ref NEFullyConnectedLayer
702 - @ref NEGEMMLowpMatrixMultiplyKernel / NEGEMMLowp
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100703
704v17.03 Sources preview
705 - New OpenCL kernels / functions:
Anthony Barbier3762e742018-03-02 11:49:33 +0000706 - @ref CLGradientKernel, @ref CLEdgeNonMaxSuppressionKernel, @ref CLEdgeTraceKernel / @ref CLCannyEdge
707 - GEMM refactoring + FP16 support: @ref CLGEMMInterleave4x4Kernel, @ref CLGEMMTranspose1xWKernel, @ref CLGEMMMatrixMultiplyKernel, @ref CLGEMMMatrixAdditionKernel / @ref CLGEMM
708 - @ref CLGEMMMatrixAccumulateBiasesKernel / @ref CLFullyConnectedLayer
709 - @ref CLTransposeKernel / @ref CLTranspose
710 - @ref CLLKTrackerInitKernel, @ref CLLKTrackerStage0Kernel, @ref CLLKTrackerStage1Kernel, @ref CLLKTrackerFinalizeKernel / @ref CLOpticalFlow
711 - @ref CLNormalizationLayerKernel / @ref CLNormalizationLayer
712 - @ref CLLaplacianPyramid, @ref CLLaplacianReconstruct
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100713 - New NEON kernels / functions:
Anthony Barbier3762e742018-03-02 11:49:33 +0000714 - @ref NEActivationLayerKernel / @ref NEActivationLayer
715 - GEMM refactoring + FP16 support (Requires armv8.2 CPU): @ref NEGEMMInterleave4x4Kernel, @ref NEGEMMTranspose1xWKernel, @ref NEGEMMMatrixMultiplyKernel, @ref NEGEMMMatrixAdditionKernel / @ref NEGEMM
716 - @ref NEPoolingLayerKernel / @ref NEPoolingLayer
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100717
718v17.02.1 Sources preview
719 - New OpenCL kernels / functions:
Anthony Barbier3762e742018-03-02 11:49:33 +0000720 - @ref CLLogits1DMaxKernel, @ref CLLogits1DShiftExpSumKernel, @ref CLLogits1DNormKernel / @ref CLSoftmaxLayer
721 - @ref CLPoolingLayerKernel / @ref CLPoolingLayer
722 - @ref CLIm2ColKernel, @ref CLCol2ImKernel, CLConvolutionLayerWeightsReshapeKernel / @ref CLConvolutionLayer
723 - @ref CLRemapKernel / @ref CLRemap
724 - @ref CLGaussianPyramidHorKernel, @ref CLGaussianPyramidVertKernel / @ref CLGaussianPyramid, @ref CLGaussianPyramidHalf, @ref CLGaussianPyramidOrb
725 - @ref CLMinMaxKernel, @ref CLMinMaxLocationKernel / @ref CLMinMaxLocation
726 - @ref CLNonLinearFilterKernel / @ref CLNonLinearFilter
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100727 - New NEON FP16 kernels (Requires armv8.2 CPU)
Anthony Barbier3762e742018-03-02 11:49:33 +0000728 - @ref NEAccumulateWeightedFP16Kernel
729 - @ref NEBox3x3FP16Kernel
730 - @ref NENonMaximaSuppression3x3FP16Kernel
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100731
732v17.02 Sources preview
733 - New OpenCL kernels / functions:
Anthony Barbier3762e742018-03-02 11:49:33 +0000734 - @ref CLActivationLayerKernel / @ref CLActivationLayer
735 - @ref CLChannelCombineKernel / @ref CLChannelCombine
736 - @ref CLDerivativeKernel / @ref CLChannelExtract
737 - @ref CLFastCornersKernel / @ref CLFastCorners
738 - @ref CLMeanStdDevKernel / @ref CLMeanStdDev
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100739 - New NEON kernels / functions:
Anthony Barbier3762e742018-03-02 11:49:33 +0000740 - HOG / SVM: @ref NEHOGOrientationBinningKernel, @ref NEHOGBlockNormalizationKernel, @ref NEHOGDetectorKernel, NEHOGNonMaximaSuppressionKernel / @ref NEHOGDescriptor, @ref NEHOGDetector, @ref NEHOGGradient, @ref NEHOGMultiDetection
741 - @ref NENonLinearFilterKernel / @ref NENonLinearFilter
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100742 - Introduced a CLScheduler to manage the default context and command queue used by the runtime library and create synchronisation events.
743 - Switched all the kernels / functions to use tensors instead of images.
744 - Updated documentation to include instructions to build the library from sources.
745
746v16.12 Binary preview release
747 - Original release
748
749@section S3_how_to_build How to build the library and the examples
750
751@subsection S3_1_build_options Build options
752
753scons 2.3 or above is required to build the library.
754To see the build options available simply run ```scons -h```:
755
Anthony Barbier79c61782017-06-23 11:48:24 +0100756 debug: Debug (yes|no)
757 default: False
758 actual: False
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100759
Anthony Barbier79c61782017-06-23 11:48:24 +0100760 asserts: Enable asserts (this flag is forced to 1 for debug=1) (yes|no)
761 default: False
762 actual: False
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100763
Anthony Barbier79c61782017-06-23 11:48:24 +0100764 arch: Target Architecture (armv7a|arm64-v8a|arm64-v8.2-a|x86_32|x86_64)
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100765 default: armv7a
766 actual: armv7a
767
Anthony Barbier79c61782017-06-23 11:48:24 +0100768 os: Target OS (linux|android|bare_metal)
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100769 default: linux
770 actual: linux
771
Anthony Barbier2d0ce772018-02-21 15:35:36 +0000772 build: Build type (native|cross_compile|embed_only)
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100773 default: cross_compile
774 actual: cross_compile
775
Anthony Barbier79c61782017-06-23 11:48:24 +0100776 examples: Build example programs (yes|no)
777 default: True
778 actual: True
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100779
Anthony Barbier79c61782017-06-23 11:48:24 +0100780 Werror: Enable/disable the -Werror compilation flag (yes|no)
781 default: True
782 actual: True
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100783
Anthony Barbier79c61782017-06-23 11:48:24 +0100784 opencl: Enable OpenCL support (yes|no)
785 default: True
786 actual: True
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100787
Anthony Barbier79c61782017-06-23 11:48:24 +0100788 neon: Enable Neon support (yes|no)
789 default: False
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100790 actual: False
791
Anthony Barbier20dbb822017-12-13 21:19:39 +0000792 gles_compute: Enable OpenGL ES Compute Shader support (yes|no)
793 default: False
794 actual: False
795
796 embed_kernels: Embed OpenCL kernels and OpenGL ES compute shader in library binary (yes|no)
Anthony Barbiercc0a80b2017-12-15 11:37:29 +0000797 default: True
798 actual: True
Anthony Barbier79c61782017-06-23 11:48:24 +0100799
800 set_soname: Set the library's soname and shlibversion (requires SCons 2.4 or above) (yes|no)
801 default: False
802 actual: False
803
804 openmp: Enable OpenMP backend (yes|no)
805 default: False
806 actual: False
807
808 cppthreads: Enable C++11 threads backend (yes|no)
809 default: True
810 actual: True
811
812 build_dir: Specify sub-folder for the build ( /path/to/build_dir )
813 default: .
814 actual: .
815
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100816 extra_cxx_flags: Extra CXX flags to be appended to the build command
817 default:
818 actual:
819
Anthony Barbier79c61782017-06-23 11:48:24 +0100820 pmu: Enable PMU counters (yes|no)
821 default: False
822 actual: False
823
Anthony Barbier6a5627a2017-09-26 14:42:02 +0100824 mali: Enable Mali hardware counters (yes|no)
825 default: False
826 actual: False
827
Anthony Barbier79c61782017-06-23 11:48:24 +0100828 validation_tests: Build validation test programs (yes|no)
829 default: False
830 actual: False
831
832 benchmark_tests: Build benchmark test programs (yes|no)
833 default: False
834 actual: False
835
836@b debug / @b asserts:
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100837 - With debug=1 asserts are enabled, and the library is built with symbols and no optimisations enabled.
838 - 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)
839 - 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).
840
Anthony Barbier79c61782017-06-23 11:48:24 +0100841@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 +0100842
Anthony Barbier79c61782017-06-23 11:48:24 +0100843@b os: Choose the operating system you are targeting: Linux, Android or bare metal.
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100844@note bare metal can only be used for NEON (not OpenCL), only static libraries get built and NEON's multi-threading support is disabled.
845
Anthony Barbier79c61782017-06-23 11:48:24 +0100846@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 +0100847
Anthony Barbier79c61782017-06-23 11:48:24 +0100848@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 +0100849
Anthony Barbier2d0ce772018-02-21 15:35:36 +0000850There 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.
851
Anthony Barbier79c61782017-06-23 11:48:24 +0100852@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 +0100853
Anthony Barbier20dbb822017-12-13 21:19:39 +0000854@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 +0100855
Anthony Barbier20dbb822017-12-13 21:19:39 +0000856@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 +0100857
858@b set_soname: Do you want to build the versioned version of the library ?
859
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100860If enabled the library will contain a SONAME and SHLIBVERSION and some symlinks will automatically be created between the objects.
861Example:
862 libarm_compute_core.so -> libarm_compute_core.so.1.0.0
863 libarm_compute_core.so.1 -> libarm_compute_core.so.1.0.0
864 libarm_compute_core.so.1.0.0
865
866@note This options is disabled by default as it requires SCons version 2.4 or above.
867
Anthony Barbier79c61782017-06-23 11:48:24 +0100868@b extra_cxx_flags: Custom CXX flags which will be appended to the end of the build command.
869
870@b build_dir: Build the library in a subfolder of the "build" folder. (Allows to build several configurations in parallel).
871
872@b examples: Build or not the examples
873
874@b validation_tests: Enable the build of the validation suite.
875
Anthony Barbier79c61782017-06-23 11:48:24 +0100876@b benchmark_tests: Enable the build of the benchmark tests
877
878@b pmu: Enable the PMU cycle counter to measure execution time in benchmark tests. (Your device needs to support it)
879
Anthony Barbier6a5627a2017-09-26 14:42:02 +0100880@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)
881
Anthony Barbier79c61782017-06-23 11:48:24 +0100882@b openmp Build in the OpenMP scheduler for NEON.
883
884@note Only works when building with g++ not clang++
885
886@b cppthreads Build in the C++11 scheduler for NEON.
887
Anthony Barbier3762e742018-03-02 11:49:33 +0000888@sa Scheduler::set
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100889
Moritz Pflanzer07674de2017-07-21 09:39:36 +0100890@subsection S3_2_linux Building for Linux
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100891
892@subsubsection S3_2_1_library How to build the library ?
893
894For Linux, the library was successfully built and tested using the following Linaro GCC toolchain:
895
Michele Di Giorgio6513ccb2018-08-28 14:38:35 +0100896 - gcc-linaro-4.9-2016.02-x86_64_arm-linux-gnueabihf
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100897 - gcc-linaro-4.9-2016.02-x86_64_aarch64-linux-gnu
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100898
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100899To cross-compile the library in debug mode, with NEON only support, for Linux 32bit:
900
901 scons Werror=1 -j8 debug=1 neon=1 opencl=0 os=linux arch=armv7a
902
903To cross-compile the library in asserts mode, with OpenCL only support, for Linux 64bit:
904
905 scons Werror=1 -j8 debug=0 asserts=1 neon=0 opencl=1 embed_kernels=1 os=linux arch=arm64-v8a
906
Anthony Barbier20dbb822017-12-13 21:19:39 +0000907To cross-compile the library in asserts mode, with GLES_COMPUTE only support, for Linux 64bit:
908
909 scons Werror=1 -j8 debug=0 asserts=1 neon=0 opencl=0 gles_compute=1 embed_kernels=1 os=linux arch=arm64-v8a
910
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100911You can also compile the library natively on an ARM device by using <b>build=native</b>:
912
913 scons Werror=1 -j8 debug=0 neon=1 opencl=0 os=linux arch=arm64-v8a build=native
914 scons Werror=1 -j8 debug=0 neon=1 opencl=0 os=linux arch=armv7a build=native
915
916@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.
917
918For example on a 64bit Debian based system you would have to install <b>g++-arm-linux-gnueabihf</b>
919
920 apt-get install g++-arm-linux-gnueabihf
921
922Then run
923
924 scons Werror=1 -j8 debug=0 neon=1 opencl=0 os=linux arch=armv7a build=cross_compile
925
926or simply remove the build parameter as build=cross_compile is the default value:
927
928 scons Werror=1 -j8 debug=0 neon=1 opencl=0 os=linux arch=armv7a
929
930@attention To cross compile with opencl=1 you need to make sure to have a version of libOpenCL matching your target architecture.
931
932@subsubsection S3_2_2_examples How to manually build the examples ?
933
934The 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.
935
Georgios Pinitasd9eb2752018-04-03 13:44:29 +0100936@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 Barbier6ff3b192017-09-04 18:44:23 +0100937
938To cross compile a NEON example for Linux 32bit:
939
Anthony Barbierb2881fc2017-09-29 17:12:12 +0100940 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 +0100941
942To cross compile a NEON example for Linux 64bit:
943
Anthony Barbierb2881fc2017-09-29 17:12:12 +0100944 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 +0100945
946(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)
947
948To cross compile an OpenCL example for Linux 32bit:
949
Georgios Pinitasd9eb2752018-04-03 13:44:29 +0100950 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 Barbier6ff3b192017-09-04 18:44:23 +0100951
952To cross compile an OpenCL example for Linux 64bit:
953
Georgios Pinitasd9eb2752018-04-03 13:44:29 +0100954 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
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100955
Anthony Barbier14c86a92017-12-14 16:27:41 +0000956To cross compile a GLES example for Linux 32bit:
957
958 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
959
960To cross compile a GLES example for Linux 64bit:
961
962 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
963
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100964(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)
965
Anthony Barbier14c86a92017-12-14 16:27:41 +0000966To 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.
967
968@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 +0100969
970i.e. to cross compile the "graph_lenet" example for Linux 32bit:
971
Georgios Pinitas12be7ab2018-07-03 12:06:23 +0100972 arm-linux-gnueabihf-g++ examples/graph_lenet.cpp utils/Utils.cpp utils/GraphUtils.cpp utils/CommonGraphOptions.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 +0100973
974i.e. to cross compile the "graph_lenet" example for Linux 64bit:
975
Georgios Pinitas12be7ab2018-07-03 12:06:23 +0100976 aarch64-linux-gnu-g++ examples/graph_lenet.cpp utils/Utils.cpp utils/GraphUtils.cpp utils/CommonGraphOptions.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 +0100977
978(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)
979
Anthony Barbiere5007472017-10-27 15:01:44 +0100980@note If compiling using static libraries, this order must be followed when linking: arm_compute_graph_static, arm_compute, arm_compute_core
981
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100982To compile natively (i.e directly on an ARM device) for NEON for Linux 32bit:
983
Anthony Barbierb2881fc2017-09-29 17:12:12 +0100984 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 +0100985
986To compile natively (i.e directly on an ARM device) for NEON for Linux 64bit:
987
Anthony Barbierb2881fc2017-09-29 17:12:12 +0100988 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 +0100989
990(notice the only difference with the 32 bit command is that we don't need the -mfpu option)
991
992To compile natively (i.e directly on an ARM device) for OpenCL for Linux 32bit or Linux 64bit:
993
Georgios Pinitasd9eb2752018-04-03 13:44:29 +0100994 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 Barbier6ff3b192017-09-04 18:44:23 +0100995
Anthony Barbier14c86a92017-12-14 16:27:41 +0000996To 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 +0100997
Anthony Barbier14c86a92017-12-14 16:27:41 +0000998 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
999
1000To 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.
1001@note The compute library must currently be built with both neon and opencl enabled - neon=1 and opencl=1
1002
1003i.e. to natively compile the "graph_lenet" example for Linux 32bit:
Gian Marco Iodicedaec1aa2017-09-29 12:03:18 +01001004
Georgios Pinitas12be7ab2018-07-03 12:06:23 +01001005 g++ examples/graph_lenet.cpp utils/Utils.cpp utils/GraphUtils.cpp utils/CommonGraphOptions.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 +01001006
Anthony Barbier14c86a92017-12-14 16:27:41 +00001007i.e. to natively compile the "graph_lenet" example for Linux 64bit:
Gian Marco Iodicedaec1aa2017-09-29 12:03:18 +01001008
Georgios Pinitas12be7ab2018-07-03 12:06:23 +01001009 g++ examples/graph_lenet.cpp utils/Utils.cpp utils/GraphUtils.cpp utils/CommonGraphOptions.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 +01001010
1011(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 +01001012
Anthony Barbiere5007472017-10-27 15:01:44 +01001013@note If compiling using static libraries, this order must be followed when linking: arm_compute_graph_static, arm_compute, arm_compute_core
1014
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001015@note These two commands assume libarm_compute.so is available in your library path, if not add the path to it using -L
1016
1017To run the built executable simply run:
1018
1019 LD_LIBRARY_PATH=build ./neon_convolution
1020
1021or
1022
1023 LD_LIBRARY_PATH=build ./cl_convolution
1024
Georgios Pinitas9f28b392018-07-18 20:01:53 +01001025@note Examples accept different types of arguments, to find out what they are run the example with \a --help as an argument. If no arguments are specified then random values will be used to execute the graph.
Anthony Barbier3762e742018-03-02 11:49:33 +00001026
1027For example:
Anthony Barbier38e7f1f2018-05-21 13:37:47 +01001028
Georgios Pinitas9f28b392018-07-18 20:01:53 +01001029 LD_LIBRARY_PATH=. ./graph_lenet --help
Anthony Barbier3762e742018-03-02 11:49:33 +00001030
Georgios Pinitas9f28b392018-07-18 20:01:53 +01001031Below is a list of the common parameters among the graph examples :
1032@snippet utils/CommonGraphOptions.h Common graph examples parameters
Anthony Barbier3762e742018-03-02 11:49:33 +00001033
Moritz Pflanzer07674de2017-07-21 09:39:36 +01001034@subsection S3_3_android Building for Android
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001035
1036For Android, the library was successfully built and tested using Google's standalone toolchains:
Anthony Barbierd51ea0a2018-08-07 17:48:03 +01001037 - clang++ from NDK r17b for armv7a
1038 - clang++ from NDK r17b for arm64-v8a
Anthony Barbier3a6163e2018-08-10 17:36:36 +01001039 - clang++ from NDK r18-beta1 for arm64-v8.2-a with FP16 support
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001040
1041Here is a guide to <a href="https://developer.android.com/ndk/guides/standalone_toolchain.html">create your Android standalone toolchains from the NDK</a>
1042
Anthony Barbierd51ea0a2018-08-07 17:48:03 +01001043- Download the NDK r17b from here: https://developer.android.com/ndk/downloads/index.html
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001044- Make sure you have Python 2 installed on your machine.
1045- Generate the 32 and/or 64 toolchains by running the following commands:
1046
Anthony Barbier38e7f1f2018-05-21 13:37:47 +01001047
Anthony Barbierd51ea0a2018-08-07 17:48:03 +01001048 $NDK/build/tools/make_standalone_toolchain.py --arch arm64 --install-dir $MY_TOOLCHAINS/aarch64-linux-android-ndk-r17b --stl libc++ --api 21
1049 $NDK/build/tools/make_standalone_toolchain.py --arch arm --install-dir $MY_TOOLCHAINS/arm-linux-android-ndk-r17b --stl libc++ --api 21
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001050
Anthony Barbierd51ea0a2018-08-07 17:48:03 +01001051@attention We used to use gnustl but as of NDK r17 it is deprecated so we switched to libc++
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001052
Anthony Barbier38e7f1f2018-05-21 13:37:47 +01001053@note Make sure to add the toolchains to your PATH:
1054
Anthony Barbierd51ea0a2018-08-07 17:48:03 +01001055 export PATH=$PATH:$MY_TOOLCHAINS/aarch64-linux-android-ndk-r17b/bin:$MY_TOOLCHAINS/arm-linux-android-ndk-r17b/bin
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001056
1057@subsubsection S3_3_1_library How to build the library ?
1058
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001059To cross-compile the library in debug mode, with NEON only support, for Android 32bit:
1060
1061 CXX=clang++ CC=clang scons Werror=1 -j8 debug=1 neon=1 opencl=0 os=android arch=armv7a
1062
1063To cross-compile the library in asserts mode, with OpenCL only support, for Android 64bit:
1064
Anthony Barbier14c86a92017-12-14 16:27:41 +00001065 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 +01001066
Anthony Barbier20dbb822017-12-13 21:19:39 +00001067To cross-compile the library in asserts mode, with GLES_COMPUTE only support, for Android 64bit:
1068
Anthony Barbier14c86a92017-12-14 16:27:41 +00001069 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 +00001070
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001071@subsubsection S3_3_2_examples How to manually build the examples ?
1072
1073The 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.
1074
Georgios Pinitasd9eb2752018-04-03 13:44:29 +01001075@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 Barbier6ff3b192017-09-04 18:44:23 +01001076
1077Once you've got your Android standalone toolchain built and added to your path you can do the following:
1078
1079To cross compile a NEON example:
1080
1081 #32 bit:
Georgios Pinitas9873ea32017-12-05 15:28:55 +00001082 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 +01001083 #64 bit:
Anthony Barbier14c86a92017-12-14 16:27:41 +00001084 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 +01001085
1086To cross compile an OpenCL example:
1087
1088 #32 bit:
Georgios Pinitasd9eb2752018-04-03 13:44:29 +01001089 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 Barbier6ff3b192017-09-04 18:44:23 +01001090 #64 bit:
Georgios Pinitasd9eb2752018-04-03 13:44:29 +01001091 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 Barbier14c86a92017-12-14 16:27:41 +00001092
1093To cross compile a GLES example:
Anthony Barbiercc0a80b2017-12-15 11:37:29 +00001094
Anthony Barbier14c86a92017-12-14 16:27:41 +00001095 #32 bit:
1096 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
1097 #64 bit:
1098 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 +01001099
Gian Marco Iodicedaec1aa2017-09-29 12:03:18 +01001100To cross compile the examples with the Graph API, such as graph_lenet.cpp, you need to link the library arm_compute_graph also.
1101(notice the compute library has to be built with both neon and opencl enabled - neon=1 and opencl=1)
1102
1103 #32 bit:
Georgios Pinitas12be7ab2018-07-03 12:06:23 +01001104 arm-linux-androideabi-clang++ examples/graph_lenet.cpp utils/Utils.cpp utils/GraphUtils.cpp utils/CommonGraphOptions.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
Gian Marco Iodicedaec1aa2017-09-29 12:03:18 +01001105 #64 bit:
Georgios Pinitas12be7ab2018-07-03 12:06:23 +01001106 aarch64-linux-android-clang++ examples/graph_lenet.cpp utils/Utils.cpp utils/GraphUtils.cpp utils/CommonGraphOptions.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
Gian Marco Iodicedaec1aa2017-09-29 12:03:18 +01001107
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001108@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 +00001109@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 +01001110
1111Then you need to do is upload the executable and the shared library to the device using ADB:
1112
1113 adb push neon_convolution_arm /data/local/tmp/
1114 adb push cl_convolution_arm /data/local/tmp/
Anthony Barbier14c86a92017-12-14 16:27:41 +00001115 adb push gc_absdiff_arm /data/local/tmp/
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001116 adb shell chmod 777 -R /data/local/tmp/
1117
1118And finally to run the example:
1119
1120 adb shell /data/local/tmp/neon_convolution_arm
1121 adb shell /data/local/tmp/cl_convolution_arm
Anthony Barbier14c86a92017-12-14 16:27:41 +00001122 adb shell /data/local/tmp/gc_absdiff_arm
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001123
1124For 64bit:
1125
1126 adb push neon_convolution_aarch64 /data/local/tmp/
1127 adb push cl_convolution_aarch64 /data/local/tmp/
Anthony Barbier14c86a92017-12-14 16:27:41 +00001128 adb push gc_absdiff_aarch64 /data/local/tmp/
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001129 adb shell chmod 777 -R /data/local/tmp/
1130
1131And finally to run the example:
1132
1133 adb shell /data/local/tmp/neon_convolution_aarch64
1134 adb shell /data/local/tmp/cl_convolution_aarch64
Anthony Barbier14c86a92017-12-14 16:27:41 +00001135 adb shell /data/local/tmp/gc_absdiff_aarch64
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001136
Georgios Pinitas9f28b392018-07-18 20:01:53 +01001137@note Examples accept different types of arguments, to find out what they are run the example with \a --help as an argument. If no arguments are specified then random values will be used to execute the graph.
Anthony Barbier3762e742018-03-02 11:49:33 +00001138
1139For example:
Georgios Pinitas9f28b392018-07-18 20:01:53 +01001140 adb shell /data/local/tmp/graph_lenet --help
Anthony Barbier3762e742018-03-02 11:49:33 +00001141
1142In 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.
1143
Michalis Spyrou6e52ba32017-10-04 15:40:38 +01001144@subsection S3_4_bare_metal Building for bare metal
1145
1146For bare metal, the library was successfully built using linaros's latest (gcc-linaro-6.3.1-2017.05) bare metal toolchains:
1147 - arm-eabi for armv7a
1148 - aarch64-elf for arm64-v8a
1149
1150Download 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>.
1151
1152@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
1153
1154@subsubsection S3_4_1_library How to build the library ?
1155
1156To cross-compile the library with NEON support for baremetal arm64-v8a:
1157
1158 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
1159
1160@subsubsection S3_4_2_examples How to manually build the examples ?
1161
1162Examples 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>.
1163
1164@subsection S3_5_windows_host Building on a Windows host system
Moritz Pflanzer07674de2017-07-21 09:39:36 +01001165
1166Using `scons` directly from the Windows command line is known to cause
1167problems. The reason seems to be that if `scons` is setup for cross-compilation
1168it gets confused about Windows style paths (using backslashes). Thus it is
1169recommended to follow one of the options outlined below.
1170
Michalis Spyrou6e52ba32017-10-04 15:40:38 +01001171@subsubsection S3_5_1_ubuntu_on_windows Bash on Ubuntu on Windows
Moritz Pflanzer07674de2017-07-21 09:39:36 +01001172
1173The best and easiest option is to use
1174<a href="https://msdn.microsoft.com/en-gb/commandline/wsl/about">Ubuntu on Windows</a>.
1175This feature is still marked as *beta* and thus might not be available.
1176However, if it is building the library is as simple as opening a *Bash on
1177Ubuntu on Windows* shell and following the general guidelines given above.
1178
Michalis Spyrou6e52ba32017-10-04 15:40:38 +01001179@subsubsection S3_5_2_cygwin Cygwin
Moritz Pflanzer07674de2017-07-21 09:39:36 +01001180
1181If the Windows subsystem for Linux is not available <a href="https://www.cygwin.com/">Cygwin</a>
1182can be used to install and run `scons`. In addition to the default packages
1183installed by Cygwin `scons` has to be selected in the installer. (`git` might
1184also be useful but is not strictly required if you already have got the source
1185code of the library.) Linaro provides pre-built versions of
1186<a href="http://releases.linaro.org/components/toolchain/binaries/">GCC cross-compilers</a>
1187that can be used from the Cygwin terminal. When building for Android the
1188compiler is included in the Android standalone toolchain. After everything has
1189been set up in the Cygwin terminal the general guide on building the library
1190can be followed.
1191
Michalis Spyrou6e52ba32017-10-04 15:40:38 +01001192@subsection S3_6_cl_stub_library The OpenCL stub library
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001193
1194In 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.
1195
1196If 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.
1197
1198@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.
1199
1200To cross-compile the stub OpenCL library simply run:
1201
1202 <target-prefix>-gcc -o libOpenCL.so -Iinclude opencl-1.2-stubs/opencl_stubs.c -fPIC -shared
1203
1204For example:
1205
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001206 #Linux 32bit
1207 arm-linux-gnueabihf-gcc -o libOpenCL.so -Iinclude opencl-1.2-stubs/opencl_stubs.c -fPIC -shared
1208 #Linux 64bit
1209 aarch64-linux-gnu-gcc -o libOpenCL.so -Iinclude -shared opencl-1.2-stubs/opencl_stubs.c -fPIC
1210 #Android 32bit
1211 arm-linux-androideabi-clang -o libOpenCL.so -Iinclude -shared opencl-1.2-stubs/opencl_stubs.c -fPIC -shared
1212 #Android 64bit
Anthony Barbier14c86a92017-12-14 16:27:41 +00001213 aarch64-linux-android-clang -o libOpenCL.so -Iinclude -shared opencl-1.2-stubs/opencl_stubs.c -fPIC -shared
1214
1215@subsection S3_7_gles_stub_library The Linux OpenGLES and EGL stub libraries
1216
1217In 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.
1218
1219@note The stub libraries are only needed on Linux. For Android, the NDK toolchains already provide the meta-EGL and meta-GLES libraries.
1220
1221To cross-compile the stub OpenGLES and EGL libraries simply run:
1222
1223 <target-prefix>-gcc -o libEGL.so -Iinclude/linux opengles-3.1-stubs/EGL.c -fPIC -shared
1224 <target-prefix>-gcc -o libGLESv2.so -Iinclude/linux opengles-3.1-stubs/GLESv2.c -fPIC -shared
1225
1226 #Linux 32bit
1227 arm-linux-gnueabihf-gcc -o libEGL.so -Iinclude/linux opengles-3.1-stubs/EGL.c -fPIC -shared
1228 arm-linux-gnueabihf-gcc -o libGLESv2.so -Iinclude/linux opengles-3.1-stubs/GLESv2.c -fPIC -shared
1229
1230 #Linux 64bit
1231 aarch64-linux-gnu-gcc -o libEGL.so -Iinclude/linux opengles-3.1-stubs/EGL.c -fPIC -shared
1232 aarch64-linux-gnu-gcc -o libGLESv2.so -Iinclude/linux opengles-3.1-stubs/GLESv2.c -fPIC -shared
Georgios Pinitasd9cb0572018-07-16 12:23:09 +01001233
1234@subsection S3_8_cl_requirements OpenCL DDK Requirements
1235
1236@subsubsection S3_8_1_cl_hard_requirements Hard Requirements
1237
1238Compute Library requires OpenCL 1.1 and above with support of non uniform workgroup sizes, which is officially supported in the Mali OpenCL DDK r8p0 and above as an extension (respective extension flag is \a -cl-arm-non-uniform-work-group-size).
1239
1240Enabling 16-bit floating point calculations require \a cl_khr_fp16 extension to be supported. All Mali GPUs with compute capabilities have native support for half precision floating points.
1241
1242Use of @ref CLMeanStdDev function requires 64-bit atomics support, thus \a cl_khr_int64_base_atomics should be supported in order to use.
1243
1244@subsubsection S3_8_2_cl_performance_requirements Performance improvements
1245
1246Integer dot product built-in function extensions (and therefore optimized kernels) are available with Mali OpenCL DDK r22p0 and above for the following GPUs : G71, G76. The relevant extensions are \a cl_arm_integer_dot_product_int8, \a cl_arm_integer_dot_product_accumulate_int8 and \a cl_arm_integer_dot_product_accumulate_int16.
1247
1248OpenCL kernel level debugging can be simplified with the use of printf, this requires the \a cl_arm_printf extension to be supported.
1249
1250SVM allocations are supported for all the underlying allocations in Compute Library. To enable this OpenCL 2.0 and above is a requirement.
Gian Marco Iodice201cea12018-07-30 17:21:41 +01001251
1252@subsection S3_9_cl_tuner OpenCL Tuner
1253
1254The OpenCL tuner, a.k.a. CLTuner, is a module of Arm Compute Library that can improve the performance of the OpenCL kernels tuning the Local-Workgroup-Size (LWS).
1255The optimal LWS for each unique OpenCL kernel configuration is stored in a table. This table can be either imported or exported from/to a file.
1256The OpenCL tuner performs a brute-force approach: it runs the same OpenCL kernel for a range of local workgroup sizes and keep the local workgroup size of the fastest run to use in subsequent calls to the kernel.
1257In order for the performance numbers to be meaningful you must disable the GPU power management and set it to a fixed frequency for the entire duration of the tuning phase.
1258
1259If you wish to know more about LWS and the important role on improving the GPU cache utilization, we suggest having a look at the presentation "Even Faster CNNs: Exploring the New Class of Winograd Algorithms available at the following link:
1260
1261https://www.embedded-vision.com/platinum-members/arm/embedded-vision-training/videos/pages/may-2018-embedded-vision-summit-iodice
1262
1263Tuning a network from scratch can be long and affect considerably the execution time for the first run of your network. It is recommended for this reason to store the CLTuner's result in a file to amortize this time when you either re-use the same network or the functions with the same configurations. The tuning is performed only once for each OpenCL kernel.
1264
1265CLTuner looks for the optimal LWS for each unique OpenCL kernel configuration. Since a function (i.e. Convolution Layer, Pooling Layer, Fully Connected Layer ...) can be called multiple times but with different parameters, we associate an "id" (called "config_id") to each kernel to distinguish the unique configurations.
1266
1267 #Example: 2 unique Matrix Multiply configurations
1268@code{.cpp}
1269 TensorShape a0 = TensorShape(32,32);
1270 TensorShape b0 = TensorShape(32,32);
1271 TensorShape c0 = TensorShape(32,32);
1272 TensorShape a1 = TensorShape(64,64);
1273 TensorShape b1 = TensorShape(64,64);
1274 TensorShape c1 = TensorShape(64,64);
1275
1276 Tensor a0_tensor;
1277 Tensor b0_tensor;
1278 Tensor c0_tensor;
1279 Tensor a1_tensor;
1280 Tensor b1_tensor;
1281 Tensor c1_tensor;
1282
1283 a0_tensor.allocator()->init(TensorInfo(a0, 1, DataType::F32));
1284 b0_tensor.allocator()->init(TensorInfo(b0, 1, DataType::F32));
1285 c0_tensor.allocator()->init(TensorInfo(c0, 1, DataType::F32));
1286 a1_tensor.allocator()->init(TensorInfo(a1, 1, DataType::F32));
1287 b1_tensor.allocator()->init(TensorInfo(b1, 1, DataType::F32));
1288 c1_tensor.allocator()->init(TensorInfo(c1 1, DataType::F32));
1289
1290 CLGEMM gemm0;
1291 CLGEMM gemm1;
1292
1293 // Configuration 0
1294 gemm0.configure(&a0, &b0, nullptr, &c0, 1.0f, 0.0f);
1295
1296 // Configuration 1
1297 gemm1.configure(&a1, &b1, nullptr, &c1, 1.0f, 0.0f);
1298@endcode
1299
1300@subsubsection S3_9_1_cl_tuner_how_to How to use it
1301
1302All the graph examples in the ACL's folder "examples" and the arm_compute_benchmark accept an argument to enable the OpenCL tuner and an argument to export/import the LWS values to/from a file
1303
1304 #Enable CL tuner
1305 ./graph_mobilenet --enable-tuner –-target=CL
1306 ./arm_compute_benchmark --enable-tuner
1307
1308 #Export/Import to/from a file
1309 ./graph_mobilenet --enable-tuner --target=CL --tuner-file=acl_tuner.csv
1310 ./arm_compute_benchmark --enable-tuner --tuner-file=acl_tuner.csv
1311
1312If you are importing the CLTuner'results from a file, the new tuned LWS values will be appended to it.
1313
1314Either you are benchmarking the graph examples or the test cases in the arm_compute_benchmark remember to:
1315
1316 -# Disable the power management
1317 -# Keep the GPU frequency constant
1318 -# Run multiple times the network (i.e. 10).
1319
1320If you are not using the graph API or the benchmark infrastructure you will need to manually pass a CLTuner object to CLScheduler before configuring any function.
1321
1322@code{.cpp}
1323CLTuner tuner;
1324
1325// Setup Scheduler
1326CLScheduler::get().default_init(&tuner);
1327@endcode
1328
1329After the first run, the CLTuner's results can be exported to a file using the method "save_to_file()".
1330- tuner.save_to_file("results.csv");
1331
1332This file can be also imported using the method "load_from_file("results.csv")".
1333- tuner.load_from_file("results.csv");
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001334*/
Anthony Barbierd51ea0a2018-08-07 17:48:03 +01001335} // namespace arm_compute