Anthony Barbier | 3762e74 | 2018-03-02 11:49:33 +0000 | [diff] [blame] | 1 | namespace arm_compute |
| 2 | { |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 3 | /** @mainpage Introduction |
| 4 | |
| 5 | @tableofcontents |
| 6 | |
| 7 | The Computer Vision and Machine Learning library is a set of functions optimised for both ARM CPUs and GPUs using SIMD technologies. |
| 8 | |
| 9 | Several builds of the library are available using various configurations: |
| 10 | - OS: Linux, Android or bare metal. |
| 11 | - Architecture: armv7a (32bit) or arm64-v8a (64bit) |
Anthony Barbier | 20dbb82 | 2017-12-13 21:19:39 +0000 | [diff] [blame] | 12 | - Technology: NEON / OpenCL / GLES_COMPUTE / NEON and OpenCL and GLES_COMPUTE |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 13 | - Debug / Asserts / Release: Use a build with asserts enabled to debug your application and enable extra validation. Once you are sure your application works as expected you can switch to a release build of the library for maximum performance. |
| 14 | |
| 15 | @section S0_1_contact Contact / Support |
| 16 | |
| 17 | Please email developer@arm.com |
| 18 | |
| 19 | In order to facilitate the work of the support team please provide the build information of the library you are using. To get the version of the library you are using simply run: |
| 20 | |
| 21 | $ strings android-armv7a-cl-asserts/libarm_compute.so | grep arm_compute_version |
| 22 | arm_compute_version=v16.12 Build options: {'embed_kernels': '1', 'opencl': '1', 'arch': 'armv7a', 'neon': '0', 'asserts': '1', 'debug': '0', 'os': 'android', 'Werror': '1'} Git hash=f51a545d4ea12a9059fe4e598a092f1fd06dc858 |
| 23 | |
Anthony Barbier | 14c86a9 | 2017-12-14 16:27:41 +0000 | [diff] [blame] | 24 | @section S0_2_prebuilt_binaries Pre-built binaries |
| 25 | |
| 26 | For each release we provide some pre-built binaries of the library [here](https://github.com/ARM-software/ComputeLibrary/releases) |
| 27 | |
| 28 | These binaries have been built using the following toolchains: |
| 29 | - Linux armv7a: gcc-linaro-arm-linux-gnueabihf-4.9-2014.07_linux |
| 30 | - Linux arm64-v8a: gcc-linaro-4.9-2016.02-x86_64_aarch64-linux-gnu |
Anthony Barbier | d51ea0a | 2018-08-07 17:48:03 +0100 | [diff] [blame] | 31 | - Android armv7a: clang++ / libc++ NDK r17b |
| 32 | - Android am64-v8a: clang++ / libc++ NDK r17b |
Anthony Barbier | 14c86a9 | 2017-12-14 16:27:41 +0000 | [diff] [blame] | 33 | |
| 34 | @warning Make sure to use a compatible toolchain to build your application or you will get some std::bad_alloc errors at runtime. |
| 35 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 36 | @section S1_file_organisation File organisation |
| 37 | |
| 38 | This archive contains: |
| 39 | - The arm_compute header and source files |
| 40 | - The latest Khronos OpenCL 1.2 C headers from the <a href="https://www.khronos.org/registry/cl/">Khronos OpenCL registry</a> |
| 41 | - The latest Khronos cl2.hpp from the <a href="https://www.khronos.org/registry/cl/">Khronos OpenCL registry</a> (API version 2.1 when this document was written) |
Anthony Barbier | 20dbb82 | 2017-12-13 21:19:39 +0000 | [diff] [blame] | 42 | - The latest Khronos OpenGL ES 3.1 C headers from the <a href="https://www.khronos.org/registry/gles/">Khronos OpenGL ES registry</a> |
| 43 | - The latest Khronos EGL 1.5 C headers from the <a href="https://www.khronos.org/registry/gles/">Khronos EGL registry</a> |
| 44 | - The sources for a stub version of libOpenCL.so, libGLESv1_CM.so, libGLESv2.so and libEGL.so to help you build your application. |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 45 | - An examples folder containing a few examples to compile and link against the library. |
| 46 | - A @ref utils folder containing headers with some boiler plate code used by the examples. |
| 47 | - This documentation. |
| 48 | |
| 49 | You should have the following file organisation: |
| 50 | |
| 51 | . |
| 52 | ├── arm_compute --> All the arm_compute headers |
| 53 | │ ├── core |
| 54 | │ │ ├── CL |
Anthony Barbier | 6a5627a | 2017-09-26 14:42:02 +0100 | [diff] [blame] | 55 | │ │ │ ├── CLKernelLibrary.h --> Manages all the OpenCL kernels compilation and caching, provides accessors for the OpenCL Context. |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 56 | │ │ │ ├── CLKernels.h --> Includes all the OpenCL kernels at once |
| 57 | │ │ │ ├── CL specialisation of all the generic objects interfaces (ICLTensor, ICLImage, etc.) |
| 58 | │ │ │ ├── kernels --> Folder containing all the OpenCL kernels |
| 59 | │ │ │ │ └── CL*Kernel.h |
| 60 | │ │ │ └── OpenCL.h --> Wrapper to configure the Khronos OpenCL C++ header |
| 61 | │ │ ├── CPP |
Anthony Barbier | 6a5627a | 2017-09-26 14:42:02 +0100 | [diff] [blame] | 62 | │ │ │ ├── CPPKernels.h --> Includes all the CPP kernels at once |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 63 | │ │ │ └── kernels --> Folder containing all the CPP kernels |
Anthony Barbier | 6a5627a | 2017-09-26 14:42:02 +0100 | [diff] [blame] | 64 | │ │ │ └── CPP*Kernel.h |
Anthony Barbier | 20dbb82 | 2017-12-13 21:19:39 +0000 | [diff] [blame] | 65 | │ │ ├── GLES_COMPUTE |
| 66 | │ │ │ ├── GCKernelLibrary.h --> Manages all the GLES kernels compilation and caching, provides accessors for the GLES Context. |
| 67 | │ │ │ ├── GCKernels.h --> Includes all the GLES kernels at once |
| 68 | │ │ │ ├── GLES specialisation of all the generic objects interfaces (IGCTensor, IGCImage, etc.) |
| 69 | │ │ │ ├── kernels --> Folder containing all the GLES kernels |
| 70 | │ │ │ │ └── GC*Kernel.h |
| 71 | │ │ │ └── OpenGLES.h --> Wrapper to configure the Khronos EGL and OpenGL ES C header |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 72 | │ │ ├── NEON |
| 73 | │ │ │ ├── kernels --> Folder containing all the NEON kernels |
Anthony Barbier | 38e7f1f | 2018-05-21 13:37:47 +0100 | [diff] [blame] | 74 | │ │ │ │ ├── assembly --> headers for assembly optimised NEON kernels. |
| 75 | │ │ │ │ ├── convolution --> headers for convolution assembly optimised NEON kernels. |
| 76 | │ │ │ │ │ ├── common --> headers for code which is common to several convolution implementations. |
| 77 | │ │ │ │ │ ├── depthwise --> headers for Depthwise convolultion assembly implementation |
| 78 | │ │ │ │ │ └── winograd --> headers for Winograd convolution assembly implementation |
| 79 | │ │ │ │ ├── detail --> Common code for several intrinsics implementations. |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 80 | │ │ │ │ └── NE*Kernel.h |
| 81 | │ │ │ └── NEKernels.h --> Includes all the NEON kernels at once |
| 82 | │ │ ├── All common basic types (Types.h, Window, Coordinates, Iterator, etc.) |
| 83 | │ │ ├── All generic objects interfaces (ITensor, IImage, etc.) |
| 84 | │ │ └── Objects metadata classes (ImageInfo, TensorInfo, MultiImageInfo) |
Anthony Barbier | 6a5627a | 2017-09-26 14:42:02 +0100 | [diff] [blame] | 85 | │ ├── graph |
Anthony Barbier | 38e7f1f | 2018-05-21 13:37:47 +0100 | [diff] [blame] | 86 | │ │ ├── algorithms |
| 87 | │ │ │ └── Generic algorithms used by the graph backend (e.g Order of traversal) |
| 88 | │ │ ├── backends --> The backend specific code |
| 89 | │ │ │ ├── CL --> OpenCL specific operations |
| 90 | │ │ │ ├── GLES --> OpenGLES Compute Shaders specific operations |
| 91 | │ │ │ └── NEON --> NEON specific operations |
| 92 | │ │ ├── detail |
| 93 | │ │ │ └── Collection of internal utilities. |
| 94 | │ │ ├── frontend |
| 95 | │ │ │ └── Code related to the stream frontend interface. |
| 96 | │ │ ├── mutators |
| 97 | │ │ │ └── Used to modify / optimise the Graph intermediate representation(Operator fusion, in place operations, etc.) |
Anthony Barbier | 6a5627a | 2017-09-26 14:42:02 +0100 | [diff] [blame] | 98 | │ │ ├── nodes |
| 99 | │ │ │ └── The various nodes supported by the graph API |
Anthony Barbier | 38e7f1f | 2018-05-21 13:37:47 +0100 | [diff] [blame] | 100 | │ │ ├── printers |
| 101 | │ │ │ └── Debug printers |
Anthony Barbier | 6a5627a | 2017-09-26 14:42:02 +0100 | [diff] [blame] | 102 | │ │ └── Graph objects ( INode, ITensorAccessor, Graph, etc.) |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 103 | │ └── runtime |
| 104 | │ ├── CL |
| 105 | │ │ ├── CL objects & allocators (CLArray, CLImage, CLTensor, etc.) |
| 106 | │ │ ├── functions --> Folder containing all the OpenCL functions |
| 107 | │ │ │ └── CL*.h |
Anthony Barbier | 6a5627a | 2017-09-26 14:42:02 +0100 | [diff] [blame] | 108 | │ │ ├── CLScheduler.h --> Interface to enqueue OpenCL kernels and get/set the OpenCL CommandQueue and ICLTuner. |
Anthony Barbier | 38e7f1f | 2018-05-21 13:37:47 +0100 | [diff] [blame] | 109 | │ │ ├── CLFunctions.h --> Includes all the OpenCL functions at once |
| 110 | │ │ └── tuners |
| 111 | │ │ └── Local workgroup size tuners for specific architectures / GPUs |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 112 | │ ├── CPP |
Anthony Barbier | 6a5627a | 2017-09-26 14:42:02 +0100 | [diff] [blame] | 113 | │ │ ├── CPPKernels.h --> Includes all the CPP functions at once. |
Anthony Barbier | 38e7f1f | 2018-05-21 13:37:47 +0100 | [diff] [blame] | 114 | │ │ ├── CPPScheduler.h --> Basic pool of threads to execute CPP/NEON code on several cores in parallel |
| 115 | │ │ └── functions --> Folder containing all the CPP functions |
| 116 | │ │ └── CPP*.h |
Anthony Barbier | 20dbb82 | 2017-12-13 21:19:39 +0000 | [diff] [blame] | 117 | │ ├── GLES_COMPUTE |
| 118 | │ │ ├── GLES objects & allocators (GCArray, GCImage, GCTensor, etc.) |
| 119 | │ │ ├── functions --> Folder containing all the GLES functions |
| 120 | │ │ │ └── GC*.h |
| 121 | │ │ ├── GCScheduler.h --> Interface to enqueue GLES kernels and get/set the GLES CommandQueue. |
| 122 | │ │ └── GCFunctions.h --> Includes all the GLES functions at once |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 123 | │ ├── NEON |
| 124 | │ │ ├── functions --> Folder containing all the NEON functions |
| 125 | │ │ │ └── NE*.h |
| 126 | │ │ └── NEFunctions.h --> Includes all the NEON functions at once |
Anthony Barbier | 6a5627a | 2017-09-26 14:42:02 +0100 | [diff] [blame] | 127 | │ ├── OMP |
| 128 | │ │ └── OMPScheduler.h --> OpenMP scheduler (Alternative to the CPPScheduler) |
| 129 | │ ├── Memory manager files (LifetimeManager, PoolManager, etc.) |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 130 | │ └── Basic implementations of the generic object interfaces (Array, Image, Tensor, etc.) |
Anthony Barbier | a8a28f6 | 2018-02-26 19:16:32 +0000 | [diff] [blame] | 131 | ├── data -> Contains test images and reference data dumps used by validation tests |
| 132 | ├── docs -> Contains Doxyfile and Doxygen sources used to generate the HTML pages in the documentation folder. |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 133 | ├── documentation |
| 134 | │ ├── index.xhtml |
| 135 | │ └── ... |
| 136 | ├── documentation.xhtml -> documentation/index.xhtml |
| 137 | ├── examples |
Anthony Barbier | 20dbb82 | 2017-12-13 21:19:39 +0000 | [diff] [blame] | 138 | │ ├── cl_*.cpp --> OpenCL examples |
Anthony Barbier | 14c86a9 | 2017-12-14 16:27:41 +0000 | [diff] [blame] | 139 | │ ├── gc_*.cpp --> GLES compute shaders examples |
Anthony Barbier | 20dbb82 | 2017-12-13 21:19:39 +0000 | [diff] [blame] | 140 | │ ├── graph_*.cpp --> Graph examples |
| 141 | │ ├── neoncl_*.cpp --> NEON / OpenCL interoperability examples |
| 142 | │ └── neon_*.cpp --> NEON examples |
Anthony Barbier | 38e7f1f | 2018-05-21 13:37:47 +0100 | [diff] [blame] | 143 | ├── graph.h --> Includes all the Graph headers at once. |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 144 | ├── include |
Anthony Barbier | 6a5627a | 2017-09-26 14:42:02 +0100 | [diff] [blame] | 145 | │ ├── CL |
| 146 | │ │ └── Khronos OpenCL C headers and C++ wrapper |
| 147 | │ ├── half --> FP16 library available from http://half.sourceforge.net |
Anthony Barbier | 14c86a9 | 2017-12-14 16:27:41 +0000 | [diff] [blame] | 148 | │ ├── libnpy --> Library to load / write npy buffers, available from https://github.com/llohse/libnpy |
| 149 | │ └── linux --> Headers only needed for Linux builds |
| 150 | │ └── Khronos EGL and OpenGLES headers |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 151 | ├── opencl-1.2-stubs |
Anthony Barbier | 14c86a9 | 2017-12-14 16:27:41 +0000 | [diff] [blame] | 152 | │ └── opencl_stubs.c --> OpenCL stubs implementation |
| 153 | ├── opengles-3.1-stubs |
| 154 | │ ├── EGL.c --> EGL stubs implementation |
| 155 | │ └── GLESv2.c --> GLESv2 stubs implementation |
Anthony Barbier | 6a5627a | 2017-09-26 14:42:02 +0100 | [diff] [blame] | 156 | ├── scripts |
| 157 | │ ├── caffe_data_extractor.py --> Basic script to export weights from Caffe to npy files |
| 158 | │ └── tensorflow_data_extractor.py --> Basic script to export weights from Tensor Flow to npy files |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 159 | ├── src |
| 160 | │ ├── core |
| 161 | │ │ └── ... (Same structure as headers) |
Anthony Barbier | 20dbb82 | 2017-12-13 21:19:39 +0000 | [diff] [blame] | 162 | │ │ ├── CL |
| 163 | │ │ │ └── cl_kernels --> All the OpenCL kernels |
| 164 | │ │ └── GLES_COMPUTE |
| 165 | │ │ └── cs_shaders --> All the OpenGL ES Compute Shaders |
Anthony Barbier | 6a5627a | 2017-09-26 14:42:02 +0100 | [diff] [blame] | 166 | │ ├── graph |
| 167 | │ │ └── ... (Same structure as headers) |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 168 | │ └── runtime |
| 169 | │ └── ... (Same structure as headers) |
Anthony Barbier | 6a5627a | 2017-09-26 14:42:02 +0100 | [diff] [blame] | 170 | ├── support |
| 171 | │ └── Various headers to work around toolchains / platform issues. |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 172 | ├── tests |
| 173 | │ ├── All test related files shared between validation and benchmark |
Anthony Barbier | 38e7f1f | 2018-05-21 13:37:47 +0100 | [diff] [blame] | 174 | │ ├── benchmark --> Sources for benchmarking |
| 175 | │ │ ├── Benchmark specific files |
| 176 | │ │ ├── fixtures |
| 177 | │ │ │ └── Backend agnostic fixtures to initialise and run the functions to test. |
| 178 | │ │ ├── CL --> OpenCL benchmarking tests |
| 179 | │ │ ├── GLES_COMPUTE --> GLES benchmarking tests |
| 180 | │ │ └── NEON --> NEON benchmarking tests |
Anthony Barbier | 6a5627a | 2017-09-26 14:42:02 +0100 | [diff] [blame] | 181 | │ ├── CL --> OpenCL accessors |
Anthony Barbier | 20dbb82 | 2017-12-13 21:19:39 +0000 | [diff] [blame] | 182 | │ ├── GLES_COMPUTE --> GLES accessors |
Anthony Barbier | 6a5627a | 2017-09-26 14:42:02 +0100 | [diff] [blame] | 183 | │ ├── NEON --> NEON accessors |
Anthony Barbier | 6a5627a | 2017-09-26 14:42:02 +0100 | [diff] [blame] | 184 | │ ├── datasets |
| 185 | │ │ └── Datasets for all the validation / benchmark tests, layer configurations for various networks, etc. |
| 186 | │ ├── framework |
| 187 | │ │ └── Boiler plate code for both validation and benchmark test suites (Command line parsers, instruments, output loggers, etc.) |
| 188 | │ ├── networks |
| 189 | │ │ └── Examples of how to instantiate networks. |
Anthony Barbier | 38e7f1f | 2018-05-21 13:37:47 +0100 | [diff] [blame] | 190 | │ └── validation --> Sources for validation |
| 191 | │ ├── Validation specific files |
| 192 | │ ├── fixtures |
| 193 | │ │ └── Backend agnostic fixtures to initialise and run the functions to test. |
| 194 | │ ├── reference |
| 195 | │ │ └── Reference implementation used to validate the results of the various backends. |
| 196 | │ ├── CL --> OpenCL validation tests |
| 197 | │ ├── GLES_COMPUTE --> GLES validation tests |
| 198 | │ ├── CPP --> C++ reference implementations |
| 199 | │ └── NEON --> NEON validation tests |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 200 | └── utils --> Boiler plate code used by examples |
Anthony Barbier | 20dbb82 | 2017-12-13 21:19:39 +0000 | [diff] [blame] | 201 | └── Various utilities to print types, load / store assets, etc. |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 202 | |
| 203 | @section S2_versions_changelog Release versions and changelog |
| 204 | |
| 205 | @subsection S2_1_versions Release versions |
| 206 | |
| 207 | All releases are numbered vYY.MM Where YY are the last two digits of the year, and MM the month number. |
| 208 | If there is more than one release in a month then an extra sequential number is appended at the end: |
| 209 | |
| 210 | v17.03 (First release of March 2017) |
| 211 | v17.03.1 (Second release of March 2017) |
| 212 | v17.04 (First release of April 2017) |
| 213 | |
| 214 | @note We're aiming at releasing one major public release with new features per quarter. All releases in between will only contain bug fixes. |
| 215 | |
| 216 | @subsection S2_2_changelog Changelog |
| 217 | |
Anthony Barbier | d51ea0a | 2018-08-07 17:48:03 +0100 | [diff] [blame] | 218 | v18.08 Public major release |
| 219 | - Various bug fixes. |
| 220 | - Updated recommended NDK version to r17b. |
| 221 | |
| 222 | v18.05 Public major release |
Pablo Tello | b5cc95b | 2018-05-15 11:49:33 +0100 | [diff] [blame] | 223 | - Various bug fixes. |
| 224 | - Various optimisations. |
Pablo Tello | eb82fd2 | 2018-02-23 13:43:50 +0000 | [diff] [blame] | 225 | - Major redesign in the interface for the neon kernels implemented in assembly. |
| 226 | - Removed arm_compute::NEGEMMLowpAArch64A53Kernel / arm_compute::NEGEMMLowpAArch64Kernel / arm_compute::NEGEMMLowpAArch64V8P4Kernel / arm_compute::NEGEMMInterleavedBlockedKernel / arm_compute::NEGEMMLowpAssemblyMatrixMultiplyCore / arm_compute::NEHGEMMAArch64FP16Kernel |
| 227 | - Added NEGEMMAssemblyWrapper and AssemblyKernelGlue which are used to execute assembly kernels in neon functions. |
| 228 | - Minor changes to the CPUInfo type to make it compatible with the new assembly gemm interface. |
Pablo Tello | b5cc95b | 2018-05-15 11:49:33 +0100 | [diff] [blame] | 229 | - Moved neon assembly kernels to the folder src/core/NEON/kernels/arm_gemm. |
| 230 | - Improved doxygen documentation. |
| 231 | - Improved memory management for layer's transitions. |
| 232 | - Added support for NHWC data layout in tensors. |
| 233 | - Added NHWC data layout support to: |
| 234 | - @ref NEGEMMConvolutionLayer |
| 235 | - @ref NEDirectConvolutionLayer |
| 236 | - @ref NEPoolingLayer / @ref CLPoolingLayer |
| 237 | - @ref NEBatchNormalizationLayer / @ref CLBatchNormalizationLayer |
| 238 | - @ref NEDepthwiseConvolutionLayer |
| 239 | - @ref NEScale |
| 240 | - @ref NEIm2Col |
| 241 | - Added support for dilated convolutions in @ref NEConvolutionLayer and @ref CLConvolutionLayer. |
| 242 | - New OpenCL kernels / functions: |
| 243 | - @ref CLChannelShuffleLayer / @ref CLChannelShuffleLayerKernel |
| 244 | - @ref CLConvertFullyConnectedWeightsKernel / @ref CLConvertFullyConnectedWeights |
| 245 | - @ref CLCopy / @ref CLCopyKernel |
Anthony Barbier | 38e7f1f | 2018-05-21 13:37:47 +0100 | [diff] [blame] | 246 | - @ref CLLSTMLayer |
Pablo Tello | b5cc95b | 2018-05-15 11:49:33 +0100 | [diff] [blame] | 247 | - @ref CLRNNLayer |
| 248 | - @ref CLWidthConcatenateLayer / @ref CLWidthConcatenateLayerKernel |
| 249 | - @ref CLWinogradFilterTransformKernel / @ref CLWinogradInputTransformKernel / @ref CLWinogradConvolutionLayer |
| 250 | - @ref CLWinogradInputTransformKernel / @ref CLWinogradInputTransform |
| 251 | - New Neon kernels / functions: |
| 252 | - @ref CLRNNLayer |
| 253 | - @ref NEConvertFullyConnectedWeightsKernel / @ref NEConvertFullyConnectedWeights. |
| 254 | - Created the validate method in @ref CLDepthwiseConvolutionLayer. |
| 255 | - Beta and gamma are no longer mandatory arguments in @ref NEBatchNormalizationLayer and @ref CLBatchNormalizationLayer. |
| 256 | - Added depth multiplier support in @ref NEDepthwiseConvolutionLayer and @ref CLDepthwiseConvolutionLayer. |
| 257 | - Added broadcast multiply support in @ref NEPixelWiseMultiplication / @ref NEPixelWiseMultiplicationKernel. |
| 258 | - Port mobilenet example to NHWC data layout. |
| 259 | - Enabled Winograd method in @ref CLConvolutionLayer. |
| 260 | - Renamed NEWinogradLayer to @ref NEWinogradConvolutionLayer. |
| 261 | - Updated @ref NEWinogradConvolutionLayer to use highly optimised assembly kernels in src/core/NEON/kernels/arm_gemm. |
| 262 | - Added memory manager support in GLES functions. |
| 263 | - Major refactoring of the graph API. |
| 264 | - Added GLES backend in the graph API. |
| 265 | - Added support for the memory manager in the graph API. |
| 266 | - Enabled Winograd Convolution method in the graph API. |
| 267 | - Added support for grouped convolutions in the graph API. |
| 268 | - Replaced NEDeconvolutionLayerUpsampleKernel with @ref NEScaleKernel in @ref NEDeconvolutionLayer. |
| 269 | - Added fast maths flag in @ref CLConvolutionLayer. |
| 270 | - Added new tests and benchmarks in validation and benchmark frameworks |
| 271 | - Merge Activation layer with Convolution Layer (NEON. CL, GLES) |
| 272 | - Added support to OpenCL 2.0 SVM |
| 273 | - Added support to import memory in OpenCL tensors. |
| 274 | - Added the prepare() method to perform any one off pre-processing before running the function. |
| 275 | - Added new examples: |
| 276 | - graph_inception_v4.cpp |
Anthony Barbier | 38e7f1f | 2018-05-21 13:37:47 +0100 | [diff] [blame] | 277 | - graph_resnext50.cpp |
Pablo Tello | b5cc95b | 2018-05-15 11:49:33 +0100 | [diff] [blame] | 278 | - Added memory measurement instrument for CL. |
Pablo Tello | eb82fd2 | 2018-02-23 13:43:50 +0000 | [diff] [blame] | 279 | |
Anthony Barbier | 577fbdf | 2018-03-01 15:17:54 +0000 | [diff] [blame] | 280 | v18.03 Public maintenance release |
| 281 | - Various bug fixes. |
Anthony Barbier | 3762e74 | 2018-03-02 11:49:33 +0000 | [diff] [blame] | 282 | - Fixed bug in @ref NEActivationLayer |
| 283 | - Fix in @ref CLTuner when using batches. |
Anthony Barbier | 577fbdf | 2018-03-01 15:17:54 +0000 | [diff] [blame] | 284 | - Updated recommended NDK version to r16b (And fixed warnings). |
| 285 | - Fixed bug in validation code. |
| 286 | - Added Inception v4 graph example. |
Georgios Pinitas | 9fb1159 | 2018-04-26 20:34:58 +0100 | [diff] [blame] | 287 | - Renamed NEWinogradLayer.cpp to @ref NEWinogradConvolutionLayer |
Anthony Barbier | 577fbdf | 2018-03-01 15:17:54 +0000 | [diff] [blame] | 288 | |
Anthony Barbier | 2d0ce77 | 2018-02-21 15:35:36 +0000 | [diff] [blame] | 289 | v18.02 Public major release |
| 290 | - Various NEON / OpenCL / GLES optimisations. |
| 291 | - Various bug fixes. |
| 292 | - Changed default number of threads on big LITTLE systems. |
| 293 | - Refactored examples and added: |
| 294 | - graph_mobilenet_qassym8 |
| 295 | - graph_resnet |
| 296 | - graph_squeezenet_v1_1 |
Anthony Barbier | 3762e74 | 2018-03-02 11:49:33 +0000 | [diff] [blame] | 297 | - Renamed @ref CLConvolutionLayer into @ref CLGEMMConvolutionLayer and created a new @ref CLConvolutionLayer to select the fastest convolution method. |
| 298 | - Renamed @ref NEConvolutionLayer into @ref NEGEMMConvolutionLayer and created a new @ref NEConvolutionLayer to select the fastest convolution method. |
Anthony Barbier | 2d0ce77 | 2018-02-21 15:35:36 +0000 | [diff] [blame] | 299 | - Added in place support to: |
Anthony Barbier | 3762e74 | 2018-03-02 11:49:33 +0000 | [diff] [blame] | 300 | - @ref CLActivationLayer |
| 301 | - @ref CLBatchNormalizationLayer |
Anthony Barbier | 2d0ce77 | 2018-02-21 15:35:36 +0000 | [diff] [blame] | 302 | - Added QASYMM8 support to: |
Anthony Barbier | 3762e74 | 2018-03-02 11:49:33 +0000 | [diff] [blame] | 303 | - @ref CLActivationLayer |
| 304 | - @ref CLDepthwiseConvolutionLayer |
| 305 | - @ref NEDepthwiseConvolutionLayer |
| 306 | - @ref NESoftmaxLayer |
Anthony Barbier | 2d0ce77 | 2018-02-21 15:35:36 +0000 | [diff] [blame] | 307 | - Added FP16 support to: |
Anthony Barbier | 3762e74 | 2018-03-02 11:49:33 +0000 | [diff] [blame] | 308 | - @ref CLDepthwiseConvolutionLayer3x3 |
| 309 | - @ref CLDepthwiseConvolutionLayer |
| 310 | - Added broadcasting support to @ref NEArithmeticAddition / @ref CLArithmeticAddition / @ref CLPixelWiseMultiplication |
| 311 | - Added fused batched normalization and activation to @ref CLBatchNormalizationLayer and @ref NEBatchNormalizationLayer |
| 312 | - Added support for non-square pooling to @ref NEPoolingLayer and @ref CLPoolingLayer |
Anthony Barbier | 2d0ce77 | 2018-02-21 15:35:36 +0000 | [diff] [blame] | 313 | - New OpenCL kernels / functions: |
Anthony Barbier | 3762e74 | 2018-03-02 11:49:33 +0000 | [diff] [blame] | 314 | - @ref CLDirectConvolutionLayerOutputStageKernel |
Pablo Tello | f6c572c | 2018-02-14 12:47:30 +0000 | [diff] [blame] | 315 | - New NEON kernels / functions |
Anthony Barbier | 2d0ce77 | 2018-02-21 15:35:36 +0000 | [diff] [blame] | 316 | - Added name() method to all kernels. |
| 317 | - Added support for Winograd 5x5. |
Anthony Barbier | 3762e74 | 2018-03-02 11:49:33 +0000 | [diff] [blame] | 318 | - @ref NEPermuteKernel / @ref NEPermute |
Georgios Pinitas | 9fb1159 | 2018-04-26 20:34:58 +0100 | [diff] [blame] | 319 | - @ref NEWinogradLayerTransformInputKernel / NEWinogradLayer |
| 320 | - @ref NEWinogradLayerTransformOutputKernel / NEWinogradLayer |
| 321 | - @ref NEWinogradLayerTransformWeightsKernel / NEWinogradLayer |
Anthony Barbier | e155337 | 2018-07-16 18:53:52 +0100 | [diff] [blame] | 322 | - Renamed NEWinogradLayerKernel into NEWinogradLayerBatchedGEMMKernel |
Anthony Barbier | 2d0ce77 | 2018-02-21 15:35:36 +0000 | [diff] [blame] | 323 | - New GLES kernels / functions: |
Anthony Barbier | 3762e74 | 2018-03-02 11:49:33 +0000 | [diff] [blame] | 324 | - @ref GCTensorShiftKernel / @ref GCTensorShift |
Pablo Tello | f6c572c | 2018-02-14 12:47:30 +0000 | [diff] [blame] | 325 | |
Anthony Barbier | 64c95a0 | 2018-01-22 18:48:55 +0000 | [diff] [blame] | 326 | v18.01 Public maintenance release |
| 327 | - Various bug fixes |
| 328 | - Added some of the missing validate() methods |
Anthony Barbier | 3762e74 | 2018-03-02 11:49:33 +0000 | [diff] [blame] | 329 | - Added @ref CLDeconvolutionLayerUpsampleKernel / @ref CLDeconvolutionLayer @ref CLDeconvolutionLayerUpsample |
| 330 | - Added @ref CLPermuteKernel / @ref CLPermute |
Anthony Barbier | 64c95a0 | 2018-01-22 18:48:55 +0000 | [diff] [blame] | 331 | - Added method to clean the programs cache in the CL Kernel library. |
Anthony Barbier | 3762e74 | 2018-03-02 11:49:33 +0000 | [diff] [blame] | 332 | - Added @ref GCArithmeticAdditionKernel / @ref GCArithmeticAddition |
| 333 | - Added @ref GCDepthwiseConvolutionLayer3x3Kernel / @ref GCDepthwiseConvolutionLayer3x3 |
| 334 | - Added @ref GCNormalizePlanarYUVLayerKernel / @ref GCNormalizePlanarYUVLayer |
| 335 | - Added @ref GCScaleKernel / @ref GCScale |
| 336 | - Added @ref GCWeightsReshapeKernel / @ref GCConvolutionLayer |
Anthony Barbier | 64c95a0 | 2018-01-22 18:48:55 +0000 | [diff] [blame] | 337 | - Added FP16 support to the following GLES compute kernels: |
Anthony Barbier | 3762e74 | 2018-03-02 11:49:33 +0000 | [diff] [blame] | 338 | - @ref GCCol2ImKernel |
| 339 | - @ref GCGEMMInterleave4x4Kernel |
| 340 | - @ref GCGEMMTranspose1xWKernel |
| 341 | - @ref GCIm2ColKernel |
| 342 | - Refactored NEON Winograd (NEWinogradLayerKernel) |
| 343 | - Added @ref NEDirectConvolutionLayerOutputStageKernel |
Anthony Barbier | 64c95a0 | 2018-01-22 18:48:55 +0000 | [diff] [blame] | 344 | - Added QASYMM8 support to the following NEON kernels: |
Anthony Barbier | 3762e74 | 2018-03-02 11:49:33 +0000 | [diff] [blame] | 345 | - @ref NEDepthwiseConvolutionLayer3x3Kernel |
| 346 | - @ref NEFillBorderKernel |
| 347 | - @ref NEPoolingLayerKernel |
Anthony Barbier | 64c95a0 | 2018-01-22 18:48:55 +0000 | [diff] [blame] | 348 | - Added new examples: |
| 349 | - graph_cl_mobilenet_qasymm8.cpp |
| 350 | - graph_inception_v3.cpp |
| 351 | - gc_dc.cpp |
| 352 | - More tests added to both validation and benchmarking suites. |
| 353 | |
Gian Marco | ff85093 | 2017-12-11 12:37:17 +0000 | [diff] [blame] | 354 | v17.12 Public major release |
| 355 | - Most machine learning functions on OpenCL support the new data type QASYMM8 |
| 356 | - Introduced logging interface |
| 357 | - Introduced opencl timer |
| 358 | - Reworked GEMMLowp interface |
| 359 | - Added new NEON assembly kernels for GEMMLowp, SGEMM and HGEMM |
| 360 | - Added validation method for most Machine Learning kernels / functions |
| 361 | - Added new graph examples such as googlenet, mobilenet, squeezenet, vgg16 and vgg19 |
| 362 | - Added sgemm example for OpenCL |
| 363 | - Added absolute difference example for GLES compute |
| 364 | - Added new tests and benchmarks in validation and benchmark frameworks |
| 365 | - Added new kernels / functions for GLES compute |
| 366 | |
| 367 | - New OpenGL ES kernels / functions |
Anthony Barbier | 3762e74 | 2018-03-02 11:49:33 +0000 | [diff] [blame] | 368 | - @ref GCAbsoluteDifferenceKernel / @ref GCAbsoluteDifference |
| 369 | - @ref GCActivationLayerKernel / @ref GCActivationLayer |
| 370 | - @ref GCBatchNormalizationLayerKernel / @ref GCBatchNormalizationLayer |
| 371 | - @ref GCCol2ImKernel |
| 372 | - @ref GCDepthConcatenateLayerKernel / @ref GCDepthConcatenateLayer |
| 373 | - @ref GCDirectConvolutionLayerKernel / @ref GCDirectConvolutionLayer |
| 374 | - @ref GCDropoutLayerKernel / @ref GCDropoutLayer |
| 375 | - @ref GCFillBorderKernel / @ref GCFillBorder |
| 376 | - @ref GCGEMMInterleave4x4Kernel / @ref GCGEMMInterleave4x4 |
| 377 | - @ref GCGEMMMatrixAccumulateBiasesKernel / @ref GCGEMMMatrixAdditionKernel / @ref GCGEMMMatrixMultiplyKernel / @ref GCGEMM |
| 378 | - @ref GCGEMMTranspose1xWKernel / @ref GCGEMMTranspose1xW |
| 379 | - @ref GCIm2ColKernel |
| 380 | - @ref GCNormalizationLayerKernel / @ref GCNormalizationLayer |
| 381 | - @ref GCPixelWiseMultiplicationKernel / @ref GCPixelWiseMultiplication |
| 382 | - @ref GCPoolingLayerKernel / @ref GCPoolingLayer |
| 383 | - @ref GCLogits1DMaxKernel / @ref GCLogits1DShiftExpSumKernel / @ref GCLogits1DNormKernel / @ref GCSoftmaxLayer |
| 384 | - @ref GCTransposeKernel / @ref GCTranspose |
Gian Marco | ff85093 | 2017-12-11 12:37:17 +0000 | [diff] [blame] | 385 | |
| 386 | - New NEON kernels / functions |
Pablo Tello | eb82fd2 | 2018-02-23 13:43:50 +0000 | [diff] [blame] | 387 | - arm_compute::NEGEMMLowpAArch64A53Kernel / arm_compute::NEGEMMLowpAArch64Kernel / arm_compute::NEGEMMLowpAArch64V8P4Kernel / arm_compute::NEGEMMInterleavedBlockedKernel / arm_compute::NEGEMMLowpAssemblyMatrixMultiplyCore |
| 388 | - arm_compute::NEHGEMMAArch64FP16Kernel |
Anthony Barbier | 3762e74 | 2018-03-02 11:49:33 +0000 | [diff] [blame] | 389 | - @ref NEDepthwiseConvolutionLayer3x3Kernel / @ref NEDepthwiseIm2ColKernel / @ref NEGEMMMatrixVectorMultiplyKernel / @ref NEDepthwiseVectorToTensorKernel / @ref NEDepthwiseConvolutionLayer |
| 390 | - @ref NEGEMMLowpOffsetContributionKernel / @ref NEGEMMLowpMatrixAReductionKernel / @ref NEGEMMLowpMatrixBReductionKernel / @ref NEGEMMLowpMatrixMultiplyCore |
| 391 | - @ref NEGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPointKernel / @ref NEGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPoint |
| 392 | - @ref NEGEMMLowpQuantizeDownInt32ToUint8ScaleKernel / @ref NEGEMMLowpQuantizeDownInt32ToUint8Scale |
Georgios Pinitas | 9fb1159 | 2018-04-26 20:34:58 +0100 | [diff] [blame] | 393 | - NEWinogradLayer / NEWinogradLayerKernel |
Gian Marco | ff85093 | 2017-12-11 12:37:17 +0000 | [diff] [blame] | 394 | |
| 395 | - New OpenCL kernels / functions |
Anthony Barbier | 3762e74 | 2018-03-02 11:49:33 +0000 | [diff] [blame] | 396 | - @ref CLGEMMLowpOffsetContributionKernel / @ref CLGEMMLowpMatrixAReductionKernel / @ref CLGEMMLowpMatrixBReductionKernel / @ref CLGEMMLowpMatrixMultiplyCore |
| 397 | - @ref CLGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPointKernel / @ref CLGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPoint |
| 398 | - @ref CLGEMMLowpQuantizeDownInt32ToUint8ScaleKernel / @ref CLGEMMLowpQuantizeDownInt32ToUint8Scale |
Gian Marco | ff85093 | 2017-12-11 12:37:17 +0000 | [diff] [blame] | 399 | |
| 400 | - New graph nodes for NEON and OpenCL |
Georgios Pinitas | d9eb275 | 2018-04-03 13:44:29 +0100 | [diff] [blame] | 401 | - graph::BranchLayer |
| 402 | - graph::DepthConvertLayer |
| 403 | - graph::DepthwiseConvolutionLayer |
| 404 | - graph::DequantizationLayer |
| 405 | - graph::FlattenLayer |
| 406 | - graph::QuantizationLayer |
| 407 | - graph::ReshapeLayer |
Gian Marco | ff85093 | 2017-12-11 12:37:17 +0000 | [diff] [blame] | 408 | |
Anthony Barbier | 3c5b4ff | 2017-10-12 13:20:52 +0100 | [diff] [blame] | 409 | v17.10 Public maintenance release |
| 410 | - Bug fixes: |
| 411 | - Check the maximum local workgroup size supported by OpenCL devices |
| 412 | - Minor documentation updates (Fixed instructions to build the examples) |
Anthony Barbier | 3762e74 | 2018-03-02 11:49:33 +0000 | [diff] [blame] | 413 | - Introduced a graph::GraphContext |
Anthony Barbier | 3c5b4ff | 2017-10-12 13:20:52 +0100 | [diff] [blame] | 414 | - Added a few new Graph nodes, support for branches and grouping. |
| 415 | - Automatically enable cl_printf in debug builds |
| 416 | - Fixed bare metal builds for armv7a |
| 417 | - Added AlexNet and cartoon effect examples |
| 418 | - 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) |
| 419 | |
Anthony Barbier | 6a5627a | 2017-09-26 14:42:02 +0100 | [diff] [blame] | 420 | v17.09 Public major release |
| 421 | - Experimental Graph support: initial implementation of a simple stream API to easily chain machine learning layers. |
Anthony Barbier | 3762e74 | 2018-03-02 11:49:33 +0000 | [diff] [blame] | 422 | - Memory Manager (@ref BlobLifetimeManager, @ref BlobMemoryPool, @ref ILifetimeManager, @ref IMemoryGroup, @ref IMemoryManager, @ref IMemoryPool, @ref IPoolManager, @ref MemoryManagerOnDemand, @ref PoolManager) |
Anthony Barbier | 6a5627a | 2017-09-26 14:42:02 +0100 | [diff] [blame] | 423 | - New validation and benchmark frameworks (Boost and Google frameworks replaced by homemade framework). |
| 424 | - Most machine learning functions support both fixed point 8 and 16 bit (QS8, QS16) for both NEON and OpenCL. |
| 425 | - New NEON kernels / functions: |
Pablo Tello | eb82fd2 | 2018-02-23 13:43:50 +0000 | [diff] [blame] | 426 | - arm_compute::NEGEMMAssemblyBaseKernel arm_compute::NEGEMMAArch64Kernel |
Anthony Barbier | 3762e74 | 2018-03-02 11:49:33 +0000 | [diff] [blame] | 427 | - @ref NEDequantizationLayerKernel / @ref NEDequantizationLayer |
| 428 | - @ref NEFloorKernel / @ref NEFloor |
| 429 | - @ref NEL2NormalizeLayerKernel / @ref NEL2NormalizeLayer |
| 430 | - @ref NEQuantizationLayerKernel @ref NEMinMaxLayerKernel / @ref NEQuantizationLayer |
| 431 | - @ref NEROIPoolingLayerKernel / @ref NEROIPoolingLayer |
| 432 | - @ref NEReductionOperationKernel / @ref NEReductionOperation |
| 433 | - @ref NEReshapeLayerKernel / @ref NEReshapeLayer |
Anthony Barbier | 6a5627a | 2017-09-26 14:42:02 +0100 | [diff] [blame] | 434 | |
| 435 | - New OpenCL kernels / functions: |
Giorgio Arena | dfca60b | 2018-01-31 10:30:59 +0000 | [diff] [blame] | 436 | - @ref CLDepthwiseConvolutionLayer3x3NCHWKernel @ref CLDepthwiseConvolutionLayer3x3NHWCKernel @ref CLDepthwiseIm2ColKernel @ref CLDepthwiseVectorToTensorKernel @ref CLDepthwiseWeightsReshapeKernel / @ref CLDepthwiseConvolutionLayer3x3 @ref CLDepthwiseConvolutionLayer @ref CLDepthwiseSeparableConvolutionLayer |
Anthony Barbier | 3762e74 | 2018-03-02 11:49:33 +0000 | [diff] [blame] | 437 | - @ref CLDequantizationLayerKernel / @ref CLDequantizationLayer |
| 438 | - @ref CLDirectConvolutionLayerKernel / @ref CLDirectConvolutionLayer |
| 439 | - @ref CLFlattenLayer |
| 440 | - @ref CLFloorKernel / @ref CLFloor |
| 441 | - @ref CLGEMMTranspose1xW |
| 442 | - @ref CLGEMMMatrixVectorMultiplyKernel |
| 443 | - @ref CLL2NormalizeLayerKernel / @ref CLL2NormalizeLayer |
| 444 | - @ref CLQuantizationLayerKernel @ref CLMinMaxLayerKernel / @ref CLQuantizationLayer |
| 445 | - @ref CLROIPoolingLayerKernel / @ref CLROIPoolingLayer |
| 446 | - @ref CLReductionOperationKernel / @ref CLReductionOperation |
| 447 | - @ref CLReshapeLayerKernel / @ref CLReshapeLayer |
Anthony Barbier | 6a5627a | 2017-09-26 14:42:02 +0100 | [diff] [blame] | 448 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 449 | v17.06 Public major release |
| 450 | - Various bug fixes |
| 451 | - Added support for fixed point 8 bit (QS8) to the various NEON machine learning kernels. |
| 452 | - Added unit tests and benchmarks (AlexNet, LeNet) |
| 453 | - Added support for sub tensors. |
| 454 | - Added infrastructure to provide GPU specific optimisation for some OpenCL kernels. |
Anthony Barbier | 3762e74 | 2018-03-02 11:49:33 +0000 | [diff] [blame] | 455 | - Added @ref OMPScheduler (OpenMP) scheduler for NEON |
| 456 | - Added @ref SingleThreadScheduler scheduler for NEON (For bare metal) |
| 457 | - User can specify his own scheduler by implementing the @ref IScheduler interface. |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 458 | - New OpenCL kernels / functions: |
Anthony Barbier | 3762e74 | 2018-03-02 11:49:33 +0000 | [diff] [blame] | 459 | - @ref CLBatchNormalizationLayerKernel / @ref CLBatchNormalizationLayer |
| 460 | - @ref CLDepthConcatenateLayerKernel / @ref CLDepthConcatenateLayer |
| 461 | - @ref CLHOGOrientationBinningKernel @ref CLHOGBlockNormalizationKernel, @ref CLHOGDetectorKernel / @ref CLHOGDescriptor @ref CLHOGDetector @ref CLHOGGradient @ref CLHOGMultiDetection |
| 462 | - @ref CLLocallyConnectedMatrixMultiplyKernel / @ref CLLocallyConnectedLayer |
| 463 | - @ref CLWeightsReshapeKernel / @ref CLConvolutionLayerReshapeWeights |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 464 | - New C++ kernels: |
Anthony Barbier | 3762e74 | 2018-03-02 11:49:33 +0000 | [diff] [blame] | 465 | - @ref CPPDetectionWindowNonMaximaSuppressionKernel |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 466 | - New NEON kernels / functions: |
Anthony Barbier | 3762e74 | 2018-03-02 11:49:33 +0000 | [diff] [blame] | 467 | - @ref NEBatchNormalizationLayerKernel / @ref NEBatchNormalizationLayer |
| 468 | - @ref NEDepthConcatenateLayerKernel / @ref NEDepthConcatenateLayer |
| 469 | - @ref NEDirectConvolutionLayerKernel / @ref NEDirectConvolutionLayer |
| 470 | - @ref NELocallyConnectedMatrixMultiplyKernel / @ref NELocallyConnectedLayer |
| 471 | - @ref NEWeightsReshapeKernel / @ref NEConvolutionLayerReshapeWeights |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 472 | |
| 473 | v17.05 Public bug fixes release |
| 474 | - Various bug fixes |
| 475 | - Remaining of the functions ported to use accurate padding. |
| 476 | - Library does not link against OpenCL anymore (It uses dlopen / dlsym at runtime instead to determine whether or not OpenCL is available). |
| 477 | - Added "free" method to allocator. |
| 478 | - Minimum version of g++ required for armv7 Linux changed from 4.8 to 4.9 |
| 479 | |
| 480 | v17.04 Public bug fixes release |
| 481 | |
| 482 | The following functions have been ported to use the new accurate padding: |
Anthony Barbier | 3762e74 | 2018-03-02 11:49:33 +0000 | [diff] [blame] | 483 | - @ref CLColorConvertKernel |
| 484 | - @ref CLEdgeNonMaxSuppressionKernel |
| 485 | - @ref CLEdgeTraceKernel |
| 486 | - @ref CLGaussianPyramidHorKernel |
| 487 | - @ref CLGaussianPyramidVertKernel |
| 488 | - @ref CLGradientKernel |
| 489 | - @ref NEChannelCombineKernel |
| 490 | - @ref NEFillArrayKernel |
| 491 | - @ref NEGaussianPyramidHorKernel |
| 492 | - @ref NEGaussianPyramidVertKernel |
| 493 | - @ref NEHarrisScoreFP16Kernel |
| 494 | - @ref NEHarrisScoreKernel |
| 495 | - @ref NEHOGDetectorKernel |
| 496 | - @ref NELogits1DMaxKernel |
| 497 | - NELogits1DShiftExpSumKernel |
| 498 | - NELogits1DNormKernel |
| 499 | - @ref NENonMaximaSuppression3x3FP16Kernel |
| 500 | - @ref NENonMaximaSuppression3x3Kernel |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 501 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 502 | v17.03.1 First Major public release of the sources |
| 503 | - Renamed the library to arm_compute |
| 504 | - New CPP target introduced for C++ kernels shared between NEON and CL functions. |
| 505 | - New padding calculation interface introduced and ported most kernels / functions to use it. |
| 506 | - New OpenCL kernels / functions: |
Anthony Barbier | 3762e74 | 2018-03-02 11:49:33 +0000 | [diff] [blame] | 507 | - @ref CLGEMMLowpMatrixMultiplyKernel / CLGEMMLowp |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 508 | - New NEON kernels / functions: |
Anthony Barbier | 3762e74 | 2018-03-02 11:49:33 +0000 | [diff] [blame] | 509 | - @ref NENormalizationLayerKernel / @ref NENormalizationLayer |
| 510 | - @ref NETransposeKernel / @ref NETranspose |
| 511 | - @ref NELogits1DMaxKernel, NELogits1DShiftExpSumKernel, NELogits1DNormKernel / @ref NESoftmaxLayer |
| 512 | - @ref NEIm2ColKernel, @ref NECol2ImKernel, NEConvolutionLayerWeightsReshapeKernel / @ref NEConvolutionLayer |
| 513 | - @ref NEGEMMMatrixAccumulateBiasesKernel / @ref NEFullyConnectedLayer |
| 514 | - @ref NEGEMMLowpMatrixMultiplyKernel / NEGEMMLowp |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 515 | |
| 516 | v17.03 Sources preview |
| 517 | - New OpenCL kernels / functions: |
Anthony Barbier | 3762e74 | 2018-03-02 11:49:33 +0000 | [diff] [blame] | 518 | - @ref CLGradientKernel, @ref CLEdgeNonMaxSuppressionKernel, @ref CLEdgeTraceKernel / @ref CLCannyEdge |
| 519 | - GEMM refactoring + FP16 support: @ref CLGEMMInterleave4x4Kernel, @ref CLGEMMTranspose1xWKernel, @ref CLGEMMMatrixMultiplyKernel, @ref CLGEMMMatrixAdditionKernel / @ref CLGEMM |
| 520 | - @ref CLGEMMMatrixAccumulateBiasesKernel / @ref CLFullyConnectedLayer |
| 521 | - @ref CLTransposeKernel / @ref CLTranspose |
| 522 | - @ref CLLKTrackerInitKernel, @ref CLLKTrackerStage0Kernel, @ref CLLKTrackerStage1Kernel, @ref CLLKTrackerFinalizeKernel / @ref CLOpticalFlow |
| 523 | - @ref CLNormalizationLayerKernel / @ref CLNormalizationLayer |
| 524 | - @ref CLLaplacianPyramid, @ref CLLaplacianReconstruct |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 525 | - New NEON kernels / functions: |
Anthony Barbier | 3762e74 | 2018-03-02 11:49:33 +0000 | [diff] [blame] | 526 | - @ref NEActivationLayerKernel / @ref NEActivationLayer |
| 527 | - GEMM refactoring + FP16 support (Requires armv8.2 CPU): @ref NEGEMMInterleave4x4Kernel, @ref NEGEMMTranspose1xWKernel, @ref NEGEMMMatrixMultiplyKernel, @ref NEGEMMMatrixAdditionKernel / @ref NEGEMM |
| 528 | - @ref NEPoolingLayerKernel / @ref NEPoolingLayer |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 529 | |
| 530 | v17.02.1 Sources preview |
| 531 | - New OpenCL kernels / functions: |
Anthony Barbier | 3762e74 | 2018-03-02 11:49:33 +0000 | [diff] [blame] | 532 | - @ref CLLogits1DMaxKernel, @ref CLLogits1DShiftExpSumKernel, @ref CLLogits1DNormKernel / @ref CLSoftmaxLayer |
| 533 | - @ref CLPoolingLayerKernel / @ref CLPoolingLayer |
| 534 | - @ref CLIm2ColKernel, @ref CLCol2ImKernel, CLConvolutionLayerWeightsReshapeKernel / @ref CLConvolutionLayer |
| 535 | - @ref CLRemapKernel / @ref CLRemap |
| 536 | - @ref CLGaussianPyramidHorKernel, @ref CLGaussianPyramidVertKernel / @ref CLGaussianPyramid, @ref CLGaussianPyramidHalf, @ref CLGaussianPyramidOrb |
| 537 | - @ref CLMinMaxKernel, @ref CLMinMaxLocationKernel / @ref CLMinMaxLocation |
| 538 | - @ref CLNonLinearFilterKernel / @ref CLNonLinearFilter |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 539 | - New NEON FP16 kernels (Requires armv8.2 CPU) |
Anthony Barbier | 3762e74 | 2018-03-02 11:49:33 +0000 | [diff] [blame] | 540 | - @ref NEAccumulateWeightedFP16Kernel |
| 541 | - @ref NEBox3x3FP16Kernel |
| 542 | - @ref NENonMaximaSuppression3x3FP16Kernel |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 543 | |
| 544 | v17.02 Sources preview |
| 545 | - New OpenCL kernels / functions: |
Anthony Barbier | 3762e74 | 2018-03-02 11:49:33 +0000 | [diff] [blame] | 546 | - @ref CLActivationLayerKernel / @ref CLActivationLayer |
| 547 | - @ref CLChannelCombineKernel / @ref CLChannelCombine |
| 548 | - @ref CLDerivativeKernel / @ref CLChannelExtract |
| 549 | - @ref CLFastCornersKernel / @ref CLFastCorners |
| 550 | - @ref CLMeanStdDevKernel / @ref CLMeanStdDev |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 551 | - New NEON kernels / functions: |
Anthony Barbier | 3762e74 | 2018-03-02 11:49:33 +0000 | [diff] [blame] | 552 | - HOG / SVM: @ref NEHOGOrientationBinningKernel, @ref NEHOGBlockNormalizationKernel, @ref NEHOGDetectorKernel, NEHOGNonMaximaSuppressionKernel / @ref NEHOGDescriptor, @ref NEHOGDetector, @ref NEHOGGradient, @ref NEHOGMultiDetection |
| 553 | - @ref NENonLinearFilterKernel / @ref NENonLinearFilter |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 554 | - Introduced a CLScheduler to manage the default context and command queue used by the runtime library and create synchronisation events. |
| 555 | - Switched all the kernels / functions to use tensors instead of images. |
| 556 | - Updated documentation to include instructions to build the library from sources. |
| 557 | |
| 558 | v16.12 Binary preview release |
| 559 | - Original release |
| 560 | |
| 561 | @section S3_how_to_build How to build the library and the examples |
| 562 | |
| 563 | @subsection S3_1_build_options Build options |
| 564 | |
| 565 | scons 2.3 or above is required to build the library. |
| 566 | To see the build options available simply run ```scons -h```: |
| 567 | |
Anthony Barbier | 79c6178 | 2017-06-23 11:48:24 +0100 | [diff] [blame] | 568 | debug: Debug (yes|no) |
| 569 | default: False |
| 570 | actual: False |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 571 | |
Anthony Barbier | 79c6178 | 2017-06-23 11:48:24 +0100 | [diff] [blame] | 572 | asserts: Enable asserts (this flag is forced to 1 for debug=1) (yes|no) |
| 573 | default: False |
| 574 | actual: False |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 575 | |
Anthony Barbier | 79c6178 | 2017-06-23 11:48:24 +0100 | [diff] [blame] | 576 | arch: Target Architecture (armv7a|arm64-v8a|arm64-v8.2-a|x86_32|x86_64) |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 577 | default: armv7a |
| 578 | actual: armv7a |
| 579 | |
Anthony Barbier | 79c6178 | 2017-06-23 11:48:24 +0100 | [diff] [blame] | 580 | os: Target OS (linux|android|bare_metal) |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 581 | default: linux |
| 582 | actual: linux |
| 583 | |
Anthony Barbier | 2d0ce77 | 2018-02-21 15:35:36 +0000 | [diff] [blame] | 584 | build: Build type (native|cross_compile|embed_only) |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 585 | default: cross_compile |
| 586 | actual: cross_compile |
| 587 | |
Anthony Barbier | 79c6178 | 2017-06-23 11:48:24 +0100 | [diff] [blame] | 588 | examples: Build example programs (yes|no) |
| 589 | default: True |
| 590 | actual: True |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 591 | |
Anthony Barbier | 79c6178 | 2017-06-23 11:48:24 +0100 | [diff] [blame] | 592 | Werror: Enable/disable the -Werror compilation flag (yes|no) |
| 593 | default: True |
| 594 | actual: True |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 595 | |
Anthony Barbier | 79c6178 | 2017-06-23 11:48:24 +0100 | [diff] [blame] | 596 | opencl: Enable OpenCL support (yes|no) |
| 597 | default: True |
| 598 | actual: True |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 599 | |
Anthony Barbier | 79c6178 | 2017-06-23 11:48:24 +0100 | [diff] [blame] | 600 | neon: Enable Neon support (yes|no) |
| 601 | default: False |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 602 | actual: False |
| 603 | |
Anthony Barbier | 20dbb82 | 2017-12-13 21:19:39 +0000 | [diff] [blame] | 604 | gles_compute: Enable OpenGL ES Compute Shader support (yes|no) |
| 605 | default: False |
| 606 | actual: False |
| 607 | |
| 608 | embed_kernels: Embed OpenCL kernels and OpenGL ES compute shader in library binary (yes|no) |
Anthony Barbier | cc0a80b | 2017-12-15 11:37:29 +0000 | [diff] [blame] | 609 | default: True |
| 610 | actual: True |
Anthony Barbier | 79c6178 | 2017-06-23 11:48:24 +0100 | [diff] [blame] | 611 | |
| 612 | set_soname: Set the library's soname and shlibversion (requires SCons 2.4 or above) (yes|no) |
| 613 | default: False |
| 614 | actual: False |
| 615 | |
| 616 | openmp: Enable OpenMP backend (yes|no) |
| 617 | default: False |
| 618 | actual: False |
| 619 | |
| 620 | cppthreads: Enable C++11 threads backend (yes|no) |
| 621 | default: True |
| 622 | actual: True |
| 623 | |
| 624 | build_dir: Specify sub-folder for the build ( /path/to/build_dir ) |
| 625 | default: . |
| 626 | actual: . |
| 627 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 628 | extra_cxx_flags: Extra CXX flags to be appended to the build command |
| 629 | default: |
| 630 | actual: |
| 631 | |
Anthony Barbier | 79c6178 | 2017-06-23 11:48:24 +0100 | [diff] [blame] | 632 | pmu: Enable PMU counters (yes|no) |
| 633 | default: False |
| 634 | actual: False |
| 635 | |
Anthony Barbier | 6a5627a | 2017-09-26 14:42:02 +0100 | [diff] [blame] | 636 | mali: Enable Mali hardware counters (yes|no) |
| 637 | default: False |
| 638 | actual: False |
| 639 | |
Anthony Barbier | 79c6178 | 2017-06-23 11:48:24 +0100 | [diff] [blame] | 640 | validation_tests: Build validation test programs (yes|no) |
| 641 | default: False |
| 642 | actual: False |
| 643 | |
| 644 | benchmark_tests: Build benchmark test programs (yes|no) |
| 645 | default: False |
| 646 | actual: False |
| 647 | |
| 648 | @b debug / @b asserts: |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 649 | - With debug=1 asserts are enabled, and the library is built with symbols and no optimisations enabled. |
| 650 | - 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) |
| 651 | - 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). |
| 652 | |
Anthony Barbier | 79c6178 | 2017-06-23 11:48:24 +0100 | [diff] [blame] | 653 | @b arch: The x86_32 and x86_64 targets can only be used with neon=0 and opencl=1. |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 654 | |
Anthony Barbier | 79c6178 | 2017-06-23 11:48:24 +0100 | [diff] [blame] | 655 | @b os: Choose the operating system you are targeting: Linux, Android or bare metal. |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 656 | @note bare metal can only be used for NEON (not OpenCL), only static libraries get built and NEON's multi-threading support is disabled. |
| 657 | |
Anthony Barbier | 79c6178 | 2017-06-23 11:48:24 +0100 | [diff] [blame] | 658 | @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 Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 659 | |
Anthony Barbier | 79c6178 | 2017-06-23 11:48:24 +0100 | [diff] [blame] | 660 | @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 Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 661 | |
Anthony Barbier | 2d0ce77 | 2018-02-21 15:35:36 +0000 | [diff] [blame] | 662 | There 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. |
| 663 | |
Anthony Barbier | 79c6178 | 2017-06-23 11:48:24 +0100 | [diff] [blame] | 664 | @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 Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 665 | |
Anthony Barbier | 20dbb82 | 2017-12-13 21:19:39 +0000 | [diff] [blame] | 666 | @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 Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 667 | |
Anthony Barbier | 20dbb82 | 2017-12-13 21:19:39 +0000 | [diff] [blame] | 668 | @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 Barbier | 79c6178 | 2017-06-23 11:48:24 +0100 | [diff] [blame] | 669 | |
| 670 | @b set_soname: Do you want to build the versioned version of the library ? |
| 671 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 672 | If enabled the library will contain a SONAME and SHLIBVERSION and some symlinks will automatically be created between the objects. |
| 673 | Example: |
| 674 | libarm_compute_core.so -> libarm_compute_core.so.1.0.0 |
| 675 | libarm_compute_core.so.1 -> libarm_compute_core.so.1.0.0 |
| 676 | libarm_compute_core.so.1.0.0 |
| 677 | |
| 678 | @note This options is disabled by default as it requires SCons version 2.4 or above. |
| 679 | |
Anthony Barbier | 79c6178 | 2017-06-23 11:48:24 +0100 | [diff] [blame] | 680 | @b extra_cxx_flags: Custom CXX flags which will be appended to the end of the build command. |
| 681 | |
| 682 | @b build_dir: Build the library in a subfolder of the "build" folder. (Allows to build several configurations in parallel). |
| 683 | |
| 684 | @b examples: Build or not the examples |
| 685 | |
| 686 | @b validation_tests: Enable the build of the validation suite. |
| 687 | |
Anthony Barbier | 79c6178 | 2017-06-23 11:48:24 +0100 | [diff] [blame] | 688 | @b benchmark_tests: Enable the build of the benchmark tests |
| 689 | |
| 690 | @b pmu: Enable the PMU cycle counter to measure execution time in benchmark tests. (Your device needs to support it) |
| 691 | |
Anthony Barbier | 6a5627a | 2017-09-26 14:42:02 +0100 | [diff] [blame] | 692 | @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) |
| 693 | |
Anthony Barbier | 79c6178 | 2017-06-23 11:48:24 +0100 | [diff] [blame] | 694 | @b openmp Build in the OpenMP scheduler for NEON. |
| 695 | |
| 696 | @note Only works when building with g++ not clang++ |
| 697 | |
| 698 | @b cppthreads Build in the C++11 scheduler for NEON. |
| 699 | |
Anthony Barbier | 3762e74 | 2018-03-02 11:49:33 +0000 | [diff] [blame] | 700 | @sa Scheduler::set |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 701 | |
Moritz Pflanzer | 07674de | 2017-07-21 09:39:36 +0100 | [diff] [blame] | 702 | @subsection S3_2_linux Building for Linux |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 703 | |
| 704 | @subsubsection S3_2_1_library How to build the library ? |
| 705 | |
| 706 | For Linux, the library was successfully built and tested using the following Linaro GCC toolchain: |
| 707 | |
| 708 | - gcc-linaro-arm-linux-gnueabihf-4.9-2014.07_linux |
| 709 | - gcc-linaro-4.9-2016.02-x86_64_aarch64-linux-gnu |
| 710 | - gcc-linaro-6.3.1-2017.02-i686_aarch64-linux-gnu |
| 711 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 712 | To cross-compile the library in debug mode, with NEON only support, for Linux 32bit: |
| 713 | |
| 714 | scons Werror=1 -j8 debug=1 neon=1 opencl=0 os=linux arch=armv7a |
| 715 | |
| 716 | To cross-compile the library in asserts mode, with OpenCL only support, for Linux 64bit: |
| 717 | |
| 718 | scons Werror=1 -j8 debug=0 asserts=1 neon=0 opencl=1 embed_kernels=1 os=linux arch=arm64-v8a |
| 719 | |
Anthony Barbier | 20dbb82 | 2017-12-13 21:19:39 +0000 | [diff] [blame] | 720 | To cross-compile the library in asserts mode, with GLES_COMPUTE only support, for Linux 64bit: |
| 721 | |
| 722 | scons Werror=1 -j8 debug=0 asserts=1 neon=0 opencl=0 gles_compute=1 embed_kernels=1 os=linux arch=arm64-v8a |
| 723 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 724 | You can also compile the library natively on an ARM device by using <b>build=native</b>: |
| 725 | |
| 726 | scons Werror=1 -j8 debug=0 neon=1 opencl=0 os=linux arch=arm64-v8a build=native |
| 727 | scons Werror=1 -j8 debug=0 neon=1 opencl=0 os=linux arch=armv7a build=native |
| 728 | |
| 729 | @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. |
| 730 | |
| 731 | For example on a 64bit Debian based system you would have to install <b>g++-arm-linux-gnueabihf</b> |
| 732 | |
| 733 | apt-get install g++-arm-linux-gnueabihf |
| 734 | |
| 735 | Then run |
| 736 | |
| 737 | scons Werror=1 -j8 debug=0 neon=1 opencl=0 os=linux arch=armv7a build=cross_compile |
| 738 | |
| 739 | or simply remove the build parameter as build=cross_compile is the default value: |
| 740 | |
| 741 | scons Werror=1 -j8 debug=0 neon=1 opencl=0 os=linux arch=armv7a |
| 742 | |
| 743 | @attention To cross compile with opencl=1 you need to make sure to have a version of libOpenCL matching your target architecture. |
| 744 | |
| 745 | @subsubsection S3_2_2_examples How to manually build the examples ? |
| 746 | |
| 747 | The 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. |
| 748 | |
Georgios Pinitas | d9eb275 | 2018-04-03 13:44:29 +0100 | [diff] [blame] | 749 | @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 Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 750 | |
| 751 | To cross compile a NEON example for Linux 32bit: |
| 752 | |
Anthony Barbier | b2881fc | 2017-09-29 17:12:12 +0100 | [diff] [blame] | 753 | 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 Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 754 | |
| 755 | To cross compile a NEON example for Linux 64bit: |
| 756 | |
Anthony Barbier | b2881fc | 2017-09-29 17:12:12 +0100 | [diff] [blame] | 757 | 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 Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 758 | |
| 759 | (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) |
| 760 | |
| 761 | To cross compile an OpenCL example for Linux 32bit: |
| 762 | |
Georgios Pinitas | d9eb275 | 2018-04-03 13:44:29 +0100 | [diff] [blame] | 763 | 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 Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 764 | |
| 765 | To cross compile an OpenCL example for Linux 64bit: |
| 766 | |
Georgios Pinitas | d9eb275 | 2018-04-03 13:44:29 +0100 | [diff] [blame] | 767 | 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 Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 768 | |
Anthony Barbier | 14c86a9 | 2017-12-14 16:27:41 +0000 | [diff] [blame] | 769 | To cross compile a GLES example for Linux 32bit: |
| 770 | |
| 771 | 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 |
| 772 | |
| 773 | To cross compile a GLES example for Linux 64bit: |
| 774 | |
| 775 | 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 |
| 776 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 777 | (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) |
| 778 | |
Anthony Barbier | 14c86a9 | 2017-12-14 16:27:41 +0000 | [diff] [blame] | 779 | To 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. |
| 780 | |
| 781 | @note The compute library must currently be built with both neon and opencl enabled - neon=1 and opencl=1 |
Gian Marco Iodice | daec1aa | 2017-09-29 12:03:18 +0100 | [diff] [blame] | 782 | |
| 783 | i.e. to cross compile the "graph_lenet" example for Linux 32bit: |
| 784 | |
Georgios Pinitas | 12be7ab | 2018-07-03 12:06:23 +0100 | [diff] [blame] | 785 | 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 Iodice | daec1aa | 2017-09-29 12:03:18 +0100 | [diff] [blame] | 786 | |
| 787 | i.e. to cross compile the "graph_lenet" example for Linux 64bit: |
| 788 | |
Georgios Pinitas | 12be7ab | 2018-07-03 12:06:23 +0100 | [diff] [blame] | 789 | 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 Iodice | daec1aa | 2017-09-29 12:03:18 +0100 | [diff] [blame] | 790 | |
| 791 | (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) |
| 792 | |
Anthony Barbier | e500747 | 2017-10-27 15:01:44 +0100 | [diff] [blame] | 793 | @note If compiling using static libraries, this order must be followed when linking: arm_compute_graph_static, arm_compute, arm_compute_core |
| 794 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 795 | To compile natively (i.e directly on an ARM device) for NEON for Linux 32bit: |
| 796 | |
Anthony Barbier | b2881fc | 2017-09-29 17:12:12 +0100 | [diff] [blame] | 797 | g++ examples/neon_convolution.cpp utils/Utils.cpp -I. -Iinclude -std=c++11 -mfpu=neon -larm_compute -larm_compute_core -o neon_convolution |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 798 | |
| 799 | To compile natively (i.e directly on an ARM device) for NEON for Linux 64bit: |
| 800 | |
Anthony Barbier | b2881fc | 2017-09-29 17:12:12 +0100 | [diff] [blame] | 801 | g++ examples/neon_convolution.cpp utils/Utils.cpp -I. -Iinclude -std=c++11 -larm_compute -larm_compute_core -o neon_convolution |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 802 | |
| 803 | (notice the only difference with the 32 bit command is that we don't need the -mfpu option) |
| 804 | |
| 805 | To compile natively (i.e directly on an ARM device) for OpenCL for Linux 32bit or Linux 64bit: |
| 806 | |
Georgios Pinitas | d9eb275 | 2018-04-03 13:44:29 +0100 | [diff] [blame] | 807 | 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 Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 808 | |
Anthony Barbier | 14c86a9 | 2017-12-14 16:27:41 +0000 | [diff] [blame] | 809 | To compile natively (i.e directly on an ARM device) for GLES for Linux 32bit or Linux 64bit: |
Gian Marco Iodice | daec1aa | 2017-09-29 12:03:18 +0100 | [diff] [blame] | 810 | |
Anthony Barbier | 14c86a9 | 2017-12-14 16:27:41 +0000 | [diff] [blame] | 811 | 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 |
| 812 | |
| 813 | To 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. |
| 814 | @note The compute library must currently be built with both neon and opencl enabled - neon=1 and opencl=1 |
| 815 | |
| 816 | i.e. to natively compile the "graph_lenet" example for Linux 32bit: |
Gian Marco Iodice | daec1aa | 2017-09-29 12:03:18 +0100 | [diff] [blame] | 817 | |
Georgios Pinitas | 12be7ab | 2018-07-03 12:06:23 +0100 | [diff] [blame] | 818 | 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 Iodice | daec1aa | 2017-09-29 12:03:18 +0100 | [diff] [blame] | 819 | |
Anthony Barbier | 14c86a9 | 2017-12-14 16:27:41 +0000 | [diff] [blame] | 820 | i.e. to natively compile the "graph_lenet" example for Linux 64bit: |
Gian Marco Iodice | daec1aa | 2017-09-29 12:03:18 +0100 | [diff] [blame] | 821 | |
Georgios Pinitas | 12be7ab | 2018-07-03 12:06:23 +0100 | [diff] [blame] | 822 | 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 Iodice | daec1aa | 2017-09-29 12:03:18 +0100 | [diff] [blame] | 823 | |
| 824 | (notice the only difference with the 32 bit command is that we don't need the -mfpu option) |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 825 | |
Anthony Barbier | e500747 | 2017-10-27 15:01:44 +0100 | [diff] [blame] | 826 | @note If compiling using static libraries, this order must be followed when linking: arm_compute_graph_static, arm_compute, arm_compute_core |
| 827 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 828 | @note These two commands assume libarm_compute.so is available in your library path, if not add the path to it using -L |
| 829 | |
| 830 | To run the built executable simply run: |
| 831 | |
| 832 | LD_LIBRARY_PATH=build ./neon_convolution |
| 833 | |
| 834 | or |
| 835 | |
| 836 | LD_LIBRARY_PATH=build ./cl_convolution |
| 837 | |
Georgios Pinitas | 9f28b39 | 2018-07-18 20:01:53 +0100 | [diff] [blame] | 838 | @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 Barbier | 3762e74 | 2018-03-02 11:49:33 +0000 | [diff] [blame] | 839 | |
| 840 | For example: |
Anthony Barbier | 38e7f1f | 2018-05-21 13:37:47 +0100 | [diff] [blame] | 841 | |
Georgios Pinitas | 9f28b39 | 2018-07-18 20:01:53 +0100 | [diff] [blame] | 842 | LD_LIBRARY_PATH=. ./graph_lenet --help |
Anthony Barbier | 3762e74 | 2018-03-02 11:49:33 +0000 | [diff] [blame] | 843 | |
Georgios Pinitas | 9f28b39 | 2018-07-18 20:01:53 +0100 | [diff] [blame] | 844 | Below is a list of the common parameters among the graph examples : |
| 845 | @snippet utils/CommonGraphOptions.h Common graph examples parameters |
Anthony Barbier | 3762e74 | 2018-03-02 11:49:33 +0000 | [diff] [blame] | 846 | |
Moritz Pflanzer | 07674de | 2017-07-21 09:39:36 +0100 | [diff] [blame] | 847 | @subsection S3_3_android Building for Android |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 848 | |
| 849 | For Android, the library was successfully built and tested using Google's standalone toolchains: |
Anthony Barbier | d51ea0a | 2018-08-07 17:48:03 +0100 | [diff] [blame] | 850 | - clang++ from NDK r17b for armv7a |
| 851 | - clang++ from NDK r17b for arm64-v8a |
Anthony Barbier | 3a6163e | 2018-08-10 17:36:36 +0100 | [diff] [blame] | 852 | - clang++ from NDK r18-beta1 for arm64-v8.2-a with FP16 support |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 853 | |
| 854 | Here is a guide to <a href="https://developer.android.com/ndk/guides/standalone_toolchain.html">create your Android standalone toolchains from the NDK</a> |
| 855 | |
Anthony Barbier | d51ea0a | 2018-08-07 17:48:03 +0100 | [diff] [blame] | 856 | - Download the NDK r17b from here: https://developer.android.com/ndk/downloads/index.html |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 857 | - Make sure you have Python 2 installed on your machine. |
| 858 | - Generate the 32 and/or 64 toolchains by running the following commands: |
Anthony Barbier | 38e7f1f | 2018-05-21 13:37:47 +0100 | [diff] [blame] | 859 | <!-- Leave 2 blank lines here or the formatting of the commands below gets messed up --!> |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 860 | |
Anthony Barbier | 38e7f1f | 2018-05-21 13:37:47 +0100 | [diff] [blame] | 861 | |
| 862 | <!-- End of the 2 blank lines --!> |
Anthony Barbier | d51ea0a | 2018-08-07 17:48:03 +0100 | [diff] [blame] | 863 | $NDK/build/tools/make_standalone_toolchain.py --arch arm64 --install-dir $MY_TOOLCHAINS/aarch64-linux-android-ndk-r17b --stl libc++ --api 21 |
| 864 | $NDK/build/tools/make_standalone_toolchain.py --arch arm --install-dir $MY_TOOLCHAINS/arm-linux-android-ndk-r17b --stl libc++ --api 21 |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 865 | |
Anthony Barbier | d51ea0a | 2018-08-07 17:48:03 +0100 | [diff] [blame] | 866 | @attention We used to use gnustl but as of NDK r17 it is deprecated so we switched to libc++ |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 867 | |
Anthony Barbier | 38e7f1f | 2018-05-21 13:37:47 +0100 | [diff] [blame] | 868 | @note Make sure to add the toolchains to your PATH: |
| 869 | |
Anthony Barbier | d51ea0a | 2018-08-07 17:48:03 +0100 | [diff] [blame] | 870 | export PATH=$PATH:$MY_TOOLCHAINS/aarch64-linux-android-ndk-r17b/bin:$MY_TOOLCHAINS/arm-linux-android-ndk-r17b/bin |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 871 | |
| 872 | @subsubsection S3_3_1_library How to build the library ? |
| 873 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 874 | To cross-compile the library in debug mode, with NEON only support, for Android 32bit: |
| 875 | |
| 876 | CXX=clang++ CC=clang scons Werror=1 -j8 debug=1 neon=1 opencl=0 os=android arch=armv7a |
| 877 | |
| 878 | To cross-compile the library in asserts mode, with OpenCL only support, for Android 64bit: |
| 879 | |
Anthony Barbier | 14c86a9 | 2017-12-14 16:27:41 +0000 | [diff] [blame] | 880 | 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 Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 881 | |
Anthony Barbier | 20dbb82 | 2017-12-13 21:19:39 +0000 | [diff] [blame] | 882 | To cross-compile the library in asserts mode, with GLES_COMPUTE only support, for Android 64bit: |
| 883 | |
Anthony Barbier | 14c86a9 | 2017-12-14 16:27:41 +0000 | [diff] [blame] | 884 | 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 Barbier | 20dbb82 | 2017-12-13 21:19:39 +0000 | [diff] [blame] | 885 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 886 | @subsubsection S3_3_2_examples How to manually build the examples ? |
| 887 | |
| 888 | The 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. |
| 889 | |
Georgios Pinitas | d9eb275 | 2018-04-03 13:44:29 +0100 | [diff] [blame] | 890 | @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 Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 891 | |
| 892 | Once you've got your Android standalone toolchain built and added to your path you can do the following: |
| 893 | |
| 894 | To cross compile a NEON example: |
| 895 | |
| 896 | #32 bit: |
Georgios Pinitas | 9873ea3 | 2017-12-05 15:28:55 +0000 | [diff] [blame] | 897 | 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 Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 898 | #64 bit: |
Anthony Barbier | 14c86a9 | 2017-12-14 16:27:41 +0000 | [diff] [blame] | 899 | 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 Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 900 | |
| 901 | To cross compile an OpenCL example: |
| 902 | |
| 903 | #32 bit: |
Georgios Pinitas | d9eb275 | 2018-04-03 13:44:29 +0100 | [diff] [blame] | 904 | 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 Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 905 | #64 bit: |
Georgios Pinitas | d9eb275 | 2018-04-03 13:44:29 +0100 | [diff] [blame] | 906 | 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 Barbier | 14c86a9 | 2017-12-14 16:27:41 +0000 | [diff] [blame] | 907 | |
| 908 | To cross compile a GLES example: |
Anthony Barbier | cc0a80b | 2017-12-15 11:37:29 +0000 | [diff] [blame] | 909 | |
Anthony Barbier | 14c86a9 | 2017-12-14 16:27:41 +0000 | [diff] [blame] | 910 | #32 bit: |
| 911 | 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 |
| 912 | #64 bit: |
| 913 | 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 Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 914 | |
Gian Marco Iodice | daec1aa | 2017-09-29 12:03:18 +0100 | [diff] [blame] | 915 | To cross compile the examples with the Graph API, such as graph_lenet.cpp, you need to link the library arm_compute_graph also. |
| 916 | (notice the compute library has to be built with both neon and opencl enabled - neon=1 and opencl=1) |
| 917 | |
| 918 | #32 bit: |
Georgios Pinitas | 12be7ab | 2018-07-03 12:06:23 +0100 | [diff] [blame] | 919 | 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 Iodice | daec1aa | 2017-09-29 12:03:18 +0100 | [diff] [blame] | 920 | #64 bit: |
Georgios Pinitas | 12be7ab | 2018-07-03 12:06:23 +0100 | [diff] [blame] | 921 | 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 Iodice | daec1aa | 2017-09-29 12:03:18 +0100 | [diff] [blame] | 922 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 923 | @note Due to some issues in older versions of the Mali OpenCL DDK (<= r13p0), we recommend to link arm_compute statically on Android. |
Anthony Barbier | 20dbb82 | 2017-12-13 21:19:39 +0000 | [diff] [blame] | 924 | @note When linked statically the arm_compute_graph library currently needs the --whole-archive linker flag in order to work properly |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 925 | |
| 926 | Then you need to do is upload the executable and the shared library to the device using ADB: |
| 927 | |
| 928 | adb push neon_convolution_arm /data/local/tmp/ |
| 929 | adb push cl_convolution_arm /data/local/tmp/ |
Anthony Barbier | 14c86a9 | 2017-12-14 16:27:41 +0000 | [diff] [blame] | 930 | adb push gc_absdiff_arm /data/local/tmp/ |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 931 | adb shell chmod 777 -R /data/local/tmp/ |
| 932 | |
| 933 | And finally to run the example: |
| 934 | |
| 935 | adb shell /data/local/tmp/neon_convolution_arm |
| 936 | adb shell /data/local/tmp/cl_convolution_arm |
Anthony Barbier | 14c86a9 | 2017-12-14 16:27:41 +0000 | [diff] [blame] | 937 | adb shell /data/local/tmp/gc_absdiff_arm |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 938 | |
| 939 | For 64bit: |
| 940 | |
| 941 | adb push neon_convolution_aarch64 /data/local/tmp/ |
| 942 | adb push cl_convolution_aarch64 /data/local/tmp/ |
Anthony Barbier | 14c86a9 | 2017-12-14 16:27:41 +0000 | [diff] [blame] | 943 | adb push gc_absdiff_aarch64 /data/local/tmp/ |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 944 | adb shell chmod 777 -R /data/local/tmp/ |
| 945 | |
| 946 | And finally to run the example: |
| 947 | |
| 948 | adb shell /data/local/tmp/neon_convolution_aarch64 |
| 949 | adb shell /data/local/tmp/cl_convolution_aarch64 |
Anthony Barbier | 14c86a9 | 2017-12-14 16:27:41 +0000 | [diff] [blame] | 950 | adb shell /data/local/tmp/gc_absdiff_aarch64 |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 951 | |
Georgios Pinitas | 9f28b39 | 2018-07-18 20:01:53 +0100 | [diff] [blame] | 952 | @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 Barbier | 3762e74 | 2018-03-02 11:49:33 +0000 | [diff] [blame] | 953 | |
| 954 | For example: |
Georgios Pinitas | 9f28b39 | 2018-07-18 20:01:53 +0100 | [diff] [blame] | 955 | adb shell /data/local/tmp/graph_lenet --help |
Anthony Barbier | 3762e74 | 2018-03-02 11:49:33 +0000 | [diff] [blame] | 956 | |
| 957 | In 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. |
| 958 | |
Michalis Spyrou | 6e52ba3 | 2017-10-04 15:40:38 +0100 | [diff] [blame] | 959 | @subsection S3_4_bare_metal Building for bare metal |
| 960 | |
| 961 | For bare metal, the library was successfully built using linaros's latest (gcc-linaro-6.3.1-2017.05) bare metal toolchains: |
| 962 | - arm-eabi for armv7a |
| 963 | - aarch64-elf for arm64-v8a |
| 964 | |
| 965 | Download 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>. |
| 966 | |
| 967 | @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 |
| 968 | |
| 969 | @subsubsection S3_4_1_library How to build the library ? |
| 970 | |
| 971 | To cross-compile the library with NEON support for baremetal arm64-v8a: |
| 972 | |
| 973 | 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 |
| 974 | |
| 975 | @subsubsection S3_4_2_examples How to manually build the examples ? |
| 976 | |
| 977 | Examples 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>. |
| 978 | |
| 979 | @subsection S3_5_windows_host Building on a Windows host system |
Moritz Pflanzer | 07674de | 2017-07-21 09:39:36 +0100 | [diff] [blame] | 980 | |
| 981 | Using `scons` directly from the Windows command line is known to cause |
| 982 | problems. The reason seems to be that if `scons` is setup for cross-compilation |
| 983 | it gets confused about Windows style paths (using backslashes). Thus it is |
| 984 | recommended to follow one of the options outlined below. |
| 985 | |
Michalis Spyrou | 6e52ba3 | 2017-10-04 15:40:38 +0100 | [diff] [blame] | 986 | @subsubsection S3_5_1_ubuntu_on_windows Bash on Ubuntu on Windows |
Moritz Pflanzer | 07674de | 2017-07-21 09:39:36 +0100 | [diff] [blame] | 987 | |
| 988 | The best and easiest option is to use |
| 989 | <a href="https://msdn.microsoft.com/en-gb/commandline/wsl/about">Ubuntu on Windows</a>. |
| 990 | This feature is still marked as *beta* and thus might not be available. |
| 991 | However, if it is building the library is as simple as opening a *Bash on |
| 992 | Ubuntu on Windows* shell and following the general guidelines given above. |
| 993 | |
Michalis Spyrou | 6e52ba3 | 2017-10-04 15:40:38 +0100 | [diff] [blame] | 994 | @subsubsection S3_5_2_cygwin Cygwin |
Moritz Pflanzer | 07674de | 2017-07-21 09:39:36 +0100 | [diff] [blame] | 995 | |
| 996 | If the Windows subsystem for Linux is not available <a href="https://www.cygwin.com/">Cygwin</a> |
| 997 | can be used to install and run `scons`. In addition to the default packages |
| 998 | installed by Cygwin `scons` has to be selected in the installer. (`git` might |
| 999 | also be useful but is not strictly required if you already have got the source |
| 1000 | code of the library.) Linaro provides pre-built versions of |
| 1001 | <a href="http://releases.linaro.org/components/toolchain/binaries/">GCC cross-compilers</a> |
| 1002 | that can be used from the Cygwin terminal. When building for Android the |
| 1003 | compiler is included in the Android standalone toolchain. After everything has |
| 1004 | been set up in the Cygwin terminal the general guide on building the library |
| 1005 | can be followed. |
| 1006 | |
Michalis Spyrou | 6e52ba3 | 2017-10-04 15:40:38 +0100 | [diff] [blame] | 1007 | @subsection S3_6_cl_stub_library The OpenCL stub library |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1008 | |
| 1009 | In 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. |
| 1010 | |
| 1011 | If 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. |
| 1012 | |
| 1013 | @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. |
| 1014 | |
| 1015 | To cross-compile the stub OpenCL library simply run: |
| 1016 | |
| 1017 | <target-prefix>-gcc -o libOpenCL.so -Iinclude opencl-1.2-stubs/opencl_stubs.c -fPIC -shared |
| 1018 | |
| 1019 | For example: |
| 1020 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1021 | #Linux 32bit |
| 1022 | arm-linux-gnueabihf-gcc -o libOpenCL.so -Iinclude opencl-1.2-stubs/opencl_stubs.c -fPIC -shared |
| 1023 | #Linux 64bit |
| 1024 | aarch64-linux-gnu-gcc -o libOpenCL.so -Iinclude -shared opencl-1.2-stubs/opencl_stubs.c -fPIC |
| 1025 | #Android 32bit |
| 1026 | arm-linux-androideabi-clang -o libOpenCL.so -Iinclude -shared opencl-1.2-stubs/opencl_stubs.c -fPIC -shared |
| 1027 | #Android 64bit |
Anthony Barbier | 14c86a9 | 2017-12-14 16:27:41 +0000 | [diff] [blame] | 1028 | aarch64-linux-android-clang -o libOpenCL.so -Iinclude -shared opencl-1.2-stubs/opencl_stubs.c -fPIC -shared |
| 1029 | |
| 1030 | @subsection S3_7_gles_stub_library The Linux OpenGLES and EGL stub libraries |
| 1031 | |
| 1032 | In 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. |
| 1033 | |
| 1034 | @note The stub libraries are only needed on Linux. For Android, the NDK toolchains already provide the meta-EGL and meta-GLES libraries. |
| 1035 | |
| 1036 | To cross-compile the stub OpenGLES and EGL libraries simply run: |
| 1037 | |
| 1038 | <target-prefix>-gcc -o libEGL.so -Iinclude/linux opengles-3.1-stubs/EGL.c -fPIC -shared |
| 1039 | <target-prefix>-gcc -o libGLESv2.so -Iinclude/linux opengles-3.1-stubs/GLESv2.c -fPIC -shared |
| 1040 | |
| 1041 | #Linux 32bit |
| 1042 | arm-linux-gnueabihf-gcc -o libEGL.so -Iinclude/linux opengles-3.1-stubs/EGL.c -fPIC -shared |
| 1043 | arm-linux-gnueabihf-gcc -o libGLESv2.so -Iinclude/linux opengles-3.1-stubs/GLESv2.c -fPIC -shared |
| 1044 | |
| 1045 | #Linux 64bit |
| 1046 | aarch64-linux-gnu-gcc -o libEGL.so -Iinclude/linux opengles-3.1-stubs/EGL.c -fPIC -shared |
| 1047 | aarch64-linux-gnu-gcc -o libGLESv2.so -Iinclude/linux opengles-3.1-stubs/GLESv2.c -fPIC -shared |
Georgios Pinitas | d9cb057 | 2018-07-16 12:23:09 +0100 | [diff] [blame] | 1048 | |
| 1049 | @subsection S3_8_cl_requirements OpenCL DDK Requirements |
| 1050 | |
| 1051 | @subsubsection S3_8_1_cl_hard_requirements Hard Requirements |
| 1052 | |
| 1053 | Compute 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). |
| 1054 | |
| 1055 | Enabling 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. |
| 1056 | |
| 1057 | Use of @ref CLMeanStdDev function requires 64-bit atomics support, thus \a cl_khr_int64_base_atomics should be supported in order to use. |
| 1058 | |
| 1059 | @subsubsection S3_8_2_cl_performance_requirements Performance improvements |
| 1060 | |
| 1061 | Integer 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. |
| 1062 | |
| 1063 | OpenCL kernel level debugging can be simplified with the use of printf, this requires the \a cl_arm_printf extension to be supported. |
| 1064 | |
| 1065 | SVM allocations are supported for all the underlying allocations in Compute Library. To enable this OpenCL 2.0 and above is a requirement. |
Gian Marco Iodice | 201cea1 | 2018-07-30 17:21:41 +0100 | [diff] [blame] | 1066 | |
| 1067 | @subsection S3_9_cl_tuner OpenCL Tuner |
| 1068 | |
| 1069 | The 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). |
| 1070 | The 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. |
| 1071 | The 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. |
| 1072 | In 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. |
| 1073 | |
| 1074 | If 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: |
| 1075 | |
| 1076 | https://www.embedded-vision.com/platinum-members/arm/embedded-vision-training/videos/pages/may-2018-embedded-vision-summit-iodice |
| 1077 | |
| 1078 | Tuning 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. |
| 1079 | |
| 1080 | CLTuner 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. |
| 1081 | |
| 1082 | #Example: 2 unique Matrix Multiply configurations |
| 1083 | @code{.cpp} |
| 1084 | TensorShape a0 = TensorShape(32,32); |
| 1085 | TensorShape b0 = TensorShape(32,32); |
| 1086 | TensorShape c0 = TensorShape(32,32); |
| 1087 | TensorShape a1 = TensorShape(64,64); |
| 1088 | TensorShape b1 = TensorShape(64,64); |
| 1089 | TensorShape c1 = TensorShape(64,64); |
| 1090 | |
| 1091 | Tensor a0_tensor; |
| 1092 | Tensor b0_tensor; |
| 1093 | Tensor c0_tensor; |
| 1094 | Tensor a1_tensor; |
| 1095 | Tensor b1_tensor; |
| 1096 | Tensor c1_tensor; |
| 1097 | |
| 1098 | a0_tensor.allocator()->init(TensorInfo(a0, 1, DataType::F32)); |
| 1099 | b0_tensor.allocator()->init(TensorInfo(b0, 1, DataType::F32)); |
| 1100 | c0_tensor.allocator()->init(TensorInfo(c0, 1, DataType::F32)); |
| 1101 | a1_tensor.allocator()->init(TensorInfo(a1, 1, DataType::F32)); |
| 1102 | b1_tensor.allocator()->init(TensorInfo(b1, 1, DataType::F32)); |
| 1103 | c1_tensor.allocator()->init(TensorInfo(c1 1, DataType::F32)); |
| 1104 | |
| 1105 | CLGEMM gemm0; |
| 1106 | CLGEMM gemm1; |
| 1107 | |
| 1108 | // Configuration 0 |
| 1109 | gemm0.configure(&a0, &b0, nullptr, &c0, 1.0f, 0.0f); |
| 1110 | |
| 1111 | // Configuration 1 |
| 1112 | gemm1.configure(&a1, &b1, nullptr, &c1, 1.0f, 0.0f); |
| 1113 | @endcode |
| 1114 | |
| 1115 | @subsubsection S3_9_1_cl_tuner_how_to How to use it |
| 1116 | |
| 1117 | All 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 |
| 1118 | |
| 1119 | #Enable CL tuner |
| 1120 | ./graph_mobilenet --enable-tuner –-target=CL |
| 1121 | ./arm_compute_benchmark --enable-tuner |
| 1122 | |
| 1123 | #Export/Import to/from a file |
| 1124 | ./graph_mobilenet --enable-tuner --target=CL --tuner-file=acl_tuner.csv |
| 1125 | ./arm_compute_benchmark --enable-tuner --tuner-file=acl_tuner.csv |
| 1126 | |
| 1127 | If you are importing the CLTuner'results from a file, the new tuned LWS values will be appended to it. |
| 1128 | |
| 1129 | Either you are benchmarking the graph examples or the test cases in the arm_compute_benchmark remember to: |
| 1130 | |
| 1131 | -# Disable the power management |
| 1132 | -# Keep the GPU frequency constant |
| 1133 | -# Run multiple times the network (i.e. 10). |
| 1134 | |
| 1135 | If 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. |
| 1136 | |
| 1137 | @code{.cpp} |
| 1138 | CLTuner tuner; |
| 1139 | |
| 1140 | // Setup Scheduler |
| 1141 | CLScheduler::get().default_init(&tuner); |
| 1142 | @endcode |
| 1143 | |
| 1144 | After the first run, the CLTuner's results can be exported to a file using the method "save_to_file()". |
| 1145 | - tuner.save_to_file("results.csv"); |
| 1146 | |
| 1147 | This file can be also imported using the method "load_from_file("results.csv")". |
| 1148 | - tuner.load_from_file("results.csv"); |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1149 | */ |
Anthony Barbier | d51ea0a | 2018-08-07 17:48:03 +0100 | [diff] [blame] | 1150 | } // namespace arm_compute |