blob: cbfd456689768cfa085cc46cdc0890c87480edc5 [file] [log] [blame]
Jenkinsb9abeae2018-11-22 11:58:08 +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///
Jenkinsc3f34a42018-03-02 12:38:09 +000024namespace arm_compute
25{
Anthony Barbierdbdab852017-06-23 15:42:00 +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 Barbier8140e1e2017-12-14 23:48:46 +000035 - Technology: NEON / OpenCL / GLES_COMPUTE / NEON and OpenCL and GLES_COMPUTE
Anthony Barbierdbdab852017-06-23 15:42:00 +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 Barbier8140e1e2017-12-14 23:48:46 +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:
Jenkinsb9abeae2018-11-22 11:58:08 +000052 - Linux armv7a: gcc-linaro-4.9-2016.02-x86_64_arm-linux-gnueabihf
Anthony Barbier8140e1e2017-12-14 23:48:46 +000053 - Linux arm64-v8a: gcc-linaro-4.9-2016.02-x86_64_aarch64-linux-gnu
Jenkins52ba29e2018-08-29 15:32:11 +000054 - Android armv7a: clang++ / libc++ NDK r17b
55 - Android am64-v8a: clang++ / libc++ NDK r17b
Anthony Barbier8140e1e2017-12-14 23:48:46 +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 Barbierdbdab852017-06-23 15:42:00 +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 Barbier8140e1e2017-12-14 23:48:46 +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 Barbierdbdab852017-06-23 15:42:00 +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
Jenkins4ba87db2019-05-23 17:11:51 +010076 │ ├── graph.h --> Includes all the Graph headers at once.
Anthony Barbierdbdab852017-06-23 15:42:00 +010077 │   ├── core
78 │   │   ├── CL
Kaizen8938bd32017-09-28 14:38:23 +010079 │   │   │   ├── CLKernelLibrary.h --> Manages all the OpenCL kernels compilation and caching, provides accessors for the OpenCL Context.
Anthony Barbierdbdab852017-06-23 15:42:00 +010080 │   │   │   ├── CLKernels.h --> Includes all the OpenCL kernels at once
81 │   │   │   ├── CL specialisation of all the generic objects interfaces (ICLTensor, ICLImage, etc.)
82 │   │   │   ├── kernels --> Folder containing all the OpenCL kernels
83 │   │   │   │   └── CL*Kernel.h
84 │   │   │   └── OpenCL.h --> Wrapper to configure the Khronos OpenCL C++ header
85 │   │ ├── CPP
Kaizen8938bd32017-09-28 14:38:23 +010086 │   │   │   ├── CPPKernels.h --> Includes all the CPP kernels at once
Anthony Barbierdbdab852017-06-23 15:42:00 +010087 │   │ │   └── kernels --> Folder containing all the CPP kernels
Kaizen8938bd32017-09-28 14:38:23 +010088 │   │   │      └── CPP*Kernel.h
Anthony Barbier8140e1e2017-12-14 23:48:46 +000089 │   │   ├── GLES_COMPUTE
90 │   │   │   ├── GCKernelLibrary.h --> Manages all the GLES kernels compilation and caching, provides accessors for the GLES Context.
91 │   │   │   ├── GCKernels.h --> Includes all the GLES kernels at once
92 │   │   │   ├── GLES specialisation of all the generic objects interfaces (IGCTensor, IGCImage, etc.)
93 │   │   │   ├── kernels --> Folder containing all the GLES kernels
94 │   │   │   │   └── GC*Kernel.h
95 │   │   │   └── OpenGLES.h --> Wrapper to configure the Khronos EGL and OpenGL ES C header
Anthony Barbierdbdab852017-06-23 15:42:00 +010096 │   │   ├── NEON
97 │   │   │   ├── kernels --> Folder containing all the NEON kernels
Jenkinsb3a371b2018-05-23 11:36:53 +010098 │   │   │   │ ├── assembly --> headers for assembly optimised NEON kernels.
99 │   │   │   │ ├── convolution --> headers for convolution assembly optimised NEON kernels.
100 │   │   │   │   │   ├── common --> headers for code which is common to several convolution implementations.
101 │   │   │   │   │   ├── depthwise --> headers for Depthwise convolultion assembly implementation
102 │   │   │   │   │   └── winograd --> headers for Winograd convolution assembly implementation
103 │   │   │   │ ├── detail --> Common code for several intrinsics implementations.
Anthony Barbierdbdab852017-06-23 15:42:00 +0100104 │   │   │   │   └── NE*Kernel.h
105 │   │   │   └── NEKernels.h --> Includes all the NEON kernels at once
106 │   │   ├── All common basic types (Types.h, Window, Coordinates, Iterator, etc.)
107 │   │   ├── All generic objects interfaces (ITensor, IImage, etc.)
108 │   │   └── Objects metadata classes (ImageInfo, TensorInfo, MultiImageInfo)
Kaizen8938bd32017-09-28 14:38:23 +0100109 │   ├── graph
Jenkinsb3a371b2018-05-23 11:36:53 +0100110 │   │   ├── algorithms
111 │   │   │   └── Generic algorithms used by the graph backend (e.g Order of traversal)
112 │   │   ├── backends --> The backend specific code
113 │   │   │   ├── CL --> OpenCL specific operations
114 │   │   │   ├── GLES --> OpenGLES Compute Shaders specific operations
115 │   │   │   └── NEON --> NEON specific operations
116 │   │   ├── detail
117 │   │   │   └── Collection of internal utilities.
118 │   │   ├── frontend
119 │   │   │   └── Code related to the stream frontend interface.
120 │   │   ├── mutators
121 │   │   │   └── Used to modify / optimise the Graph intermediate representation(Operator fusion, in place operations, etc.)
Kaizen8938bd32017-09-28 14:38:23 +0100122 │   │   ├── nodes
123 │   │   │   └── The various nodes supported by the graph API
Jenkinsb3a371b2018-05-23 11:36:53 +0100124 │   │   ├── printers
125 │   │   │   └── Debug printers
Kaizen8938bd32017-09-28 14:38:23 +0100126 │   │   └── Graph objects ( INode, ITensorAccessor, Graph, etc.)
Anthony Barbierdbdab852017-06-23 15:42:00 +0100127 │   └── runtime
128 │   ├── CL
129 │   │   ├── CL objects & allocators (CLArray, CLImage, CLTensor, etc.)
130 │   │   ├── functions --> Folder containing all the OpenCL functions
131 │   │   │   └── CL*.h
Kaizen8938bd32017-09-28 14:38:23 +0100132 │   │   ├── CLScheduler.h --> Interface to enqueue OpenCL kernels and get/set the OpenCL CommandQueue and ICLTuner.
Jenkinsb3a371b2018-05-23 11:36:53 +0100133 │   │   ├── CLFunctions.h --> Includes all the OpenCL functions at once
134 │   │   └── tuners
135 │   │      └── Local workgroup size tuners for specific architectures / GPUs
Anthony Barbierdbdab852017-06-23 15:42:00 +0100136 │   ├── CPP
Kaizen8938bd32017-09-28 14:38:23 +0100137 │      │   ├── CPPKernels.h --> Includes all the CPP functions at once.
Jenkinsb3a371b2018-05-23 11:36:53 +0100138 │   │   ├── CPPScheduler.h --> Basic pool of threads to execute CPP/NEON code on several cores in parallel
139 │   │   └── functions --> Folder containing all the CPP functions
140 │   │      └── CPP*.h
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000141 │   ├── GLES_COMPUTE
142 │   │   ├── GLES objects & allocators (GCArray, GCImage, GCTensor, etc.)
143 │   │   ├── functions --> Folder containing all the GLES functions
144 │   │   │   └── GC*.h
145 │   │   ├── GCScheduler.h --> Interface to enqueue GLES kernels and get/set the GLES CommandQueue.
146 │   │   └── GCFunctions.h --> Includes all the GLES functions at once
Anthony Barbierdbdab852017-06-23 15:42:00 +0100147 │   ├── NEON
148 │   │ ├── functions --> Folder containing all the NEON functions
149 │   │ │   └── NE*.h
150 │   │ └── NEFunctions.h --> Includes all the NEON functions at once
Kaizen8938bd32017-09-28 14:38:23 +0100151 │   ├── OMP
152 │   │   └── OMPScheduler.h --> OpenMP scheduler (Alternative to the CPPScheduler)
153 │ ├── Memory manager files (LifetimeManager, PoolManager, etc.)
Anthony Barbierdbdab852017-06-23 15:42:00 +0100154 │   └── Basic implementations of the generic object interfaces (Array, Image, Tensor, etc.)
Jenkinsc3f34a42018-03-02 12:38:09 +0000155 ├── data -> Contains test images and reference data dumps used by validation tests
156 ├── docs -> Contains Doxyfile and Doxygen sources used to generate the HTML pages in the documentation folder.
Anthony Barbierdbdab852017-06-23 15:42:00 +0100157 ├── documentation
158 │   ├── index.xhtml
159 │   └── ...
160 ├── documentation.xhtml -> documentation/index.xhtml
161 ├── examples
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000162 │   ├── cl_*.cpp --> OpenCL examples
163 │   ├── gc_*.cpp --> GLES compute shaders examples
164 │   ├── graph_*.cpp --> Graph examples
165 │   ├── neoncl_*.cpp --> NEON / OpenCL interoperability examples
166 │   └── neon_*.cpp --> NEON examples
Anthony Barbierdbdab852017-06-23 15:42:00 +0100167 ├── include
Kaizen8938bd32017-09-28 14:38:23 +0100168 │   ├── CL
169 │   │ └── Khronos OpenCL C headers and C++ wrapper
170 │   ├── half --> FP16 library available from http://half.sourceforge.net
Anthony Barbier8140e1e2017-12-14 23:48:46 +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 Barbierdbdab852017-06-23 15:42:00 +0100174 ├── opencl-1.2-stubs
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000175 │ └── opencl_stubs.c --> OpenCL stubs implementation
176 ├── opengles-3.1-stubs
177 │   ├── EGL.c --> EGL stubs implementation
178 │   └── GLESv2.c --> GLESv2 stubs implementation
Kaizen8938bd32017-09-28 14:38:23 +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 Barbierdbdab852017-06-23 15:42:00 +0100182 ├── src
183 │   ├── core
184 │ │ └── ... (Same structure as headers)
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000185 │   │ ├── CL
186 │   │ │ └── cl_kernels --> All the OpenCL kernels
187 │   │ └── GLES_COMPUTE
188 │   │ └── cs_shaders --> All the OpenGL ES Compute Shaders
Kaizen8938bd32017-09-28 14:38:23 +0100189 │   ├── graph
190 │ │ └── ... (Same structure as headers)
Anthony Barbierdbdab852017-06-23 15:42:00 +0100191 │ └── runtime
192 │ └── ... (Same structure as headers)
Kaizen8938bd32017-09-28 14:38:23 +0100193 ├── support
194 │ └── Various headers to work around toolchains / platform issues.
Anthony Barbierdbdab852017-06-23 15:42:00 +0100195 ├── tests
196 │   ├── All test related files shared between validation and benchmark
Jenkinsb3a371b2018-05-23 11:36:53 +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
Kaizen8938bd32017-09-28 14:38:23 +0100204 │   ├── CL --> OpenCL accessors
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000205 │   ├── GLES_COMPUTE --> GLES accessors
Kaizen8938bd32017-09-28 14:38:23 +0100206 │   ├── NEON --> NEON accessors
Kaizen8938bd32017-09-28 14:38:23 +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.)
Jenkinsb3a371b2018-05-23 11:36:53 +0100211 │   └── validation --> Sources for validation
212 │ ├── Validation specific files
213 │   ├── fixtures
214 │ │ └── Backend agnostic fixtures to initialise and run the functions to test.
215 │   ├── reference
216 │ │ └── Reference implementation used to validate the results of the various backends.
217 │ ├── CL --> OpenCL validation tests
218 │ ├── GLES_COMPUTE --> GLES validation tests
219 │ ├── CPP --> C++ reference implementations
220 │ └── NEON --> NEON validation tests
Anthony Barbierdbdab852017-06-23 15:42:00 +0100221 └── utils --> Boiler plate code used by examples
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000222 └── Various utilities to print types, load / store assets, etc.
Anthony Barbierdbdab852017-06-23 15:42:00 +0100223
224@section S2_versions_changelog Release versions and changelog
225
226@subsection S2_1_versions Release versions
227
228All releases are numbered vYY.MM Where YY are the last two digits of the year, and MM the month number.
229If there is more than one release in a month then an extra sequential number is appended at the end:
230
231 v17.03 (First release of March 2017)
232 v17.03.1 (Second release of March 2017)
233 v17.04 (First release of April 2017)
234
235@note We're aiming at releasing one major public release with new features per quarter. All releases in between will only contain bug fixes.
236
237@subsection S2_2_changelog Changelog
238
Jenkins4ba87db2019-05-23 17:11:51 +0100239v19.05 Public major release
240 - Various bug fixes.
241 - Various optimisations.
242 - New Neon kernels / functions:
243 - @ref NEBatchToSpaceLayerKernel / @ref NEBatchToSpaceLayer
244 - @ref NEComplexPixelWiseMultiplicationKernel / @ref NEComplexPixelWiseMultiplication
245 - @ref NECropKernel / @ref NECropResize
246 - @ref NEDepthwiseConvolutionAssemblyDispatch
247 - @ref NEFFTDigitReverseKernel
248 - @ref NEFFTRadixStageKernel
249 - @ref NEFFTScaleKernel
250 - @ref NEGEMMLowpOffsetContributionOutputStageKernel
251 - @ref NEHeightConcatenateLayerKernel
252 - @ref NESpaceToBatchLayerKernel / @ref NESpaceToBatchLayer
253 - @ref NEFFT1D
254 - @ref NEFFT2D
255 - @ref NEFFTConvolutionLayer
256 - New OpenCL kernels / functions:
257 - @ref CLComplexPixelWiseMultiplicationKernel / @ref CLComplexPixelWiseMultiplication
258 - @ref CLCropKernel / @ref CLCropResize
259 - @ref CLDeconvolutionReshapeOutputKernel
260 - @ref CLFFTDigitReverseKernel
261 - @ref CLFFTRadixStageKernel
262 - @ref CLFFTScaleKernel
263 - @ref CLGEMMLowpMatrixMultiplyReshapedOnlyRHSKernel
264 - @ref CLGEMMMatrixMultiplyReshapedOnlyRHSKernel
265 - @ref CLHeightConcatenateLayerKernel
266 - @ref CLDirectDeconvolutionLayer
267 - @ref CLFFT1D
268 - @ref CLFFT2D
269 - @ref CLFFTConvolutionLayer
270 - @ref CLGEMMDeconvolutionLayer
271 - New OpenGLES kernels / functions:
272 - @ref GCConcatenateLayer
273 - Deprecated functions/interfaces
274 - @ref GCDepthConcatenateLayer
275 - @ref NEWidthConcatenateLayer
276 - @ref NEDepthConcatenateLayer
277 - @ref CLWidthConcatenateLayer
278 - @ref CLDepthConcatenateLayer
279 - @ref CLGEMMInterleave4x4
280 - @ref CLGEMMTranspose1xW
281 - Support different quantization info in CLConcatLayer.
282 - Add checks on different input/output quantization info were not supported.
283 - Tensors have different quantization information.
284 - Add FP16 support checks.
285 - Fix output quantization CLDeptwiseConv3x3 when activation is fused.
286 - New graph examples:
287 - graph_convolution
288 - graph_fully_connected
289 - graph_depthwise_convolution
290 - Deepspeech v0.4.1
291 - Add support for QASYMM8 in NEArithmeticSubtractionKernel.
292 - Add support for QASYMM8 in NEPixelWiseMultiplicationKernel.
293 - Add support for QASYMM8 NEDeconvolution.
294 - Add support for DequantizationLayer for NEON/CL.
295 - Add support for dilation in CLDepthwiseConvolution.
296 - Fuse offset contribution with the output stage when we use NEGEMMLowpMatrixMultiplyCore.
297 - Optimize CLDeconvolution.
298 - Add StackLayer to the graph API.
299 - Add support for "reflect" padding mode in NEPad.
300 - Winograd 7x7 NHWC on OpenCL.
301 - Rework CL ML layers to run exclusively on CL.
302 - Support different quantization info in PoolingLayer.
303 - Implement and test import memory interfaces.
304 - Added new tests and removed old ones.
305 - Various clang-tidy fixes.
306
Jenkins514be652019-02-28 12:25:18 +0000307v19.02 Public major release
308 - Various bug fixes.
309 - Various optimisations.
310 - New Neon kernels / functions:
311 - @ref NETileKernel / @ref NETile
312 - @ref NEFuseBatchNormalizationKernel / @ref NEFuseBatchNormalization
313 - @ref NEElementwiseOperationKernel
314 - @ref NEElementwiseMax
315 - @ref NEElementwiseMin
316 - @ref NEElementwiseSquaredDiff
317 - @ref NESelectKernel / @ref NESelect
318 - @ref NESplit
319 - @ref NESlice
320 - @ref NEUnstack
321 - @ref NEStridedSliceKernel / @ref NEStridedSlice
322 - @ref NEElementwiseUnaryKernel
323 - @ref NERsqrtLayer
324 - @ref NEExpLayer
325 - @ref NEReverseKernel / @ref NEReverse
326 - @ref NEArgMinMaxLayer
327 - @ref NEStackLayerKernel / @ref NEStackLayer
328 - @ref NERangeKernel / @ref NERange
329 - @ref NEPadLayer
330 - @ref NEMemsetKernel
331 - @ref NEGatherKernel / @ref NEGather
332 - @ref NEElementwiseComparison
333 - @ref NEElementwiseComparisonStatic
334 - @ref NEComparisonOperationKernel
335 - @ref NEElementwiseDivision
336 - New OpenCL kernels / functions:
337 - @ref CLSelectKernel / @ref CLSelect
338 - @ref CLTileKernel / @ref CLTile
339 - @ref CLComparisonKernel / @ref CLComparison
340 - @ref CLArgMinMaxLayer
341 - @ref CLElementwiseMax
342 - @ref CLElementwiseMin
343 - @ref CLElementwiseSquaredDiff
344 - @ref CLStackLayerKernel / @ref CLStackLayer
345 - @ref CLReverse / @ref CLReverseKernel
346 - @ref CLRsqrtLayer
347 - @ref CLExpLayer
348 - @ref CLElementWiseUnaryLayerKernel
349 - @ref CLGEMMReshapeLHSMatrixKernel
350 - @ref CLGEMMReshapeRHSMatrixKernel
351 - @ref CLGEMMMatrixMultiplyReshapedKernel
352 - @ref CLRangeKernel / @ref CLRange
353 - @ref CLUnstack
354 - @ref CLGatherKernel / @ref CLGather
355 - @ref CLGEMMLowpMatrixMultiplyReshapedKernel
356 - New CPP kernels / functions:
357 - @ref CPPDetectionOutputLayer
358 - @ref CPPTopKV / @ref CPPTopKVKernel
359 - Added new examples:
360 - graph_ssd_mobilenet.cpp
361 - graph_mobilenet_v2.cpp
362 - graph_resnet12.cpp
363 - graph_srcnn955.cpp
364 - graph_vgg_vdsr.cpp
365 - graph_inception_resnet_v1.cpp
366 - Add 4D tensors support to
367 - @ref NESoftmaxLayer
368 - Fused activation in @ref CLWinogradConvolutionLayer
369 - Extented @ref NEPermute to support more cases
370 - Added NEON/SVE GEMM Hybrid kernels
371 - Added u8 and s8 hybrid assembly kernels
372 - Introduced GEMM strategy name in NEGEMMAssemblyWrapper
373 - Improved @ref CLTuner
374 - Fused the bias addition within @ref CLGEMM
375 - Added support for QASYMM8 LOGISTIC activation in @ref NEActivationLayer
376 - Added NHWC data layout support to:
377 - @ref NEScale for F16
378 - @ref CLNormalizationLayer IN_MAP_2D for FP32/FP16
379 - @ref NEL2NormalizeLayer for FP32/FP16
380 - @ref NENormalizationLayer IN_MAP_2D for FP32/FP16
381 - @ref CLROIAlignLayer
382 - @ref CLGenerateProposalsLayer
383 - Added QASYMM8 support to the following kernels:
384 - @ref NEArithmeticAdditionKernel
385 - @ref NEScale
386 - Added new tests and improved validation and benchmarking suites.
387 - Deprecated functions/interfaces
388 - Usage of inner_border_right and inner_border_top has been deprecated in @ref CLDeconvolutionLayer and @ref NEDeconvolutionLayer
389
Jenkinsb9abeae2018-11-22 11:58:08 +0000390v18.11 Public major release
391 - Various bug fixes.
392 - Various optimisations.
393 - New Neon kernels / functions:
394 - @ref NEChannelShuffleLayer / @ref NEChannelShuffleLayerKernel
395 - @ref NEReduceMean
396 - @ref NEReorgLayer / @ref NEReorgLayerKernel
397 - @ref NEPriorBoxLayer / @ref NEPriorBoxLayerKernel
398 - @ref NEUpsampleLayer / @ref NEUpsampleLayerKernel
399 - @ref NEYOLOLayer / @ref NEYOLOLayerKernel
400 - New OpenCL kernels / functions:
401 - @ref CLBatchToSpaceLayer / @ref CLBatchToSpaceLayerKernel
402 - @ref CLBoundingBoxTransform / @ref CLBoundingBoxTransformKernel
403 - @ref CLComputeAllAnchorsKernel
404 - @ref CLGenerateProposalsLayer
405 - @ref CLNormalizePlanarYUVLayer / @ref CLNormalizePlanarYUVLayerKernel
406 - @ref CLReorgLayer / @ref CLReorgLayerKernel
407 - @ref CLSpaceToBatchLayer / @ref CLSpaceToBatchLayerKernel
408 - @ref CLPadLayer
409 - @ref CLReduceMean
410 - @ref CLPriorBoxLayer / @ref CLPriorBoxLayerKernel
411 - @ref CLROIAlignLayer / @ref CLROIAlignLayerKernel
412 - @ref CLSlice
413 - @ref CLSplit
414 - @ref CLStridedSlice / @ref CLStridedSliceKernel
415 - @ref CLUpsampleLayer / @ref CLUpsampleLayerKernel
416 - @ref CLYOLOLayer / @ref CLYOLOLayerKernel
417 - New CPP kernels / functions:
418 - @ref CPPBoxWithNonMaximaSuppressionLimit / @ref CPPBoxWithNonMaximaSuppressionLimitKernel
419 - Added the validate method in:
420 - @ref NEDepthConvertLayer
421 - @ref NEFloor / @ref CLFloor
422 - @ref NEGEMMMatrixAdditionKernel
423 - @ref NEReshapeLayer / @ref CLReshapeLayer
424 - @ref CLScale
425 - Added new examples:
426 - graph_shufflenet.cpp
427 - graph_yolov3.cpp
428 - Added documentation for add a new function or kernel.
429 - Improved doxygen documentation adding a list of the existing functions.
430 - Add 4D tensors support to
431 - @ref CLWidthConcatenateLayer
432 - @ref CLFlattenLayer
433 - @ref CLSoftmaxLayer
434 - Add dot product support for @ref CLDepthwiseConvolutionLayer3x3NHWCKernel non-unit stride
435 - Add SVE support
436 - Fused batch normalization into convolution layer weights in @ref CLFuseBatchNormalization
437 - Fuses activation in @ref CLDepthwiseConvolutionLayer3x3NCHWKernel, @ref CLDepthwiseConvolutionLayer3x3NHWCKernel and @ref NEGEMMConvolutionLayer
438 - Added NHWC data layout support to:
439 - @ref CLChannelShuffleLayer
440 - @ref CLDeconvolutionLayer
441 - @ref CLL2NormalizeLayer
442 - Added QASYMM8 support to the following kernels:
443 - @ref CLScaleKernel
444 - @ref NEDepthwiseConvolutionLayer3x3Kernel
445 - @ref CLPixelWiseMultiplicationKernel
446 - Added FP16 support to the following kernels:
447 - @ref CLDepthwiseConvolutionLayer3x3NHWCKernel
448 - @ref NEDepthwiseConvolutionLayer3x3Kernel
449 - @ref CLNormalizePlanarYUVLayerKernel
450 - @ref CLWinogradConvolutionLayer (5x5 kernel)
451 - More tests added to both validation and benchmarking suites.
452
Jenkins52ba29e2018-08-29 15:32:11 +0000453v18.08 Public major release
454 - Various bug fixes.
455 - Various optimisations.
456 - Updated recommended NDK version to r17b.
457 - Removed support for QS8/QS16 data types.
458 - Added support for grouped convolution in @ref CLConvolutionLayer.
459 - Added NHWC data layout support to:
460 - @ref NEDepthConcatenateLayer / @ref CLDepthConcatenateLayer
461 - @ref NEWinogradConvolutionLayer / @ref CLWinogradConvolutionLayer
462 - @ref CLDepthwiseConvolutionLayer
463 - @ref CLDirectConvolutionLayer
464 - @ref CLConvolutionLayer
465 - @ref CLScale
466 - @ref CLIm2ColKernel
467 - New Neon kernels / functions:
468 - @ref NERNNLayer
469 - New OpenCL kernels / functions:
470 - @ref CLArithmeticDivision
471 - Introduced prepare() stage support in the graph API for GLES.
472 - Added support for memory reusage when trying to allocate smaller CLTensors.
473 - Enabled NHWC execution on graph examples.
474 - Added JPEG accessor for validation purposes.
475 - Added validate methods to some kernels / functions.
476
477v18.05 Public major release
Jenkinsb3a371b2018-05-23 11:36:53 +0100478 - Various bug fixes.
479 - Various optimisations.
480 - Major redesign in the interface for the neon kernels implemented in assembly.
481 - Removed arm_compute::NEGEMMLowpAArch64A53Kernel / arm_compute::NEGEMMLowpAArch64Kernel / arm_compute::NEGEMMLowpAArch64V8P4Kernel / arm_compute::NEGEMMInterleavedBlockedKernel / arm_compute::NEGEMMLowpAssemblyMatrixMultiplyCore / arm_compute::NEHGEMMAArch64FP16Kernel
482 - Added NEGEMMAssemblyWrapper and AssemblyKernelGlue which are used to execute assembly kernels in neon functions.
483 - Minor changes to the CPUInfo type to make it compatible with the new assembly gemm interface.
484 - Moved neon assembly kernels to the folder src/core/NEON/kernels/arm_gemm.
485 - Improved doxygen documentation.
486 - Improved memory management for layer's transitions.
487 - Added support for NHWC data layout in tensors.
488 - Added NHWC data layout support to:
489 - @ref NEGEMMConvolutionLayer
490 - @ref NEDirectConvolutionLayer
491 - @ref NEPoolingLayer / @ref CLPoolingLayer
492 - @ref NEBatchNormalizationLayer / @ref CLBatchNormalizationLayer
493 - @ref NEDepthwiseConvolutionLayer
494 - @ref NEScale
495 - @ref NEIm2Col
496 - Added support for dilated convolutions in @ref NEConvolutionLayer and @ref CLConvolutionLayer.
497 - New OpenCL kernels / functions:
498 - @ref CLChannelShuffleLayer / @ref CLChannelShuffleLayerKernel
499 - @ref CLConvertFullyConnectedWeightsKernel / @ref CLConvertFullyConnectedWeights
500 - @ref CLCopy / @ref CLCopyKernel
501 - @ref CLLSTMLayer
502 - @ref CLRNNLayer
503 - @ref CLWidthConcatenateLayer / @ref CLWidthConcatenateLayerKernel
504 - @ref CLWinogradFilterTransformKernel / @ref CLWinogradInputTransformKernel / @ref CLWinogradConvolutionLayer
505 - @ref CLWinogradInputTransformKernel / @ref CLWinogradInputTransform
506 - New Neon kernels / functions:
Jenkinsb3a371b2018-05-23 11:36:53 +0100507 - @ref NEConvertFullyConnectedWeightsKernel / @ref NEConvertFullyConnectedWeights.
508 - Created the validate method in @ref CLDepthwiseConvolutionLayer.
509 - Beta and gamma are no longer mandatory arguments in @ref NEBatchNormalizationLayer and @ref CLBatchNormalizationLayer.
510 - Added depth multiplier support in @ref NEDepthwiseConvolutionLayer and @ref CLDepthwiseConvolutionLayer.
511 - Added broadcast multiply support in @ref NEPixelWiseMultiplication / @ref NEPixelWiseMultiplicationKernel.
512 - Port mobilenet example to NHWC data layout.
513 - Enabled Winograd method in @ref CLConvolutionLayer.
514 - Renamed NEWinogradLayer to @ref NEWinogradConvolutionLayer.
515 - Updated @ref NEWinogradConvolutionLayer to use highly optimised assembly kernels in src/core/NEON/kernels/arm_gemm.
516 - Added memory manager support in GLES functions.
517 - Major refactoring of the graph API.
518 - Added GLES backend in the graph API.
519 - Added support for the memory manager in the graph API.
520 - Enabled Winograd Convolution method in the graph API.
521 - Added support for grouped convolutions in the graph API.
522 - Replaced NEDeconvolutionLayerUpsampleKernel with @ref NEScaleKernel in @ref NEDeconvolutionLayer.
523 - Added fast maths flag in @ref CLConvolutionLayer.
524 - Added new tests and benchmarks in validation and benchmark frameworks
525 - Merge Activation layer with Convolution Layer (NEON. CL, GLES)
526 - Added support to OpenCL 2.0 SVM
527 - Added support to import memory in OpenCL tensors.
528 - Added the prepare() method to perform any one off pre-processing before running the function.
529 - Added new examples:
530 - graph_inception_v4.cpp
531 - graph_resnext50.cpp
532 - Added memory measurement instrument for CL.
533
Jenkinsc3f34a42018-03-02 12:38:09 +0000534v18.03 Public maintenance release
535 - Various bug fixes.
536 - Fixed bug in @ref NEActivationLayer
537 - Fix in @ref CLTuner when using batches.
538 - Updated recommended NDK version to r16b (And fixed warnings).
539 - Fixed bug in validation code.
540 - Added Inception v4 graph example.
Jenkinsb3a371b2018-05-23 11:36:53 +0100541 - Renamed NEWinogradLayer.cpp to @ref NEWinogradConvolutionLayer
Jenkinsc3f34a42018-03-02 12:38:09 +0000542
Anthony Barbier06ea0482018-02-22 15:45:35 +0000543v18.02 Public major release
544 - Various NEON / OpenCL / GLES optimisations.
545 - Various bug fixes.
546 - Changed default number of threads on big LITTLE systems.
547 - Refactored examples and added:
548 - graph_mobilenet_qassym8
549 - graph_resnet
550 - graph_squeezenet_v1_1
Jenkinsc3f34a42018-03-02 12:38:09 +0000551 - Renamed @ref CLConvolutionLayer into @ref CLGEMMConvolutionLayer and created a new @ref CLConvolutionLayer to select the fastest convolution method.
552 - 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 +0000553 - Added in place support to:
Jenkinsc3f34a42018-03-02 12:38:09 +0000554 - @ref CLActivationLayer
555 - @ref CLBatchNormalizationLayer
Anthony Barbier06ea0482018-02-22 15:45:35 +0000556 - Added QASYMM8 support to:
Jenkinsc3f34a42018-03-02 12:38:09 +0000557 - @ref CLActivationLayer
558 - @ref CLDepthwiseConvolutionLayer
559 - @ref NEDepthwiseConvolutionLayer
560 - @ref NESoftmaxLayer
Anthony Barbier06ea0482018-02-22 15:45:35 +0000561 - Added FP16 support to:
Jenkinsc3f34a42018-03-02 12:38:09 +0000562 - @ref CLDepthwiseConvolutionLayer3x3
563 - @ref CLDepthwiseConvolutionLayer
564 - Added broadcasting support to @ref NEArithmeticAddition / @ref CLArithmeticAddition / @ref CLPixelWiseMultiplication
565 - Added fused batched normalization and activation to @ref CLBatchNormalizationLayer and @ref NEBatchNormalizationLayer
566 - Added support for non-square pooling to @ref NEPoolingLayer and @ref CLPoolingLayer
Anthony Barbier06ea0482018-02-22 15:45:35 +0000567 - New OpenCL kernels / functions:
Jenkinsc3f34a42018-03-02 12:38:09 +0000568 - @ref CLDirectConvolutionLayerOutputStageKernel
Anthony Barbier06ea0482018-02-22 15:45:35 +0000569 - New NEON kernels / functions
570 - Added name() method to all kernels.
571 - Added support for Winograd 5x5.
Jenkinsc3f34a42018-03-02 12:38:09 +0000572 - @ref NEPermuteKernel / @ref NEPermute
Jenkinsb3a371b2018-05-23 11:36:53 +0100573 - @ref NEWinogradLayerTransformInputKernel / NEWinogradLayer
574 - @ref NEWinogradLayerTransformOutputKernel / NEWinogradLayer
575 - @ref NEWinogradLayerTransformWeightsKernel / NEWinogradLayer
Jenkins52ba29e2018-08-29 15:32:11 +0000576 - Renamed NEWinogradLayerKernel into NEWinogradLayerBatchedGEMMKernel
Anthony Barbier06ea0482018-02-22 15:45:35 +0000577 - New GLES kernels / functions:
Jenkinsc3f34a42018-03-02 12:38:09 +0000578 - @ref GCTensorShiftKernel / @ref GCTensorShift
Anthony Barbier06ea0482018-02-22 15:45:35 +0000579
Anthony Barbierf45d5a92018-01-24 16:23:15 +0000580v18.01 Public maintenance release
581 - Various bug fixes
582 - Added some of the missing validate() methods
Jenkinsc3f34a42018-03-02 12:38:09 +0000583 - Added @ref CLDeconvolutionLayerUpsampleKernel / @ref CLDeconvolutionLayer @ref CLDeconvolutionLayerUpsample
584 - Added @ref CLPermuteKernel / @ref CLPermute
Anthony Barbierf45d5a92018-01-24 16:23:15 +0000585 - Added method to clean the programs cache in the CL Kernel library.
Jenkinsc3f34a42018-03-02 12:38:09 +0000586 - Added @ref GCArithmeticAdditionKernel / @ref GCArithmeticAddition
587 - Added @ref GCDepthwiseConvolutionLayer3x3Kernel / @ref GCDepthwiseConvolutionLayer3x3
588 - Added @ref GCNormalizePlanarYUVLayerKernel / @ref GCNormalizePlanarYUVLayer
589 - Added @ref GCScaleKernel / @ref GCScale
590 - Added @ref GCWeightsReshapeKernel / @ref GCConvolutionLayer
Anthony Barbierf45d5a92018-01-24 16:23:15 +0000591 - Added FP16 support to the following GLES compute kernels:
Jenkinsc3f34a42018-03-02 12:38:09 +0000592 - @ref GCCol2ImKernel
593 - @ref GCGEMMInterleave4x4Kernel
594 - @ref GCGEMMTranspose1xWKernel
595 - @ref GCIm2ColKernel
596 - Refactored NEON Winograd (NEWinogradLayerKernel)
597 - Added @ref NEDirectConvolutionLayerOutputStageKernel
Anthony Barbierf45d5a92018-01-24 16:23:15 +0000598 - Added QASYMM8 support to the following NEON kernels:
Jenkinsc3f34a42018-03-02 12:38:09 +0000599 - @ref NEDepthwiseConvolutionLayer3x3Kernel
600 - @ref NEFillBorderKernel
601 - @ref NEPoolingLayerKernel
Anthony Barbierf45d5a92018-01-24 16:23:15 +0000602 - Added new examples:
603 - graph_cl_mobilenet_qasymm8.cpp
604 - graph_inception_v3.cpp
605 - gc_dc.cpp
606 - More tests added to both validation and benchmarking suites.
607
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000608v17.12 Public major release
609 - Most machine learning functions on OpenCL support the new data type QASYMM8
610 - Introduced logging interface
611 - Introduced opencl timer
612 - Reworked GEMMLowp interface
613 - Added new NEON assembly kernels for GEMMLowp, SGEMM and HGEMM
614 - Added validation method for most Machine Learning kernels / functions
615 - Added new graph examples such as googlenet, mobilenet, squeezenet, vgg16 and vgg19
616 - Added sgemm example for OpenCL
617 - Added absolute difference example for GLES compute
618 - Added new tests and benchmarks in validation and benchmark frameworks
619 - Added new kernels / functions for GLES compute
620
621 - New OpenGL ES kernels / functions
Jenkinsc3f34a42018-03-02 12:38:09 +0000622 - @ref GCAbsoluteDifferenceKernel / @ref GCAbsoluteDifference
623 - @ref GCActivationLayerKernel / @ref GCActivationLayer
624 - @ref GCBatchNormalizationLayerKernel / @ref GCBatchNormalizationLayer
625 - @ref GCCol2ImKernel
626 - @ref GCDepthConcatenateLayerKernel / @ref GCDepthConcatenateLayer
627 - @ref GCDirectConvolutionLayerKernel / @ref GCDirectConvolutionLayer
628 - @ref GCDropoutLayerKernel / @ref GCDropoutLayer
629 - @ref GCFillBorderKernel / @ref GCFillBorder
630 - @ref GCGEMMInterleave4x4Kernel / @ref GCGEMMInterleave4x4
631 - @ref GCGEMMMatrixAccumulateBiasesKernel / @ref GCGEMMMatrixAdditionKernel / @ref GCGEMMMatrixMultiplyKernel / @ref GCGEMM
632 - @ref GCGEMMTranspose1xWKernel / @ref GCGEMMTranspose1xW
633 - @ref GCIm2ColKernel
634 - @ref GCNormalizationLayerKernel / @ref GCNormalizationLayer
635 - @ref GCPixelWiseMultiplicationKernel / @ref GCPixelWiseMultiplication
636 - @ref GCPoolingLayerKernel / @ref GCPoolingLayer
637 - @ref GCLogits1DMaxKernel / @ref GCLogits1DShiftExpSumKernel / @ref GCLogits1DNormKernel / @ref GCSoftmaxLayer
638 - @ref GCTransposeKernel / @ref GCTranspose
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000639
640 - New NEON kernels / functions
Jenkinsb3a371b2018-05-23 11:36:53 +0100641 - arm_compute::NEGEMMLowpAArch64A53Kernel / arm_compute::NEGEMMLowpAArch64Kernel / arm_compute::NEGEMMLowpAArch64V8P4Kernel / arm_compute::NEGEMMInterleavedBlockedKernel / arm_compute::NEGEMMLowpAssemblyMatrixMultiplyCore
642 - arm_compute::NEHGEMMAArch64FP16Kernel
Jenkinsc3f34a42018-03-02 12:38:09 +0000643 - @ref NEDepthwiseConvolutionLayer3x3Kernel / @ref NEDepthwiseIm2ColKernel / @ref NEGEMMMatrixVectorMultiplyKernel / @ref NEDepthwiseVectorToTensorKernel / @ref NEDepthwiseConvolutionLayer
644 - @ref NEGEMMLowpOffsetContributionKernel / @ref NEGEMMLowpMatrixAReductionKernel / @ref NEGEMMLowpMatrixBReductionKernel / @ref NEGEMMLowpMatrixMultiplyCore
645 - @ref NEGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPointKernel / @ref NEGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPoint
646 - @ref NEGEMMLowpQuantizeDownInt32ToUint8ScaleKernel / @ref NEGEMMLowpQuantizeDownInt32ToUint8Scale
Jenkinsb3a371b2018-05-23 11:36:53 +0100647 - NEWinogradLayer / NEWinogradLayerKernel
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000648
649 - New OpenCL kernels / functions
Jenkinsc3f34a42018-03-02 12:38:09 +0000650 - @ref CLGEMMLowpOffsetContributionKernel / @ref CLGEMMLowpMatrixAReductionKernel / @ref CLGEMMLowpMatrixBReductionKernel / @ref CLGEMMLowpMatrixMultiplyCore
651 - @ref CLGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPointKernel / @ref CLGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPoint
652 - @ref CLGEMMLowpQuantizeDownInt32ToUint8ScaleKernel / @ref CLGEMMLowpQuantizeDownInt32ToUint8Scale
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000653
654 - New graph nodes for NEON and OpenCL
Jenkinsb3a371b2018-05-23 11:36:53 +0100655 - graph::BranchLayer
656 - graph::DepthConvertLayer
657 - graph::DepthwiseConvolutionLayer
658 - graph::DequantizationLayer
659 - graph::FlattenLayer
660 - graph::QuantizationLayer
661 - graph::ReshapeLayer
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000662
Kaizenbf8b01d2017-10-12 14:26:51 +0100663v17.10 Public maintenance release
664 - Bug fixes:
665 - Check the maximum local workgroup size supported by OpenCL devices
666 - Minor documentation updates (Fixed instructions to build the examples)
Jenkinsc3f34a42018-03-02 12:38:09 +0000667 - Introduced a graph::GraphContext
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000668 - Added a few new Graph nodes, support for branches and grouping.
Kaizenbf8b01d2017-10-12 14:26:51 +0100669 - Automatically enable cl_printf in debug builds
670 - Fixed bare metal builds for armv7a
671 - Added AlexNet and cartoon effect examples
672 - 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)
673
Kaizen8938bd32017-09-28 14:38:23 +0100674v17.09 Public major release
675 - Experimental Graph support: initial implementation of a simple stream API to easily chain machine learning layers.
Jenkinsc3f34a42018-03-02 12:38:09 +0000676 - 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 +0100677 - New validation and benchmark frameworks (Boost and Google frameworks replaced by homemade framework).
678 - Most machine learning functions support both fixed point 8 and 16 bit (QS8, QS16) for both NEON and OpenCL.
679 - New NEON kernels / functions:
Jenkinsb3a371b2018-05-23 11:36:53 +0100680 - arm_compute::NEGEMMAssemblyBaseKernel arm_compute::NEGEMMAArch64Kernel
Jenkinsc3f34a42018-03-02 12:38:09 +0000681 - @ref NEDequantizationLayerKernel / @ref NEDequantizationLayer
682 - @ref NEFloorKernel / @ref NEFloor
683 - @ref NEL2NormalizeLayerKernel / @ref NEL2NormalizeLayer
684 - @ref NEQuantizationLayerKernel @ref NEMinMaxLayerKernel / @ref NEQuantizationLayer
685 - @ref NEROIPoolingLayerKernel / @ref NEROIPoolingLayer
686 - @ref NEReductionOperationKernel / @ref NEReductionOperation
687 - @ref NEReshapeLayerKernel / @ref NEReshapeLayer
Kaizen8938bd32017-09-28 14:38:23 +0100688
689 - New OpenCL kernels / functions:
Jenkins514be652019-02-28 12:25:18 +0000690 - @ref CLDepthwiseConvolutionLayer3x3NCHWKernel @ref CLDepthwiseConvolutionLayer3x3NHWCKernel @ref CLDepthwiseIm2ColKernel @ref CLDepthwiseVectorToTensorKernel CLDepthwiseWeightsReshapeKernel / @ref CLDepthwiseConvolutionLayer3x3 @ref CLDepthwiseConvolutionLayer @ref CLDepthwiseSeparableConvolutionLayer
Jenkinsc3f34a42018-03-02 12:38:09 +0000691 - @ref CLDequantizationLayerKernel / @ref CLDequantizationLayer
692 - @ref CLDirectConvolutionLayerKernel / @ref CLDirectConvolutionLayer
693 - @ref CLFlattenLayer
694 - @ref CLFloorKernel / @ref CLFloor
695 - @ref CLGEMMTranspose1xW
696 - @ref CLGEMMMatrixVectorMultiplyKernel
697 - @ref CLL2NormalizeLayerKernel / @ref CLL2NormalizeLayer
698 - @ref CLQuantizationLayerKernel @ref CLMinMaxLayerKernel / @ref CLQuantizationLayer
699 - @ref CLROIPoolingLayerKernel / @ref CLROIPoolingLayer
700 - @ref CLReductionOperationKernel / @ref CLReductionOperation
701 - @ref CLReshapeLayerKernel / @ref CLReshapeLayer
Kaizen8938bd32017-09-28 14:38:23 +0100702
Anthony Barbierdbdab852017-06-23 15:42:00 +0100703v17.06 Public major release
704 - Various bug fixes
705 - Added support for fixed point 8 bit (QS8) to the various NEON machine learning kernels.
706 - Added unit tests and benchmarks (AlexNet, LeNet)
707 - Added support for sub tensors.
708 - Added infrastructure to provide GPU specific optimisation for some OpenCL kernels.
Jenkinsc3f34a42018-03-02 12:38:09 +0000709 - Added @ref OMPScheduler (OpenMP) scheduler for NEON
710 - Added @ref SingleThreadScheduler scheduler for NEON (For bare metal)
711 - User can specify his own scheduler by implementing the @ref IScheduler interface.
Anthony Barbierdbdab852017-06-23 15:42:00 +0100712 - New OpenCL kernels / functions:
Jenkinsc3f34a42018-03-02 12:38:09 +0000713 - @ref CLBatchNormalizationLayerKernel / @ref CLBatchNormalizationLayer
714 - @ref CLDepthConcatenateLayerKernel / @ref CLDepthConcatenateLayer
715 - @ref CLHOGOrientationBinningKernel @ref CLHOGBlockNormalizationKernel, @ref CLHOGDetectorKernel / @ref CLHOGDescriptor @ref CLHOGDetector @ref CLHOGGradient @ref CLHOGMultiDetection
716 - @ref CLLocallyConnectedMatrixMultiplyKernel / @ref CLLocallyConnectedLayer
717 - @ref CLWeightsReshapeKernel / @ref CLConvolutionLayerReshapeWeights
Anthony Barbierdbdab852017-06-23 15:42:00 +0100718 - New C++ kernels:
Jenkinsc3f34a42018-03-02 12:38:09 +0000719 - @ref CPPDetectionWindowNonMaximaSuppressionKernel
Anthony Barbierdbdab852017-06-23 15:42:00 +0100720 - New NEON kernels / functions:
Jenkinsc3f34a42018-03-02 12:38:09 +0000721 - @ref NEBatchNormalizationLayerKernel / @ref NEBatchNormalizationLayer
722 - @ref NEDepthConcatenateLayerKernel / @ref NEDepthConcatenateLayer
723 - @ref NEDirectConvolutionLayerKernel / @ref NEDirectConvolutionLayer
724 - @ref NELocallyConnectedMatrixMultiplyKernel / @ref NELocallyConnectedLayer
725 - @ref NEWeightsReshapeKernel / @ref NEConvolutionLayerReshapeWeights
Anthony Barbierdbdab852017-06-23 15:42:00 +0100726
727v17.05 Public bug fixes release
728 - Various bug fixes
729 - Remaining of the functions ported to use accurate padding.
730 - Library does not link against OpenCL anymore (It uses dlopen / dlsym at runtime instead to determine whether or not OpenCL is available).
731 - Added "free" method to allocator.
732 - Minimum version of g++ required for armv7 Linux changed from 4.8 to 4.9
733
734v17.04 Public bug fixes release
735
736 The following functions have been ported to use the new accurate padding:
Jenkinsc3f34a42018-03-02 12:38:09 +0000737 - @ref CLColorConvertKernel
738 - @ref CLEdgeNonMaxSuppressionKernel
739 - @ref CLEdgeTraceKernel
740 - @ref CLGaussianPyramidHorKernel
741 - @ref CLGaussianPyramidVertKernel
742 - @ref CLGradientKernel
743 - @ref NEChannelCombineKernel
744 - @ref NEFillArrayKernel
745 - @ref NEGaussianPyramidHorKernel
746 - @ref NEGaussianPyramidVertKernel
Jenkinsb9abeae2018-11-22 11:58:08 +0000747 - NEHarrisScoreFP16Kernel
Jenkinsc3f34a42018-03-02 12:38:09 +0000748 - @ref NEHarrisScoreKernel
749 - @ref NEHOGDetectorKernel
750 - @ref NELogits1DMaxKernel
751 - NELogits1DShiftExpSumKernel
752 - NELogits1DNormKernel
753 - @ref NENonMaximaSuppression3x3FP16Kernel
754 - @ref NENonMaximaSuppression3x3Kernel
Anthony Barbierdbdab852017-06-23 15:42:00 +0100755
Anthony Barbierdbdab852017-06-23 15:42:00 +0100756v17.03.1 First Major public release of the sources
757 - Renamed the library to arm_compute
758 - New CPP target introduced for C++ kernels shared between NEON and CL functions.
759 - New padding calculation interface introduced and ported most kernels / functions to use it.
760 - New OpenCL kernels / functions:
Jenkinsc3f34a42018-03-02 12:38:09 +0000761 - @ref CLGEMMLowpMatrixMultiplyKernel / CLGEMMLowp
Anthony Barbierdbdab852017-06-23 15:42:00 +0100762 - New NEON kernels / functions:
Jenkinsc3f34a42018-03-02 12:38:09 +0000763 - @ref NENormalizationLayerKernel / @ref NENormalizationLayer
764 - @ref NETransposeKernel / @ref NETranspose
765 - @ref NELogits1DMaxKernel, NELogits1DShiftExpSumKernel, NELogits1DNormKernel / @ref NESoftmaxLayer
766 - @ref NEIm2ColKernel, @ref NECol2ImKernel, NEConvolutionLayerWeightsReshapeKernel / @ref NEConvolutionLayer
767 - @ref NEGEMMMatrixAccumulateBiasesKernel / @ref NEFullyConnectedLayer
768 - @ref NEGEMMLowpMatrixMultiplyKernel / NEGEMMLowp
Anthony Barbierdbdab852017-06-23 15:42:00 +0100769
770v17.03 Sources preview
771 - New OpenCL kernels / functions:
Jenkinsc3f34a42018-03-02 12:38:09 +0000772 - @ref CLGradientKernel, @ref CLEdgeNonMaxSuppressionKernel, @ref CLEdgeTraceKernel / @ref CLCannyEdge
773 - GEMM refactoring + FP16 support: @ref CLGEMMInterleave4x4Kernel, @ref CLGEMMTranspose1xWKernel, @ref CLGEMMMatrixMultiplyKernel, @ref CLGEMMMatrixAdditionKernel / @ref CLGEMM
774 - @ref CLGEMMMatrixAccumulateBiasesKernel / @ref CLFullyConnectedLayer
775 - @ref CLTransposeKernel / @ref CLTranspose
776 - @ref CLLKTrackerInitKernel, @ref CLLKTrackerStage0Kernel, @ref CLLKTrackerStage1Kernel, @ref CLLKTrackerFinalizeKernel / @ref CLOpticalFlow
777 - @ref CLNormalizationLayerKernel / @ref CLNormalizationLayer
778 - @ref CLLaplacianPyramid, @ref CLLaplacianReconstruct
Anthony Barbierdbdab852017-06-23 15:42:00 +0100779 - New NEON kernels / functions:
Jenkinsc3f34a42018-03-02 12:38:09 +0000780 - @ref NEActivationLayerKernel / @ref NEActivationLayer
781 - GEMM refactoring + FP16 support (Requires armv8.2 CPU): @ref NEGEMMInterleave4x4Kernel, @ref NEGEMMTranspose1xWKernel, @ref NEGEMMMatrixMultiplyKernel, @ref NEGEMMMatrixAdditionKernel / @ref NEGEMM
782 - @ref NEPoolingLayerKernel / @ref NEPoolingLayer
Anthony Barbierdbdab852017-06-23 15:42:00 +0100783
784v17.02.1 Sources preview
785 - New OpenCL kernels / functions:
Jenkinsc3f34a42018-03-02 12:38:09 +0000786 - @ref CLLogits1DMaxKernel, @ref CLLogits1DShiftExpSumKernel, @ref CLLogits1DNormKernel / @ref CLSoftmaxLayer
787 - @ref CLPoolingLayerKernel / @ref CLPoolingLayer
788 - @ref CLIm2ColKernel, @ref CLCol2ImKernel, CLConvolutionLayerWeightsReshapeKernel / @ref CLConvolutionLayer
789 - @ref CLRemapKernel / @ref CLRemap
790 - @ref CLGaussianPyramidHorKernel, @ref CLGaussianPyramidVertKernel / @ref CLGaussianPyramid, @ref CLGaussianPyramidHalf, @ref CLGaussianPyramidOrb
791 - @ref CLMinMaxKernel, @ref CLMinMaxLocationKernel / @ref CLMinMaxLocation
792 - @ref CLNonLinearFilterKernel / @ref CLNonLinearFilter
Anthony Barbierdbdab852017-06-23 15:42:00 +0100793 - New NEON FP16 kernels (Requires armv8.2 CPU)
Jenkinsc3f34a42018-03-02 12:38:09 +0000794 - @ref NEAccumulateWeightedFP16Kernel
795 - @ref NEBox3x3FP16Kernel
796 - @ref NENonMaximaSuppression3x3FP16Kernel
Anthony Barbierdbdab852017-06-23 15:42:00 +0100797
798v17.02 Sources preview
799 - New OpenCL kernels / functions:
Jenkinsc3f34a42018-03-02 12:38:09 +0000800 - @ref CLActivationLayerKernel / @ref CLActivationLayer
801 - @ref CLChannelCombineKernel / @ref CLChannelCombine
802 - @ref CLDerivativeKernel / @ref CLChannelExtract
803 - @ref CLFastCornersKernel / @ref CLFastCorners
804 - @ref CLMeanStdDevKernel / @ref CLMeanStdDev
Anthony Barbierdbdab852017-06-23 15:42:00 +0100805 - New NEON kernels / functions:
Jenkinsc3f34a42018-03-02 12:38:09 +0000806 - HOG / SVM: @ref NEHOGOrientationBinningKernel, @ref NEHOGBlockNormalizationKernel, @ref NEHOGDetectorKernel, NEHOGNonMaximaSuppressionKernel / @ref NEHOGDescriptor, @ref NEHOGDetector, @ref NEHOGGradient, @ref NEHOGMultiDetection
807 - @ref NENonLinearFilterKernel / @ref NENonLinearFilter
Anthony Barbierdbdab852017-06-23 15:42:00 +0100808 - Introduced a CLScheduler to manage the default context and command queue used by the runtime library and create synchronisation events.
809 - Switched all the kernels / functions to use tensors instead of images.
810 - Updated documentation to include instructions to build the library from sources.
811
812v16.12 Binary preview release
813 - Original release
814
815@section S3_how_to_build How to build the library and the examples
816
817@subsection S3_1_build_options Build options
818
819scons 2.3 or above is required to build the library.
820To see the build options available simply run ```scons -h```:
821
822 debug: Debug (yes|no)
823 default: False
824 actual: False
825
826 asserts: Enable asserts (this flag is forced to 1 for debug=1) (yes|no)
827 default: False
828 actual: False
829
830 arch: Target Architecture (armv7a|arm64-v8a|arm64-v8.2-a|x86_32|x86_64)
831 default: armv7a
832 actual: armv7a
833
834 os: Target OS (linux|android|bare_metal)
835 default: linux
836 actual: linux
837
Anthony Barbier06ea0482018-02-22 15:45:35 +0000838 build: Build type (native|cross_compile|embed_only)
Anthony Barbierdbdab852017-06-23 15:42:00 +0100839 default: cross_compile
840 actual: cross_compile
841
842 examples: Build example programs (yes|no)
843 default: True
844 actual: True
845
846 Werror: Enable/disable the -Werror compilation flag (yes|no)
847 default: True
848 actual: True
849
850 opencl: Enable OpenCL support (yes|no)
851 default: True
852 actual: True
853
854 neon: Enable Neon support (yes|no)
855 default: False
856 actual: False
857
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000858 gles_compute: Enable OpenGL ES Compute Shader support (yes|no)
859 default: False
860 actual: False
861
862 embed_kernels: Embed OpenCL kernels and OpenGL ES compute shader in library binary (yes|no)
Anthony Barbierf45d5a92018-01-24 16:23:15 +0000863 default: True
864 actual: True
Anthony Barbierdbdab852017-06-23 15:42:00 +0100865
866 set_soname: Set the library's soname and shlibversion (requires SCons 2.4 or above) (yes|no)
867 default: False
868 actual: False
869
870 openmp: Enable OpenMP backend (yes|no)
871 default: False
872 actual: False
873
874 cppthreads: Enable C++11 threads backend (yes|no)
875 default: True
876 actual: True
877
878 build_dir: Specify sub-folder for the build ( /path/to/build_dir )
879 default: .
880 actual: .
881
882 extra_cxx_flags: Extra CXX flags to be appended to the build command
883 default:
884 actual:
885
886 pmu: Enable PMU counters (yes|no)
887 default: False
888 actual: False
889
Kaizen8938bd32017-09-28 14:38:23 +0100890 mali: Enable Mali hardware counters (yes|no)
891 default: False
892 actual: False
893
Anthony Barbierdbdab852017-06-23 15:42:00 +0100894 validation_tests: Build validation test programs (yes|no)
895 default: False
896 actual: False
897
898 benchmark_tests: Build benchmark test programs (yes|no)
899 default: False
900 actual: False
901
902@b debug / @b asserts:
903 - With debug=1 asserts are enabled, and the library is built with symbols and no optimisations enabled.
904 - 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)
905 - 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).
906
907@b arch: The x86_32 and x86_64 targets can only be used with neon=0 and opencl=1.
908
909@b os: Choose the operating system you are targeting: Linux, Android or bare metal.
910@note bare metal can only be used for NEON (not OpenCL), only static libraries get built and NEON's multi-threading support is disabled.
911
912@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.
913
914@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.
915
Anthony Barbier06ea0482018-02-22 15:45:35 +0000916There 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.
917
Anthony Barbierdbdab852017-06-23 15:42:00 +0100918@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).
919
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000920@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 +0100921
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000922@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 +0100923
924@b set_soname: Do you want to build the versioned version of the library ?
925
926If enabled the library will contain a SONAME and SHLIBVERSION and some symlinks will automatically be created between the objects.
927Example:
928 libarm_compute_core.so -> libarm_compute_core.so.1.0.0
929 libarm_compute_core.so.1 -> libarm_compute_core.so.1.0.0
930 libarm_compute_core.so.1.0.0
931
932@note This options is disabled by default as it requires SCons version 2.4 or above.
933
934@b extra_cxx_flags: Custom CXX flags which will be appended to the end of the build command.
935
936@b build_dir: Build the library in a subfolder of the "build" folder. (Allows to build several configurations in parallel).
937
938@b examples: Build or not the examples
939
940@b validation_tests: Enable the build of the validation suite.
941
Anthony Barbierdbdab852017-06-23 15:42:00 +0100942@b benchmark_tests: Enable the build of the benchmark tests
943
944@b pmu: Enable the PMU cycle counter to measure execution time in benchmark tests. (Your device needs to support it)
945
Kaizen8938bd32017-09-28 14:38:23 +0100946@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 +0100947
948@b openmp Build in the OpenMP scheduler for NEON.
949
950@note Only works when building with g++ not clang++
951
952@b cppthreads Build in the C++11 scheduler for NEON.
953
Jenkinsc3f34a42018-03-02 12:38:09 +0000954@sa Scheduler::set
Anthony Barbierdbdab852017-06-23 15:42:00 +0100955
Kaizen8938bd32017-09-28 14:38:23 +0100956@subsection S3_2_linux Building for Linux
Anthony Barbierdbdab852017-06-23 15:42:00 +0100957
958@subsubsection S3_2_1_library How to build the library ?
959
960For Linux, the library was successfully built and tested using the following Linaro GCC toolchain:
961
Jenkins52ba29e2018-08-29 15:32:11 +0000962 - gcc-linaro-4.9-2016.02-x86_64_arm-linux-gnueabihf
Anthony Barbierdbdab852017-06-23 15:42:00 +0100963 - gcc-linaro-4.9-2016.02-x86_64_aarch64-linux-gnu
Anthony Barbierdbdab852017-06-23 15:42:00 +0100964
Anthony Barbierdbdab852017-06-23 15:42:00 +0100965To cross-compile the library in debug mode, with NEON only support, for Linux 32bit:
966
967 scons Werror=1 -j8 debug=1 neon=1 opencl=0 os=linux arch=armv7a
968
969To cross-compile the library in asserts mode, with OpenCL only support, for Linux 64bit:
970
971 scons Werror=1 -j8 debug=0 asserts=1 neon=0 opencl=1 embed_kernels=1 os=linux arch=arm64-v8a
972
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000973To cross-compile the library in asserts mode, with GLES_COMPUTE only support, for Linux 64bit:
974
975 scons Werror=1 -j8 debug=0 asserts=1 neon=0 opencl=0 gles_compute=1 embed_kernels=1 os=linux arch=arm64-v8a
976
Anthony Barbierdbdab852017-06-23 15:42:00 +0100977You can also compile the library natively on an ARM device by using <b>build=native</b>:
978
979 scons Werror=1 -j8 debug=0 neon=1 opencl=0 os=linux arch=arm64-v8a build=native
980 scons Werror=1 -j8 debug=0 neon=1 opencl=0 os=linux arch=armv7a build=native
981
982@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.
983
984For example on a 64bit Debian based system you would have to install <b>g++-arm-linux-gnueabihf</b>
985
986 apt-get install g++-arm-linux-gnueabihf
987
988Then run
989
990 scons Werror=1 -j8 debug=0 neon=1 opencl=0 os=linux arch=armv7a build=cross_compile
991
992or simply remove the build parameter as build=cross_compile is the default value:
993
994 scons Werror=1 -j8 debug=0 neon=1 opencl=0 os=linux arch=armv7a
995
996@attention To cross compile with opencl=1 you need to make sure to have a version of libOpenCL matching your target architecture.
997
998@subsubsection S3_2_2_examples How to manually build the examples ?
999
1000The 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.
1001
Jenkinsb3a371b2018-05-23 11:36:53 +01001002@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 +01001003
1004To cross compile a NEON example for Linux 32bit:
1005
Kaizenbf8b01d2017-10-12 14:26:51 +01001006 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 +01001007
1008To cross compile a NEON example for Linux 64bit:
1009
Kaizenbf8b01d2017-10-12 14:26:51 +01001010 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 +01001011
1012(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)
1013
1014To cross compile an OpenCL example for Linux 32bit:
1015
Jenkinsb3a371b2018-05-23 11:36:53 +01001016 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 +01001017
1018To cross compile an OpenCL example for Linux 64bit:
1019
Jenkinsb3a371b2018-05-23 11:36:53 +01001020 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 +01001021
Anthony Barbier8140e1e2017-12-14 23:48:46 +00001022To cross compile a GLES example for Linux 32bit:
1023
1024 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
1025
1026To cross compile a GLES example for Linux 64bit:
1027
1028 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
1029
Kaizenbf8b01d2017-10-12 14:26:51 +01001030(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)
1031
Anthony Barbier8140e1e2017-12-14 23:48:46 +00001032To 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.
1033
1034@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 +01001035
1036i.e. to cross compile the "graph_lenet" example for Linux 32bit:
1037
Jenkins52ba29e2018-08-29 15:32:11 +00001038 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
Kaizenbf8b01d2017-10-12 14:26:51 +01001039
1040i.e. to cross compile the "graph_lenet" example for Linux 64bit:
1041
Jenkins52ba29e2018-08-29 15:32:11 +00001042 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
Anthony Barbierdbdab852017-06-23 15:42:00 +01001043
1044(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)
1045
giorgio-arena869d4242017-10-23 16:58:59 +01001046@note If compiling using static libraries, this order must be followed when linking: arm_compute_graph_static, arm_compute, arm_compute_core
1047
Anthony Barbierdbdab852017-06-23 15:42:00 +01001048To compile natively (i.e directly on an ARM device) for NEON for Linux 32bit:
1049
Kaizenbf8b01d2017-10-12 14:26:51 +01001050 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 +01001051
1052To compile natively (i.e directly on an ARM device) for NEON for Linux 64bit:
1053
Kaizenbf8b01d2017-10-12 14:26:51 +01001054 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 +01001055
1056(notice the only difference with the 32 bit command is that we don't need the -mfpu option)
1057
1058To compile natively (i.e directly on an ARM device) for OpenCL for Linux 32bit or Linux 64bit:
1059
Jenkinsb3a371b2018-05-23 11:36:53 +01001060 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 +01001061
Anthony Barbier8140e1e2017-12-14 23:48:46 +00001062To compile natively (i.e directly on an ARM device) for GLES for Linux 32bit or Linux 64bit:
Kaizenbf8b01d2017-10-12 14:26:51 +01001063
Anthony Barbier8140e1e2017-12-14 23:48:46 +00001064 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 +01001065
Anthony Barbier8140e1e2017-12-14 23:48:46 +00001066To 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.
1067@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 +01001068
Anthony Barbier8140e1e2017-12-14 23:48:46 +00001069i.e. to natively compile the "graph_lenet" example for Linux 32bit:
Kaizenbf8b01d2017-10-12 14:26:51 +01001070
Jenkins52ba29e2018-08-29 15:32:11 +00001071 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
Anthony Barbier8140e1e2017-12-14 23:48:46 +00001072
1073i.e. to natively compile the "graph_lenet" example for Linux 64bit:
1074
Jenkins52ba29e2018-08-29 15:32:11 +00001075 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
Kaizenbf8b01d2017-10-12 14:26:51 +01001076
1077(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 +01001078
giorgio-arena869d4242017-10-23 16:58:59 +01001079@note If compiling using static libraries, this order must be followed when linking: arm_compute_graph_static, arm_compute, arm_compute_core
1080
Anthony Barbierdbdab852017-06-23 15:42:00 +01001081@note These two commands assume libarm_compute.so is available in your library path, if not add the path to it using -L
1082
1083To run the built executable simply run:
1084
1085 LD_LIBRARY_PATH=build ./neon_convolution
1086
1087or
1088
1089 LD_LIBRARY_PATH=build ./cl_convolution
1090
Jenkins52ba29e2018-08-29 15:32:11 +00001091@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.
Jenkinsc3f34a42018-03-02 12:38:09 +00001092
1093For example:
Jenkinsb3a371b2018-05-23 11:36:53 +01001094
Jenkins52ba29e2018-08-29 15:32:11 +00001095 LD_LIBRARY_PATH=. ./graph_lenet --help
Jenkinsc3f34a42018-03-02 12:38:09 +00001096
Jenkins52ba29e2018-08-29 15:32:11 +00001097Below is a list of the common parameters among the graph examples :
1098@snippet utils/CommonGraphOptions.h Common graph examples parameters
Jenkinsc3f34a42018-03-02 12:38:09 +00001099
Kaizen8938bd32017-09-28 14:38:23 +01001100@subsection S3_3_android Building for Android
Anthony Barbierdbdab852017-06-23 15:42:00 +01001101
1102For Android, the library was successfully built and tested using Google's standalone toolchains:
Jenkins52ba29e2018-08-29 15:32:11 +00001103 - clang++ from NDK r17b for armv7a
1104 - clang++ from NDK r17b for arm64-v8a
1105 - clang++ from NDK r18-beta1 for arm64-v8.2-a with FP16 support
Anthony Barbierdbdab852017-06-23 15:42:00 +01001106
1107Here is a guide to <a href="https://developer.android.com/ndk/guides/standalone_toolchain.html">create your Android standalone toolchains from the NDK</a>
1108
Jenkins52ba29e2018-08-29 15:32:11 +00001109- Download the NDK r17b from here: https://developer.android.com/ndk/downloads/index.html
Jenkins4ba87db2019-05-23 17:11:51 +01001110- Make sure you have Python 2.7 installed on your machine.
Anthony Barbierdbdab852017-06-23 15:42:00 +01001111- Generate the 32 and/or 64 toolchains by running the following commands:
1112
Jenkinsb3a371b2018-05-23 11:36:53 +01001113
Jenkins52ba29e2018-08-29 15:32:11 +00001114 $NDK/build/tools/make_standalone_toolchain.py --arch arm64 --install-dir $MY_TOOLCHAINS/aarch64-linux-android-ndk-r17b --stl libc++ --api 21
1115 $NDK/build/tools/make_standalone_toolchain.py --arch arm --install-dir $MY_TOOLCHAINS/arm-linux-android-ndk-r17b --stl libc++ --api 21
Anthony Barbierdbdab852017-06-23 15:42:00 +01001116
Jenkins52ba29e2018-08-29 15:32:11 +00001117@attention We used to use gnustl but as of NDK r17 it is deprecated so we switched to libc++
Anthony Barbierdbdab852017-06-23 15:42:00 +01001118
Jenkinsb3a371b2018-05-23 11:36:53 +01001119@note Make sure to add the toolchains to your PATH:
1120
Jenkins52ba29e2018-08-29 15:32:11 +00001121 export PATH=$PATH:$MY_TOOLCHAINS/aarch64-linux-android-ndk-r17b/bin:$MY_TOOLCHAINS/arm-linux-android-ndk-r17b/bin
Anthony Barbierdbdab852017-06-23 15:42:00 +01001122
1123@subsubsection S3_3_1_library How to build the library ?
1124
Anthony Barbierdbdab852017-06-23 15:42:00 +01001125To cross-compile the library in debug mode, with NEON only support, for Android 32bit:
1126
1127 CXX=clang++ CC=clang scons Werror=1 -j8 debug=1 neon=1 opencl=0 os=android arch=armv7a
1128
1129To cross-compile the library in asserts mode, with OpenCL only support, for Android 64bit:
1130
Anthony Barbier8140e1e2017-12-14 23:48:46 +00001131 CXX=clang++ CC=clang scons Werror=1 -j8 debug=0 asserts=1 neon=0 opencl=1 embed_kernels=1 os=android arch=arm64-v8a
1132
1133To cross-compile the library in asserts mode, with GLES_COMPUTE only support, for Android 64bit:
1134
1135 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 +01001136
1137@subsubsection S3_3_2_examples How to manually build the examples ?
1138
1139The 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.
1140
Jenkinsb3a371b2018-05-23 11:36:53 +01001141@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 +01001142
1143Once you've got your Android standalone toolchain built and added to your path you can do the following:
1144
1145To cross compile a NEON example:
1146
1147 #32 bit:
Kaizenbf8b01d2017-10-12 14:26:51 +01001148 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 +01001149 #64 bit:
Anthony Barbier8140e1e2017-12-14 23:48:46 +00001150 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 +01001151
1152To cross compile an OpenCL example:
1153
1154 #32 bit:
Jenkinsb3a371b2018-05-23 11:36:53 +01001155 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 +01001156 #64 bit:
Jenkinsb3a371b2018-05-23 11:36:53 +01001157 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 +00001158
1159To cross compile a GLES example:
Anthony Barbierf45d5a92018-01-24 16:23:15 +00001160
Anthony Barbier8140e1e2017-12-14 23:48:46 +00001161 #32 bit:
1162 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
1163 #64 bit:
1164 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 +01001165
1166To cross compile the examples with the Graph API, such as graph_lenet.cpp, you need to link the library arm_compute_graph also.
1167(notice the compute library has to be built with both neon and opencl enabled - neon=1 and opencl=1)
1168
1169 #32 bit:
Jenkins52ba29e2018-08-29 15:32:11 +00001170 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
Kaizenbf8b01d2017-10-12 14:26:51 +01001171 #64 bit:
Jenkins52ba29e2018-08-29 15:32:11 +00001172 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
Anthony Barbierdbdab852017-06-23 15:42:00 +01001173
1174@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 +00001175@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 +01001176
1177Then you need to do is upload the executable and the shared library to the device using ADB:
1178
1179 adb push neon_convolution_arm /data/local/tmp/
1180 adb push cl_convolution_arm /data/local/tmp/
Anthony Barbier8140e1e2017-12-14 23:48:46 +00001181 adb push gc_absdiff_arm /data/local/tmp/
Anthony Barbierdbdab852017-06-23 15:42:00 +01001182 adb shell chmod 777 -R /data/local/tmp/
1183
1184And finally to run the example:
1185
1186 adb shell /data/local/tmp/neon_convolution_arm
1187 adb shell /data/local/tmp/cl_convolution_arm
Anthony Barbier8140e1e2017-12-14 23:48:46 +00001188 adb shell /data/local/tmp/gc_absdiff_arm
Anthony Barbierdbdab852017-06-23 15:42:00 +01001189
1190For 64bit:
1191
1192 adb push neon_convolution_aarch64 /data/local/tmp/
1193 adb push cl_convolution_aarch64 /data/local/tmp/
Anthony Barbier8140e1e2017-12-14 23:48:46 +00001194 adb push gc_absdiff_aarch64 /data/local/tmp/
Anthony Barbierdbdab852017-06-23 15:42:00 +01001195 adb shell chmod 777 -R /data/local/tmp/
1196
1197And finally to run the example:
1198
1199 adb shell /data/local/tmp/neon_convolution_aarch64
1200 adb shell /data/local/tmp/cl_convolution_aarch64
Anthony Barbier8140e1e2017-12-14 23:48:46 +00001201 adb shell /data/local/tmp/gc_absdiff_aarch64
Anthony Barbierdbdab852017-06-23 15:42:00 +01001202
Jenkins52ba29e2018-08-29 15:32:11 +00001203@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.
Jenkinsc3f34a42018-03-02 12:38:09 +00001204
1205For example:
Jenkins52ba29e2018-08-29 15:32:11 +00001206 adb shell /data/local/tmp/graph_lenet --help
Jenkinsc3f34a42018-03-02 12:38:09 +00001207
1208In 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.
1209
Kaizenbf8b01d2017-10-12 14:26:51 +01001210@subsection S3_4_bare_metal Building for bare metal
1211
1212For bare metal, the library was successfully built using linaros's latest (gcc-linaro-6.3.1-2017.05) bare metal toolchains:
1213 - arm-eabi for armv7a
1214 - aarch64-elf for arm64-v8a
1215
1216Download 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>.
1217
1218@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
1219
1220@subsubsection S3_4_1_library How to build the library ?
1221
1222To cross-compile the library with NEON support for baremetal arm64-v8a:
1223
1224 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
1225
1226@subsubsection S3_4_2_examples How to manually build the examples ?
1227
1228Examples 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>.
1229
1230@subsection S3_5_windows_host Building on a Windows host system
Kaizen8938bd32017-09-28 14:38:23 +01001231
1232Using `scons` directly from the Windows command line is known to cause
1233problems. The reason seems to be that if `scons` is setup for cross-compilation
1234it gets confused about Windows style paths (using backslashes). Thus it is
1235recommended to follow one of the options outlined below.
1236
Kaizenbf8b01d2017-10-12 14:26:51 +01001237@subsubsection S3_5_1_ubuntu_on_windows Bash on Ubuntu on Windows
Kaizen8938bd32017-09-28 14:38:23 +01001238
1239The best and easiest option is to use
1240<a href="https://msdn.microsoft.com/en-gb/commandline/wsl/about">Ubuntu on Windows</a>.
1241This feature is still marked as *beta* and thus might not be available.
1242However, if it is building the library is as simple as opening a *Bash on
1243Ubuntu on Windows* shell and following the general guidelines given above.
1244
Kaizenbf8b01d2017-10-12 14:26:51 +01001245@subsubsection S3_5_2_cygwin Cygwin
Kaizen8938bd32017-09-28 14:38:23 +01001246
1247If the Windows subsystem for Linux is not available <a href="https://www.cygwin.com/">Cygwin</a>
1248can be used to install and run `scons`. In addition to the default packages
1249installed by Cygwin `scons` has to be selected in the installer. (`git` might
1250also be useful but is not strictly required if you already have got the source
1251code of the library.) Linaro provides pre-built versions of
1252<a href="http://releases.linaro.org/components/toolchain/binaries/">GCC cross-compilers</a>
1253that can be used from the Cygwin terminal. When building for Android the
1254compiler is included in the Android standalone toolchain. After everything has
1255been set up in the Cygwin terminal the general guide on building the library
1256can be followed.
1257
Kaizenbf8b01d2017-10-12 14:26:51 +01001258@subsection S3_6_cl_stub_library The OpenCL stub library
Anthony Barbierdbdab852017-06-23 15:42:00 +01001259
1260In 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.
1261
1262If 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.
1263
1264@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.
1265
1266To cross-compile the stub OpenCL library simply run:
1267
1268 <target-prefix>-gcc -o libOpenCL.so -Iinclude opencl-1.2-stubs/opencl_stubs.c -fPIC -shared
1269
1270For example:
1271
Anthony Barbierdbdab852017-06-23 15:42:00 +01001272 #Linux 32bit
1273 arm-linux-gnueabihf-gcc -o libOpenCL.so -Iinclude opencl-1.2-stubs/opencl_stubs.c -fPIC -shared
1274 #Linux 64bit
1275 aarch64-linux-gnu-gcc -o libOpenCL.so -Iinclude -shared opencl-1.2-stubs/opencl_stubs.c -fPIC
1276 #Android 32bit
1277 arm-linux-androideabi-clang -o libOpenCL.so -Iinclude -shared opencl-1.2-stubs/opencl_stubs.c -fPIC -shared
1278 #Android 64bit
Anthony Barbier8140e1e2017-12-14 23:48:46 +00001279 aarch64-linux-android-clang -o libOpenCL.so -Iinclude -shared opencl-1.2-stubs/opencl_stubs.c -fPIC -shared
1280
1281@subsection S3_7_gles_stub_library The Linux OpenGLES and EGL stub libraries
1282
1283In 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.
1284
1285@note The stub libraries are only needed on Linux. For Android, the NDK toolchains already provide the meta-EGL and meta-GLES libraries.
1286
1287To cross-compile the stub OpenGLES and EGL libraries simply run:
1288
1289 <target-prefix>-gcc -o libEGL.so -Iinclude/linux opengles-3.1-stubs/EGL.c -fPIC -shared
1290 <target-prefix>-gcc -o libGLESv2.so -Iinclude/linux opengles-3.1-stubs/GLESv2.c -fPIC -shared
1291
1292 #Linux 32bit
1293 arm-linux-gnueabihf-gcc -o libEGL.so -Iinclude/linux opengles-3.1-stubs/EGL.c -fPIC -shared
1294 arm-linux-gnueabihf-gcc -o libGLESv2.so -Iinclude/linux opengles-3.1-stubs/GLESv2.c -fPIC -shared
1295
1296 #Linux 64bit
1297 aarch64-linux-gnu-gcc -o libEGL.so -Iinclude/linux opengles-3.1-stubs/EGL.c -fPIC -shared
1298 aarch64-linux-gnu-gcc -o libGLESv2.so -Iinclude/linux opengles-3.1-stubs/GLESv2.c -fPIC -shared
Jenkins52ba29e2018-08-29 15:32:11 +00001299
1300@subsection S3_8_cl_requirements OpenCL DDK Requirements
1301
1302@subsubsection S3_8_1_cl_hard_requirements Hard Requirements
1303
1304Compute 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).
1305
1306Enabling 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.
1307
1308Use of @ref CLMeanStdDev function requires 64-bit atomics support, thus \a cl_khr_int64_base_atomics should be supported in order to use.
1309
1310@subsubsection S3_8_2_cl_performance_requirements Performance improvements
1311
1312Integer 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.
1313
1314OpenCL kernel level debugging can be simplified with the use of printf, this requires the \a cl_arm_printf extension to be supported.
1315
1316SVM allocations are supported for all the underlying allocations in Compute Library. To enable this OpenCL 2.0 and above is a requirement.
1317
1318@subsection S3_9_cl_tuner OpenCL Tuner
1319
1320The 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).
1321The 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.
Jenkins4ba87db2019-05-23 17:11:51 +01001322The OpenCL tuner runs the same OpenCL kernel for a range of local workgroup sizes and keeps the local workgroup size of the fastest run to use in subsequent calls to the kernel. It supports three modes of tuning with different trade-offs between the time taken to tune and the kernel execution time achieved using the best LWS found. In the Exhaustive mode, it searches all the supported values of LWS. This mode takes the longest time to tune and is the most likely to find the optimal LWS. Normal mode searches a subset of LWS values to yield a good approximation of the optimal LWS. It takes less time to tune than Exhaustive mode. Rapid mode takes the shortest time to tune and finds an LWS value that is at least as good or better than the default LWS value. The mode affects only the search for the optimal LWS and has no effect when the LWS value is imported from a file.
Jenkins52ba29e2018-08-29 15:32:11 +00001323In 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.
1324
1325If 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:
1326
1327https://www.embedded-vision.com/platinum-members/arm/embedded-vision-training/videos/pages/may-2018-embedded-vision-summit-iodice
1328
1329Tuning 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.
1330
1331CLTuner 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.
1332
1333 #Example: 2 unique Matrix Multiply configurations
1334@code{.cpp}
1335 TensorShape a0 = TensorShape(32,32);
1336 TensorShape b0 = TensorShape(32,32);
1337 TensorShape c0 = TensorShape(32,32);
1338 TensorShape a1 = TensorShape(64,64);
1339 TensorShape b1 = TensorShape(64,64);
1340 TensorShape c1 = TensorShape(64,64);
1341
1342 Tensor a0_tensor;
1343 Tensor b0_tensor;
1344 Tensor c0_tensor;
1345 Tensor a1_tensor;
1346 Tensor b1_tensor;
1347 Tensor c1_tensor;
1348
1349 a0_tensor.allocator()->init(TensorInfo(a0, 1, DataType::F32));
1350 b0_tensor.allocator()->init(TensorInfo(b0, 1, DataType::F32));
1351 c0_tensor.allocator()->init(TensorInfo(c0, 1, DataType::F32));
1352 a1_tensor.allocator()->init(TensorInfo(a1, 1, DataType::F32));
1353 b1_tensor.allocator()->init(TensorInfo(b1, 1, DataType::F32));
1354 c1_tensor.allocator()->init(TensorInfo(c1 1, DataType::F32));
1355
1356 CLGEMM gemm0;
1357 CLGEMM gemm1;
1358
1359 // Configuration 0
1360 gemm0.configure(&a0, &b0, nullptr, &c0, 1.0f, 0.0f);
1361
1362 // Configuration 1
1363 gemm1.configure(&a1, &b1, nullptr, &c1, 1.0f, 0.0f);
1364@endcode
1365
1366@subsubsection S3_9_1_cl_tuner_how_to How to use it
1367
1368All 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
1369
1370 #Enable CL tuner
1371 ./graph_mobilenet --enable-tuner –-target=CL
1372 ./arm_compute_benchmark --enable-tuner
1373
1374 #Export/Import to/from a file
1375 ./graph_mobilenet --enable-tuner --target=CL --tuner-file=acl_tuner.csv
1376 ./arm_compute_benchmark --enable-tuner --tuner-file=acl_tuner.csv
1377
1378If you are importing the CLTuner'results from a file, the new tuned LWS values will be appended to it.
1379
1380Either you are benchmarking the graph examples or the test cases in the arm_compute_benchmark remember to:
1381
1382 -# Disable the power management
1383 -# Keep the GPU frequency constant
1384 -# Run multiple times the network (i.e. 10).
1385
1386If 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.
1387
1388@code{.cpp}
1389CLTuner tuner;
1390
1391// Setup Scheduler
1392CLScheduler::get().default_init(&tuner);
1393@endcode
1394
1395After the first run, the CLTuner's results can be exported to a file using the method "save_to_file()".
1396- tuner.save_to_file("results.csv");
1397
1398This file can be also imported using the method "load_from_file("results.csv")".
1399- tuner.load_from_file("results.csv");
Anthony Barbierdbdab852017-06-23 15:42:00 +01001400*/
Jenkinsc3f34a42018-03-02 12:38:09 +00001401} // namespace arm_compute