blob: d257ce2137e1c262ea5b4ab402246729000d6b38 [file] [log] [blame]
Anthony Barbier871448e2017-03-24 14:54:29 +00001<!-- HTML header for doxygen 1.8.9.1-->
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml">
4<head>
5<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
6<meta http-equiv="X-UA-Compatible" content="IE=9"/>
Kaizen8938bd32017-09-28 14:38:23 +01007<meta name="generator" content="Doxygen 1.8.6"/>
Anthony Barbier871448e2017-03-24 14:54:29 +00008<meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines -->
Anthony Barbierdbdab852017-06-23 15:42:00 +01009<title>Compute Library: Introduction</title>
Anthony Barbier871448e2017-03-24 14:54:29 +000010<link href="tabs.css" rel="stylesheet" type="text/css"/>
11<script type="text/javascript" src="jquery.js"></script>
12<script type="text/javascript" src="dynsections.js"></script>
13<link href="navtree.css" rel="stylesheet" type="text/css"/>
14<script type="text/javascript" src="resize.js"></script>
Anthony Barbier871448e2017-03-24 14:54:29 +000015<script type="text/javascript" src="navtree.js"></script>
16<script type="text/javascript">
17 $(document).ready(initResizable);
18 $(window).load(resizeHeight);
19</script>
20<link href="search/search.css" rel="stylesheet" type="text/css"/>
Anthony Barbier871448e2017-03-24 14:54:29 +000021<script type="text/javascript" src="search/search.js"></script>
22<script type="text/javascript">
Kaizen8938bd32017-09-28 14:38:23 +010023 $(document).ready(function() { searchBox.OnSelectItem(0); });
Anthony Barbier871448e2017-03-24 14:54:29 +000024</script>
25<script type="text/x-mathjax-config">
26 MathJax.Hub.Config({
27 extensions: ["tex2jax.js"],
28 jax: ["input/TeX","output/HTML-CSS"],
29});
Kaizen8938bd32017-09-28 14:38:23 +010030</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
Anthony Barbier871448e2017-03-24 14:54:29 +000031<link href="doxygen.css" rel="stylesheet" type="text/css" />
32</head>
33<body>
34<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
35<div id="titlearea">
36<table cellspacing="0" cellpadding="0">
37 <tbody>
38 <tr style="height: 56px;">
39 <td style="padding-left: 0.5em;">
Anthony Barbierdbdab852017-06-23 15:42:00 +010040 <div id="projectname">Compute Library
Kaizen8938bd32017-09-28 14:38:23 +010041 &#160;<span id="projectnumber">17.09</span>
Anthony Barbier871448e2017-03-24 14:54:29 +000042 </div>
43 </td>
44 </tr>
45 </tbody>
46</table>
47</div>
48<!-- end header part -->
Kaizen8938bd32017-09-28 14:38:23 +010049<!-- Generated by Doxygen 1.8.6 -->
Anthony Barbier871448e2017-03-24 14:54:29 +000050<script type="text/javascript">
51var searchBox = new SearchBox("searchBox", "search",false,'Search');
52</script>
53 <div id="navrow1" class="tabs">
54 <ul class="tablist">
55 <li class="current"><a href="index.xhtml"><span>Main&#160;Page</span></a></li>
Anthony Barbierdbdab852017-06-23 15:42:00 +010056 <li><a href="pages.xhtml"><span>Related&#160;Pages</span></a></li>
Anthony Barbier871448e2017-03-24 14:54:29 +000057 <li><a href="namespaces.xhtml"><span>Namespaces</span></a></li>
58 <li><a href="annotated.xhtml"><span>Data&#160;Structures</span></a></li>
59 <li><a href="files.xhtml"><span>Files</span></a></li>
60 <li>
61 <div id="MSearchBox" class="MSearchBoxInactive">
62 <span class="left">
63 <img id="MSearchSelect" src="search/mag_sel.png"
64 onmouseover="return searchBox.OnSearchSelectShow()"
65 onmouseout="return searchBox.OnSearchSelectHide()"
66 alt=""/>
67 <input type="text" id="MSearchField" value="Search" accesskey="S"
68 onfocus="searchBox.OnSearchFieldFocus(true)"
69 onblur="searchBox.OnSearchFieldFocus(false)"
70 onkeyup="searchBox.OnSearchFieldChange(event)"/>
71 </span><span class="right">
72 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
73 </span>
74 </div>
75 </li>
76 </ul>
77 </div>
78</div><!-- top -->
79<div id="side-nav" class="ui-resizable side-nav-resizable">
80 <div id="nav-tree">
81 <div id="nav-tree-contents">
82 <div id="nav-sync" class="sync"></div>
83 </div>
84 </div>
85 <div id="splitbar" style="-moz-user-select:none;"
86 class="ui-resizable-handle">
87 </div>
88</div>
89<script type="text/javascript">
90$(document).ready(function(){initNavTree('index.xhtml','');});
91</script>
92<div id="doc-content">
93<!-- window showing the filter options -->
94<div id="MSearchSelectWindow"
95 onmouseover="return searchBox.OnSearchSelectShow()"
96 onmouseout="return searchBox.OnSearchSelectHide()"
97 onkeydown="return searchBox.OnSearchSelectKey(event)">
Kaizen8938bd32017-09-28 14:38:23 +010098<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(11)"><span class="SelectionMark">&#160;</span>Pages</a></div>
Anthony Barbier871448e2017-03-24 14:54:29 +000099
100<!-- iframe showing the search results (closed by default) -->
101<div id="MSearchResultsWindow">
102<iframe src="javascript:void(0)" frameborder="0"
103 name="MSearchResults" id="MSearchResults">
104</iframe>
105</div>
106
107<div class="header">
108 <div class="headertitle">
Anthony Barbierdbdab852017-06-23 15:42:00 +0100109<div class="title">Introduction </div> </div>
Anthony Barbier871448e2017-03-24 14:54:29 +0000110</div><!--header-->
111<div class="contents">
112<div class="toc"><h3>Table of Contents</h3>
Anthony Barbierdbdab852017-06-23 15:42:00 +0100113<ul><li class="level1"><a href="#S0_1_contact">Contact / Support</a></li>
Anthony Barbier871448e2017-03-24 14:54:29 +0000114<li class="level1"><a href="#S1_file_organisation">File organisation</a></li>
Anthony Barbiera4376382017-04-12 15:12:46 +0100115<li class="level1"><a href="#S2_versions_changelog">Release versions and changelog</a><ul><li class="level2"><a href="#S2_1_versions">Release versions</a></li>
116<li class="level2"><a href="#S2_2_changelog">Changelog</a></li>
117</ul>
118</li>
Anthony Barbier871448e2017-03-24 14:54:29 +0000119<li class="level1"><a href="#S3_how_to_build">How to build the library and the examples</a><ul><li class="level2"><a href="#S3_1_build_options">Build options</a></li>
Kaizen8938bd32017-09-28 14:38:23 +0100120<li class="level2"><a href="#S3_2_linux">Building for Linux</a><ul><li class="level3"><a href="#S3_2_1_library">How to build the library ?</a></li>
Anthony Barbier871448e2017-03-24 14:54:29 +0000121<li class="level3"><a href="#S3_2_2_examples">How to manually build the examples ?</a></li>
122</ul>
123</li>
Kaizen8938bd32017-09-28 14:38:23 +0100124<li class="level2"><a href="#S3_3_android">Building for Android</a><ul><li class="level3"><a href="#S3_3_1_library">How to build the library ?</a></li>
Anthony Barbier871448e2017-03-24 14:54:29 +0000125<li class="level3"><a href="#S3_3_2_examples">How to manually build the examples ?</a></li>
126</ul>
127</li>
Kaizen8938bd32017-09-28 14:38:23 +0100128<li class="level2"><a href="#S3_4_windows_host">Building on a Windows host system</a><ul><li class="level3"><a href="#S3_4_1_ubuntu_on_windows">Bash on Ubuntu on Windows</a></li>
129<li class="level3"><a href="#S3_4_2_cygwin">Cygwin</a></li>
130</ul>
131</li>
132<li class="level2"><a href="#S3_5_cl_stub_library">The OpenCL stub library</a></li>
Anthony Barbier871448e2017-03-24 14:54:29 +0000133</ul>
134</li>
Anthony Barbier871448e2017-03-24 14:54:29 +0000135</ul>
136</div>
Kaizen8938bd32017-09-28 14:38:23 +0100137<div class="textblock"><p>The Computer Vision and Machine Learning library is a set of functions optimised for both ARM CPUs and GPUs using SIMD technologies.Several builds of the library are available using various configurations:</p>
138<ul>
Anthony Barbier871448e2017-03-24 14:54:29 +0000139<li>OS: Linux, Android or bare metal.</li>
140<li>Architecture: armv7a (32bit) or arm64-v8a (64bit)</li>
141<li>Technology: NEON / OpenCL / NEON and OpenCL</li>
142<li>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.</li>
143</ul>
Anthony Barbierdbdab852017-06-23 15:42:00 +0100144<h1><a class="anchor" id="S0_1_contact"></a>
145Contact / Support</h1>
Anthony Barbier871448e2017-03-24 14:54:29 +0000146<p>Please email <a href="#" onclick="location.href='mai'+'lto:'+'dev'+'el'+'ope'+'r@'+'arm'+'.c'+'om'; return false;">devel<span style="display: none;">.nosp@m.</span>oper<span style="display: none;">.nosp@m.</span>@arm.<span style="display: none;">.nosp@m.</span>com</a></p>
Kaizen8938bd32017-09-28 14:38:23 +0100147<p>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: </p>
148<pre class="fragment">$ strings android-armv7a-cl-asserts/libarm_compute.so | grep arm_compute_version
Anthony Barbier871448e2017-03-24 14:54:29 +0000149arm_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
150</pre><h1><a class="anchor" id="S1_file_organisation"></a>
151File organisation</h1>
Kaizen8938bd32017-09-28 14:38:23 +0100152<p>This archive contains:</p>
153<ul>
Anthony Barbier871448e2017-03-24 14:54:29 +0000154<li>The <a class="el" href="namespacearm__compute.xhtml">arm_compute</a> header and source files</li>
155<li>The latest Khronos OpenCL 1.2 C headers from the <a href="https://www.khronos.org/registry/cl/">Khronos OpenCL registry</a></li>
156<li>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)</li>
157<li>The sources for a stub version of libOpenCL.so to help you build your application.</li>
158<li>An examples folder containing a few examples to compile and link against the library.</li>
Kaizen8938bd32017-09-28 14:38:23 +0100159<li>A <a class="el" href="dir_29327135a2a2ef098aeaaf2df19d2f1d.xhtml">utils</a> folder containing headers with some boiler plate code used by the examples.</li>
Anthony Barbier871448e2017-03-24 14:54:29 +0000160<li>This documentation.</li>
161</ul>
Kaizen8938bd32017-09-28 14:38:23 +0100162<p>You should have the following file organisation: </p>
163<pre class="fragment">.
Anthony Barbier871448e2017-03-24 14:54:29 +0000164├── arm_compute --&gt; All the arm_compute headers
165│   ├── core
166│   │   ├── CL
Kaizen8938bd32017-09-28 14:38:23 +0100167│   │   │   ├── CLKernelLibrary.h --&gt; Manages all the OpenCL kernels compilation and caching, provides accessors for the OpenCL Context.
Anthony Barbier871448e2017-03-24 14:54:29 +0000168│   │   │   ├── CLKernels.h --&gt; Includes all the OpenCL kernels at once
169│   │   │   ├── CL specialisation of all the generic objects interfaces (ICLTensor, ICLImage, etc.)
170│   │   │   ├── kernels --&gt; Folder containing all the OpenCL kernels
171│   │   │   │   └── CL*Kernel.h
172│   │   │   └── OpenCL.h --&gt; Wrapper to configure the Khronos OpenCL C++ header
173│   │ ├── CPP
Kaizen8938bd32017-09-28 14:38:23 +0100174│   │   │   ├── CPPKernels.h --&gt; Includes all the CPP kernels at once
Anthony Barbier871448e2017-03-24 14:54:29 +0000175│   │ │   └── kernels --&gt; Folder containing all the CPP kernels
Kaizen8938bd32017-09-28 14:38:23 +0100176│   │   │      └── CPP*Kernel.h
Anthony Barbier871448e2017-03-24 14:54:29 +0000177│   │   ├── NEON
178│   │   │   ├── kernels --&gt; Folder containing all the NEON kernels
Kaizen8938bd32017-09-28 14:38:23 +0100179│   │   │   │ ├── arm64 --&gt; Folder containing the interfaces for the assembly arm64 NEON kernels
180│   │   │   │ ├── arm32 --&gt; Folder containing the interfaces for the assembly arm32 NEON kernels
181│   │   │   │ ├── assembly --&gt; Folder containing the NEON assembly routines.
Anthony Barbier871448e2017-03-24 14:54:29 +0000182│   │   │   │   └── NE*Kernel.h
183│   │   │   └── NEKernels.h --&gt; Includes all the NEON kernels at once
184│   │   ├── All common basic types (Types.h, Window, Coordinates, Iterator, etc.)
185│   │   ├── All generic objects interfaces (ITensor, IImage, etc.)
186│   │   └── Objects metadata classes (ImageInfo, TensorInfo, MultiImageInfo)
Kaizen8938bd32017-09-28 14:38:23 +0100187│   ├── graph
188│   │   ├── CL --&gt; OpenCL specific operations
189│   │   │   └── CLMap.h / CLUnmap.h
190│   │   ├── nodes
191│   │   │   └── The various nodes supported by the graph API
192│   │   ├── Nodes.h --&gt; Includes all the Graph nodes at once.
193│   │   └── Graph objects ( INode, ITensorAccessor, Graph, etc.)
Anthony Barbier871448e2017-03-24 14:54:29 +0000194│   └── runtime
195│   ├── CL
196│   │   ├── CL objects &amp; allocators (CLArray, CLImage, CLTensor, etc.)
197│   │   ├── functions --&gt; Folder containing all the OpenCL functions
198│   │   │   └── CL*.h
Kaizen8938bd32017-09-28 14:38:23 +0100199│   │   ├── CLScheduler.h --&gt; Interface to enqueue OpenCL kernels and get/set the OpenCL CommandQueue and ICLTuner.
Anthony Barbier871448e2017-03-24 14:54:29 +0000200│   │   └── CLFunctions.h --&gt; Includes all the OpenCL functions at once
201│   ├── CPP
Kaizen8938bd32017-09-28 14:38:23 +0100202│      │   ├── CPPKernels.h --&gt; Includes all the CPP functions at once.
203│   │   └── CPPScheduler.h --&gt; Basic pool of threads to execute CPP/NEON code on several cores in parallel
Anthony Barbier871448e2017-03-24 14:54:29 +0000204│   ├── NEON
205│   │ ├── functions --&gt; Folder containing all the NEON functions
206│   │ │   └── NE*.h
207│   │ └── NEFunctions.h --&gt; Includes all the NEON functions at once
Kaizen8938bd32017-09-28 14:38:23 +0100208│   ├── OMP
209│   │   └── OMPScheduler.h --&gt; OpenMP scheduler (Alternative to the CPPScheduler)
210│ ├── Memory manager files (LifetimeManager, PoolManager, etc.)
Anthony Barbier871448e2017-03-24 14:54:29 +0000211│   └── Basic implementations of the generic object interfaces (Array, Image, Tensor, etc.)
212├── documentation
213│   ├── index.xhtml
214│   └── ...
215├── documentation.xhtml -&gt; documentation/index.xhtml
216├── examples
217│   ├── cl_convolution.cpp
Kaizen8938bd32017-09-28 14:38:23 +0100218│   ├── cl_events.cpp
219│   ├── graph_lenet.cpp
Anthony Barbier871448e2017-03-24 14:54:29 +0000220│   ├── neoncl_scale_median_gaussian.cpp
Kaizen8938bd32017-09-28 14:38:23 +0100221│   ├── neon_cnn.cpp
222│   ├── neon_copy_objects.cpp
Anthony Barbier871448e2017-03-24 14:54:29 +0000223│   ├── neon_convolution.cpp
224│   └── neon_scale.cpp
225├── include
Kaizen8938bd32017-09-28 14:38:23 +0100226│   ├── CL
227│   │ └── Khronos OpenCL C headers and C++ wrapper
228│   ├── half --&gt; FP16 library available from http://half.sourceforge.net
229│  └── libnpy --&gt; Library to load / write npy buffers, available from https://github.com/llohse/libnpy
Anthony Barbier871448e2017-03-24 14:54:29 +0000230├── opencl-1.2-stubs
231│ └── opencl_stubs.c
Kaizen8938bd32017-09-28 14:38:23 +0100232├── scripts
233│   ├── caffe_data_extractor.py --&gt; Basic script to export weights from Caffe to npy files
234│   └── tensorflow_data_extractor.py --&gt; Basic script to export weights from Tensor Flow to npy files
Anthony Barbier871448e2017-03-24 14:54:29 +0000235├── src
236│   ├── core
237│ │ └── ... (Same structure as headers)
238│   │ └── CL
239│   │ └── cl_kernels --&gt; All the OpenCL kernels
Kaizen8938bd32017-09-28 14:38:23 +0100240│   ├── graph
241│ │ └── ... (Same structure as headers)
Anthony Barbier871448e2017-03-24 14:54:29 +0000242│ └── runtime
243│ └── ... (Same structure as headers)
Kaizen8938bd32017-09-28 14:38:23 +0100244├── support
245│ └── Various headers to work around toolchains / platform issues.
Anthony Barbierdbdab852017-06-23 15:42:00 +0100246├── tests
247│   ├── All test related files shared between validation and benchmark
Kaizen8938bd32017-09-28 14:38:23 +0100248│   ├── CL --&gt; OpenCL accessors
249│   ├── NEON --&gt; NEON accessors
Anthony Barbierdbdab852017-06-23 15:42:00 +0100250│   ├── benchmark --&gt; Sources for benchmarking
251│ │ ├── Benchmark specific files
Anthony Barbierdbdab852017-06-23 15:42:00 +0100252│ │ ├── CL --&gt; OpenCL benchmarking tests
253│ │ └── NEON --&gt; NEON benchmarking tests
Kaizen8938bd32017-09-28 14:38:23 +0100254│   ├── datasets
255│ │ └── Datasets for all the validation / benchmark tests, layer configurations for various networks, etc.
256│   ├── framework
257│ │ └── Boiler plate code for both validation and benchmark test suites (Command line parsers, instruments, output loggers, etc.)
258│   ├── networks
259│ │ └── Examples of how to instantiate networks.
Anthony Barbierdbdab852017-06-23 15:42:00 +0100260│   ├── validation --&gt; Sources for validation
261│ │ ├── Validation specific files
Anthony Barbierdbdab852017-06-23 15:42:00 +0100262│ │ ├── CL --&gt; OpenCL validation tests
Kaizen8938bd32017-09-28 14:38:23 +0100263│ │ ├── CPP --&gt; C++ reference implementations
264│   │ ├── fixtures
265│ │ │ └── Fixtures to initialise and run the runtime Functions.
266│ │ └── NEON --&gt; NEON validation tests
Anthony Barbierdbdab852017-06-23 15:42:00 +0100267│   └── dataset --&gt; Datasets defining common sets of input parameters
268└── utils --&gt; Boiler plate code used by examples
Anthony Barbier871448e2017-03-24 14:54:29 +0000269 └── Utils.h
270</pre><h1><a class="anchor" id="S2_versions_changelog"></a>
Anthony Barbiera4376382017-04-12 15:12:46 +0100271Release versions and changelog</h1>
272<h2><a class="anchor" id="S2_1_versions"></a>
273Release versions</h2>
Kaizen8938bd32017-09-28 14:38:23 +0100274<p>All releases are numbered vYY.MM Where YY are the last two digits of the year, and MM the month number. If there is more than one release in a month then an extra sequential number is appended at the end: </p>
275<pre class="fragment">v17.03 (First release of March 2017)
Anthony Barbiera4376382017-04-12 15:12:46 +0100276v17.03.1 (Second release of March 2017)
277v17.04 (First release of April 2017)
278</pre><dl class="section note"><dt>Note</dt><dd>We're aiming at releasing one major public release with new features per quarter. All releases in between will only contain bug fixes.</dd></dl>
279<h2><a class="anchor" id="S2_2_changelog"></a>
280Changelog</h2>
Kaizen8938bd32017-09-28 14:38:23 +0100281<p>v17.09 Public major release</p>
282<ul>
283<li>Experimental Graph support: initial implementation of a simple stream API to easily chain machine learning layers.</li>
284<li>Memory Manager (<a class="el" href="classarm__compute_1_1_blob_lifetime_manager.xhtml">arm_compute::BlobLifetimeManager</a>, <a class="el" href="classarm__compute_1_1_blob_memory_pool.xhtml">arm_compute::BlobMemoryPool</a>, <a class="el" href="classarm__compute_1_1_i_lifetime_manager.xhtml">arm_compute::ILifetimeManager</a>, <a class="el" href="classarm__compute_1_1_i_memory_group.xhtml">arm_compute::IMemoryGroup</a>, <a class="el" href="classarm__compute_1_1_i_memory_manager.xhtml">arm_compute::IMemoryManager</a>, <a class="el" href="classarm__compute_1_1_i_memory_pool.xhtml">arm_compute::IMemoryPool</a>, <a class="el" href="classarm__compute_1_1_i_pool_manager.xhtml">arm_compute::IPoolManager</a>, <a class="el" href="classarm__compute_1_1_memory_manager_on_demand.xhtml">arm_compute::MemoryManagerOnDemand</a>, <a class="el" href="classarm__compute_1_1_pool_manager.xhtml">arm_compute::PoolManager</a>)</li>
285<li>New validation and benchmark frameworks (Boost and Google frameworks replaced by homemade framework).</li>
286<li>Most machine learning functions support both fixed point 8 and 16 bit (QS8, QS16) for both NEON and OpenCL.</li>
287<li>New NEON kernels / functions:<ul>
288<li><a class="el" href="classarm__compute_1_1_n_e_g_e_m_m_assembly_base_kernel.xhtml">arm_compute::NEGEMMAssemblyBaseKernel</a> <a class="el" href="classarm__compute_1_1_n_e_g_e_m_m_a_arch64_kernel.xhtml">arm_compute::NEGEMMAArch64Kernel</a></li>
289<li><a class="el" href="classarm__compute_1_1_n_e_dequantization_layer_kernel.xhtml">arm_compute::NEDequantizationLayerKernel</a> / <a class="el" href="classarm__compute_1_1_n_e_dequantization_layer.xhtml">arm_compute::NEDequantizationLayer</a></li>
290<li><a class="el" href="classarm__compute_1_1_n_e_floor_kernel.xhtml">arm_compute::NEFloorKernel</a> / <a class="el" href="classarm__compute_1_1_n_e_floor.xhtml">arm_compute::NEFloor</a></li>
291<li><a class="el" href="classarm__compute_1_1_n_e_l2_normalize_kernel.xhtml">arm_compute::NEL2NormalizeKernel</a> / <a class="el" href="classarm__compute_1_1_n_e_l2_normalize.xhtml">arm_compute::NEL2Normalize</a></li>
292<li><a class="el" href="classarm__compute_1_1_n_e_quantization_layer_kernel.xhtml">arm_compute::NEQuantizationLayerKernel</a> <a class="el" href="classarm__compute_1_1_n_e_min_max_layer_kernel.xhtml">arm_compute::NEMinMaxLayerKernel</a> / <a class="el" href="classarm__compute_1_1_n_e_quantization_layer.xhtml">arm_compute::NEQuantizationLayer</a></li>
293<li><a class="el" href="classarm__compute_1_1_n_e_r_o_i_pooling_layer_kernel.xhtml">arm_compute::NEROIPoolingLayerKernel</a> / <a class="el" href="classarm__compute_1_1_n_e_r_o_i_pooling_layer.xhtml">arm_compute::NEROIPoolingLayer</a></li>
294<li><a class="el" href="classarm__compute_1_1_n_e_reduction_operation_kernel.xhtml">arm_compute::NEReductionOperationKernel</a> / <a class="el" href="classarm__compute_1_1_n_e_reduction_operation.xhtml">arm_compute::NEReductionOperation</a></li>
295<li><a class="el" href="classarm__compute_1_1_n_e_reshape_layer_kernel.xhtml">arm_compute::NEReshapeLayerKernel</a> / <a class="el" href="classarm__compute_1_1_n_e_reshape_layer.xhtml">arm_compute::NEReshapeLayer</a></li>
296</ul>
297</li>
298<li>New OpenCL kernels / functions:<ul>
299<li><a class="el" href="classarm__compute_1_1_c_l_depthwise_convolution3x3_kernel.xhtml">arm_compute::CLDepthwiseConvolution3x3Kernel</a> <a class="el" href="classarm__compute_1_1_c_l_depthwise_im2_col_kernel.xhtml">arm_compute::CLDepthwiseIm2ColKernel</a> <a class="el" href="classarm__compute_1_1_c_l_depthwise_vector_to_tensor_kernel.xhtml">arm_compute::CLDepthwiseVectorToTensorKernel</a> <a class="el" href="classarm__compute_1_1_c_l_depthwise_weights_reshape_kernel.xhtml">arm_compute::CLDepthwiseWeightsReshapeKernel</a> / <a class="el" href="classarm__compute_1_1_c_l_depthwise_convolution3x3.xhtml">arm_compute::CLDepthwiseConvolution3x3</a> <a class="el" href="classarm__compute_1_1_c_l_depthwise_convolution.xhtml">arm_compute::CLDepthwiseConvolution</a> <a class="el" href="classarm__compute_1_1_c_l_depthwise_separable_convolution_layer.xhtml">arm_compute::CLDepthwiseSeparableConvolutionLayer</a></li>
300<li><a class="el" href="classarm__compute_1_1_c_l_dequantization_layer_kernel.xhtml">arm_compute::CLDequantizationLayerKernel</a> / <a class="el" href="classarm__compute_1_1_c_l_dequantization_layer.xhtml">arm_compute::CLDequantizationLayer</a></li>
301<li><a class="el" href="classarm__compute_1_1_c_l_direct_convolution_layer_kernel.xhtml">arm_compute::CLDirectConvolutionLayerKernel</a> / <a class="el" href="classarm__compute_1_1_c_l_direct_convolution_layer.xhtml">arm_compute::CLDirectConvolutionLayer</a></li>
302<li><a class="el" href="classarm__compute_1_1_c_l_flatten_layer.xhtml">arm_compute::CLFlattenLayer</a></li>
303<li><a class="el" href="classarm__compute_1_1_c_l_floor_kernel.xhtml">arm_compute::CLFloorKernel</a> / <a class="el" href="classarm__compute_1_1_c_l_floor.xhtml">arm_compute::CLFloor</a></li>
304<li><a class="el" href="classarm__compute_1_1_c_l_g_e_m_m_transpose1x_w.xhtml">arm_compute::CLGEMMTranspose1xW</a></li>
305<li><a class="el" href="classarm__compute_1_1_c_l_g_e_m_m_matrix_vector_multiply_kernel.xhtml">arm_compute::CLGEMMMatrixVectorMultiplyKernel</a></li>
306<li><a class="el" href="classarm__compute_1_1_c_l_l2_normalize_kernel.xhtml">arm_compute::CLL2NormalizeKernel</a> / <a class="el" href="classarm__compute_1_1_c_l_l2_normalize.xhtml">arm_compute::CLL2Normalize</a></li>
307<li><a class="el" href="classarm__compute_1_1_c_l_quantization_layer_kernel.xhtml">arm_compute::CLQuantizationLayerKernel</a> <a class="el" href="classarm__compute_1_1_c_l_min_max_layer_kernel.xhtml">arm_compute::CLMinMaxLayerKernel</a> / <a class="el" href="classarm__compute_1_1_c_l_quantization_layer.xhtml">arm_compute::CLQuantizationLayer</a></li>
308<li><a class="el" href="classarm__compute_1_1_c_l_r_o_i_pooling_layer_kernel.xhtml">arm_compute::CLROIPoolingLayerKernel</a> / <a class="el" href="classarm__compute_1_1_c_l_r_o_i_pooling_layer.xhtml">arm_compute::CLROIPoolingLayer</a></li>
309<li><a class="el" href="classarm__compute_1_1_c_l_reduction_operation_kernel.xhtml">arm_compute::CLReductionOperationKernel</a> / <a class="el" href="classarm__compute_1_1_c_l_reduction_operation.xhtml">arm_compute::CLReductionOperation</a></li>
310<li><a class="el" href="classarm__compute_1_1_c_l_reshape_layer_kernel.xhtml">arm_compute::CLReshapeLayerKernel</a> / <a class="el" href="classarm__compute_1_1_c_l_reshape_layer.xhtml">arm_compute::CLReshapeLayer</a></li>
311</ul>
312</li>
313</ul>
314<p>v17.06 Public major release</p>
315<ul>
Anthony Barbierdbdab852017-06-23 15:42:00 +0100316<li>Various bug fixes</li>
317<li>Added support for fixed point 8 bit (QS8) to the various NEON machine learning kernels.</li>
318<li>Added unit tests and benchmarks (AlexNet, LeNet)</li>
319<li>Added support for sub tensors.</li>
320<li>Added infrastructure to provide GPU specific optimisation for some OpenCL kernels.</li>
321<li>Added <a class="el" href="classarm__compute_1_1_o_m_p_scheduler.xhtml">arm_compute::OMPScheduler</a> (OpenMP) scheduler for NEON</li>
322<li>Added <a class="el" href="classarm__compute_1_1_single_thread_scheduler.xhtml">arm_compute::SingleThreadScheduler</a> scheduler for NEON (For bare metal)</li>
323<li>User can specify his own scheduler by implementing the <a class="el" href="classarm__compute_1_1_i_scheduler.xhtml">arm_compute::IScheduler</a> interface.</li>
324<li>New OpenCL kernels / functions:<ul>
325<li><a class="el" href="classarm__compute_1_1_c_l_batch_normalization_layer_kernel.xhtml">arm_compute::CLBatchNormalizationLayerKernel</a> / <a class="el" href="classarm__compute_1_1_c_l_batch_normalization_layer.xhtml">arm_compute::CLBatchNormalizationLayer</a></li>
326<li><a class="el" href="classarm__compute_1_1_c_l_depth_concatenate_kernel.xhtml">arm_compute::CLDepthConcatenateKernel</a> / <a class="el" href="classarm__compute_1_1_c_l_depth_concatenate.xhtml">arm_compute::CLDepthConcatenate</a></li>
327<li><a class="el" href="classarm__compute_1_1_c_l_h_o_g_orientation_binning_kernel.xhtml">arm_compute::CLHOGOrientationBinningKernel</a> <a class="el" href="classarm__compute_1_1_c_l_h_o_g_block_normalization_kernel.xhtml">arm_compute::CLHOGBlockNormalizationKernel</a>, <a class="el" href="classarm__compute_1_1_c_l_h_o_g_detector_kernel.xhtml">arm_compute::CLHOGDetectorKernel</a> / <a class="el" href="classarm__compute_1_1_c_l_h_o_g_descriptor.xhtml">arm_compute::CLHOGDescriptor</a> <a class="el" href="classarm__compute_1_1_c_l_h_o_g_detector.xhtml">arm_compute::CLHOGDetector</a> <a class="el" href="classarm__compute_1_1_c_l_h_o_g_gradient.xhtml">arm_compute::CLHOGGradient</a> <a class="el" href="classarm__compute_1_1_c_l_h_o_g_multi_detection.xhtml">arm_compute::CLHOGMultiDetection</a></li>
328<li><a class="el" href="classarm__compute_1_1_c_l_locally_connected_matrix_multiply_kernel.xhtml">arm_compute::CLLocallyConnectedMatrixMultiplyKernel</a> / <a class="el" href="classarm__compute_1_1_c_l_locally_connected_layer.xhtml">arm_compute::CLLocallyConnectedLayer</a></li>
329<li><a class="el" href="classarm__compute_1_1_c_l_weights_reshape_kernel.xhtml">arm_compute::CLWeightsReshapeKernel</a> / <a class="el" href="classarm__compute_1_1_c_l_convolution_layer_reshape_weights.xhtml">arm_compute::CLConvolutionLayerReshapeWeights</a></li>
330</ul>
331</li>
332<li>New C++ kernels:<ul>
333<li><a class="el" href="classarm__compute_1_1_c_p_p_detection_window_non_maxima_suppression_kernel.xhtml">arm_compute::CPPDetectionWindowNonMaximaSuppressionKernel</a></li>
334</ul>
335</li>
336<li>New NEON kernels / functions:<ul>
337<li><a class="el" href="classarm__compute_1_1_n_e_batch_normalization_layer_kernel.xhtml">arm_compute::NEBatchNormalizationLayerKernel</a> / <a class="el" href="classarm__compute_1_1_n_e_batch_normalization_layer.xhtml">arm_compute::NEBatchNormalizationLayer</a></li>
338<li><a class="el" href="classarm__compute_1_1_n_e_depth_concatenate_kernel.xhtml">arm_compute::NEDepthConcatenateKernel</a> / <a class="el" href="classarm__compute_1_1_n_e_depth_concatenate.xhtml">arm_compute::NEDepthConcatenate</a></li>
339<li><a class="el" href="classarm__compute_1_1_n_e_direct_convolution_layer_kernel.xhtml">arm_compute::NEDirectConvolutionLayerKernel</a> / <a class="el" href="classarm__compute_1_1_n_e_direct_convolution_layer.xhtml">arm_compute::NEDirectConvolutionLayer</a></li>
340<li><a class="el" href="classarm__compute_1_1_n_e_locally_connected_matrix_multiply_kernel.xhtml">arm_compute::NELocallyConnectedMatrixMultiplyKernel</a> / <a class="el" href="classarm__compute_1_1_n_e_locally_connected_layer.xhtml">arm_compute::NELocallyConnectedLayer</a></li>
341<li><a class="el" href="classarm__compute_1_1_n_e_weights_reshape_kernel.xhtml">arm_compute::NEWeightsReshapeKernel</a> / <a class="el" href="classarm__compute_1_1_n_e_convolution_layer_reshape_weights.xhtml">arm_compute::NEConvolutionLayerReshapeWeights</a></li>
342</ul>
343</li>
344</ul>
Kaizen8938bd32017-09-28 14:38:23 +0100345<p>v17.05 Public bug fixes release</p>
346<ul>
Anthony Barbier46d59272017-05-04 09:15:15 +0100347<li>Various bug fixes</li>
348<li>Remaining of the functions ported to use accurate padding.</li>
349<li>Library does not link against OpenCL anymore (It uses dlopen / dlsym at runtime instead to determine whether or not OpenCL is available).</li>
350<li>Added "free" method to allocator.</li>
Anthony Barbierdbdab852017-06-23 15:42:00 +0100351<li>Minimum version of g++ required for armv7 Linux changed from 4.8 to 4.9</li>
Anthony Barbier46d59272017-05-04 09:15:15 +0100352</ul>
Anthony Barbierdbdab852017-06-23 15:42:00 +0100353<p>v17.04 Public bug fixes release</p>
Kaizen8938bd32017-09-28 14:38:23 +0100354<p>The following functions have been ported to use the new accurate padding:</p>
355<ul>
Anthony Barbierdbdab852017-06-23 15:42:00 +0100356<li><a class="el" href="classarm__compute_1_1_c_l_color_convert_kernel.xhtml">arm_compute::CLColorConvertKernel</a></li>
357<li><a class="el" href="classarm__compute_1_1_c_l_edge_non_max_suppression_kernel.xhtml">arm_compute::CLEdgeNonMaxSuppressionKernel</a></li>
358<li><a class="el" href="classarm__compute_1_1_c_l_edge_trace_kernel.xhtml">arm_compute::CLEdgeTraceKernel</a></li>
359<li><a class="el" href="classarm__compute_1_1_c_l_gaussian_pyramid_hor_kernel.xhtml">arm_compute::CLGaussianPyramidHorKernel</a></li>
360<li><a class="el" href="classarm__compute_1_1_c_l_gaussian_pyramid_vert_kernel.xhtml">arm_compute::CLGaussianPyramidVertKernel</a></li>
361<li><a class="el" href="classarm__compute_1_1_c_l_gradient_kernel.xhtml">arm_compute::CLGradientKernel</a></li>
362<li><a class="el" href="classarm__compute_1_1_n_e_channel_combine_kernel.xhtml">arm_compute::NEChannelCombineKernel</a></li>
363<li><a class="el" href="classarm__compute_1_1_n_e_fill_array_kernel.xhtml">arm_compute::NEFillArrayKernel</a></li>
364<li><a class="el" href="classarm__compute_1_1_n_e_gaussian_pyramid_hor_kernel.xhtml">arm_compute::NEGaussianPyramidHorKernel</a></li>
365<li><a class="el" href="classarm__compute_1_1_n_e_gaussian_pyramid_vert_kernel.xhtml">arm_compute::NEGaussianPyramidVertKernel</a></li>
366<li><a class="el" href="classarm__compute_1_1_n_e_harris_score_f_p16_kernel.xhtml">arm_compute::NEHarrisScoreFP16Kernel</a></li>
367<li><a class="el" href="classarm__compute_1_1_n_e_harris_score_kernel.xhtml">arm_compute::NEHarrisScoreKernel</a></li>
368<li><a class="el" href="classarm__compute_1_1_n_e_h_o_g_detector_kernel.xhtml">arm_compute::NEHOGDetectorKernel</a></li>
369<li><a class="el" href="classarm__compute_1_1_n_e_logits1_d_max_kernel.xhtml">arm_compute::NELogits1DMaxKernel</a></li>
370<li><a class="el" href="classarm__compute_1_1_n_e_logits1_d_shift_exp_sum_kernel.xhtml">arm_compute::NELogits1DShiftExpSumKernel</a></li>
371<li><a class="el" href="classarm__compute_1_1_n_e_logits1_d_norm_kernel.xhtml">arm_compute::NELogits1DNormKernel</a></li>
372<li><a class="el" href="classarm__compute_1_1_n_e_non_maxima_suppression3x3_f_p16_kernel.xhtml">arm_compute::NENonMaximaSuppression3x3FP16Kernel</a></li>
373<li><a class="el" href="classarm__compute_1_1_n_e_non_maxima_suppression3x3_kernel.xhtml">arm_compute::NENonMaximaSuppression3x3Kernel</a></li>
Anthony Barbier871448e2017-03-24 14:54:29 +0000374</ul>
Kaizen8938bd32017-09-28 14:38:23 +0100375<p>v17.03.1 First Major public release of the sources</p>
376<ul>
Anthony Barbier871448e2017-03-24 14:54:29 +0000377<li>Renamed the library to <a class="el" href="namespacearm__compute.xhtml">arm_compute</a></li>
378<li>New CPP target introduced for C++ kernels shared between NEON and CL functions.</li>
379<li>New padding calculation interface introduced and ported most kernels / functions to use it.</li>
380<li>New OpenCL kernels / functions:<ul>
Anthony Barbierdbdab852017-06-23 15:42:00 +0100381<li><a class="el" href="classarm__compute_1_1_c_l_g_e_m_m_lowp_matrix_multiply_kernel.xhtml">arm_compute::CLGEMMLowpMatrixMultiplyKernel</a> / <a class="el" href="classarm__compute_1_1_c_l_g_e_m_m_lowp.xhtml">arm_compute::CLGEMMLowp</a></li>
Anthony Barbier871448e2017-03-24 14:54:29 +0000382</ul>
383</li>
384<li>New NEON kernels / functions:<ul>
Anthony Barbierdbdab852017-06-23 15:42:00 +0100385<li><a class="el" href="classarm__compute_1_1_n_e_normalization_layer_kernel.xhtml">arm_compute::NENormalizationLayerKernel</a> / <a class="el" href="classarm__compute_1_1_n_e_normalization_layer.xhtml">arm_compute::NENormalizationLayer</a></li>
386<li><a class="el" href="classarm__compute_1_1_n_e_transpose_kernel.xhtml">arm_compute::NETransposeKernel</a> / <a class="el" href="classarm__compute_1_1_n_e_transpose.xhtml">arm_compute::NETranspose</a></li>
387<li><a class="el" href="classarm__compute_1_1_n_e_logits1_d_max_kernel.xhtml">arm_compute::NELogits1DMaxKernel</a>, <a class="el" href="classarm__compute_1_1_n_e_logits1_d_shift_exp_sum_kernel.xhtml">arm_compute::NELogits1DShiftExpSumKernel</a>, <a class="el" href="classarm__compute_1_1_n_e_logits1_d_norm_kernel.xhtml">arm_compute::NELogits1DNormKernel</a> / <a class="el" href="classarm__compute_1_1_n_e_softmax_layer.xhtml">arm_compute::NESoftmaxLayer</a></li>
388<li><a class="el" href="classarm__compute_1_1_n_e_im2_col_kernel.xhtml">arm_compute::NEIm2ColKernel</a>, <a class="el" href="classarm__compute_1_1_n_e_col2_im_kernel.xhtml">arm_compute::NECol2ImKernel</a>, arm_compute::NEConvolutionLayerWeightsReshapeKernel / <a class="el" href="classarm__compute_1_1_n_e_convolution_layer.xhtml">arm_compute::NEConvolutionLayer</a></li>
389<li><a class="el" href="classarm__compute_1_1_n_e_g_e_m_m_matrix_accumulate_biases_kernel.xhtml">arm_compute::NEGEMMMatrixAccumulateBiasesKernel</a> / <a class="el" href="classarm__compute_1_1_n_e_fully_connected_layer.xhtml">arm_compute::NEFullyConnectedLayer</a></li>
390<li><a class="el" href="classarm__compute_1_1_n_e_g_e_m_m_lowp_matrix_multiply_kernel.xhtml">arm_compute::NEGEMMLowpMatrixMultiplyKernel</a> / <a class="el" href="classarm__compute_1_1_n_e_g_e_m_m_lowp.xhtml">arm_compute::NEGEMMLowp</a></li>
Anthony Barbier871448e2017-03-24 14:54:29 +0000391</ul>
392</li>
393</ul>
Kaizen8938bd32017-09-28 14:38:23 +0100394<p>v17.03 Sources preview</p>
395<ul>
Anthony Barbiera4376382017-04-12 15:12:46 +0100396<li>New OpenCL kernels / functions:<ul>
Anthony Barbierdbdab852017-06-23 15:42:00 +0100397<li><a class="el" href="classarm__compute_1_1_c_l_gradient_kernel.xhtml">arm_compute::CLGradientKernel</a>, <a class="el" href="classarm__compute_1_1_c_l_edge_non_max_suppression_kernel.xhtml">arm_compute::CLEdgeNonMaxSuppressionKernel</a>, <a class="el" href="classarm__compute_1_1_c_l_edge_trace_kernel.xhtml">arm_compute::CLEdgeTraceKernel</a> / <a class="el" href="classarm__compute_1_1_c_l_canny_edge.xhtml">arm_compute::CLCannyEdge</a></li>
398<li>GEMM refactoring + FP16 support: <a class="el" href="classarm__compute_1_1_c_l_g_e_m_m_interleave4x4_kernel.xhtml">arm_compute::CLGEMMInterleave4x4Kernel</a>, <a class="el" href="classarm__compute_1_1_c_l_g_e_m_m_transpose1x_w_kernel.xhtml">arm_compute::CLGEMMTranspose1xWKernel</a>, <a class="el" href="classarm__compute_1_1_c_l_g_e_m_m_matrix_multiply_kernel.xhtml">arm_compute::CLGEMMMatrixMultiplyKernel</a>, <a class="el" href="classarm__compute_1_1_c_l_g_e_m_m_matrix_addition_kernel.xhtml">arm_compute::CLGEMMMatrixAdditionKernel</a> / <a class="el" href="classarm__compute_1_1_c_l_g_e_m_m.xhtml">arm_compute::CLGEMM</a></li>
399<li><a class="el" href="classarm__compute_1_1_c_l_g_e_m_m_matrix_accumulate_biases_kernel.xhtml">arm_compute::CLGEMMMatrixAccumulateBiasesKernel</a> / <a class="el" href="classarm__compute_1_1_c_l_fully_connected_layer.xhtml">arm_compute::CLFullyConnectedLayer</a></li>
400<li><a class="el" href="classarm__compute_1_1_c_l_transpose_kernel.xhtml">arm_compute::CLTransposeKernel</a> / <a class="el" href="classarm__compute_1_1_c_l_transpose.xhtml">arm_compute::CLTranspose</a></li>
401<li><a class="el" href="classarm__compute_1_1_c_l_l_k_tracker_init_kernel.xhtml">arm_compute::CLLKTrackerInitKernel</a>, <a class="el" href="classarm__compute_1_1_c_l_l_k_tracker_stage0_kernel.xhtml">arm_compute::CLLKTrackerStage0Kernel</a>, <a class="el" href="classarm__compute_1_1_c_l_l_k_tracker_stage1_kernel.xhtml">arm_compute::CLLKTrackerStage1Kernel</a>, <a class="el" href="classarm__compute_1_1_c_l_l_k_tracker_finalize_kernel.xhtml">arm_compute::CLLKTrackerFinalizeKernel</a> / <a class="el" href="classarm__compute_1_1_c_l_optical_flow.xhtml">arm_compute::CLOpticalFlow</a></li>
402<li><a class="el" href="classarm__compute_1_1_c_l_normalization_layer_kernel.xhtml">arm_compute::CLNormalizationLayerKernel</a> / <a class="el" href="classarm__compute_1_1_c_l_normalization_layer.xhtml">arm_compute::CLNormalizationLayer</a></li>
403<li><a class="el" href="classarm__compute_1_1_c_l_laplacian_pyramid.xhtml">arm_compute::CLLaplacianPyramid</a>, <a class="el" href="classarm__compute_1_1_c_l_laplacian_reconstruct.xhtml">arm_compute::CLLaplacianReconstruct</a></li>
Anthony Barbiera4376382017-04-12 15:12:46 +0100404</ul>
405</li>
406<li>New NEON kernels / functions:<ul>
Anthony Barbierdbdab852017-06-23 15:42:00 +0100407<li><a class="el" href="classarm__compute_1_1_n_e_activation_layer_kernel.xhtml">arm_compute::NEActivationLayerKernel</a> / <a class="el" href="classarm__compute_1_1_n_e_activation_layer.xhtml">arm_compute::NEActivationLayer</a></li>
408<li>GEMM refactoring + FP16 support (Requires armv8.2 CPU): <a class="el" href="classarm__compute_1_1_n_e_g_e_m_m_interleave4x4_kernel.xhtml">arm_compute::NEGEMMInterleave4x4Kernel</a>, <a class="el" href="classarm__compute_1_1_n_e_g_e_m_m_transpose1x_w_kernel.xhtml">arm_compute::NEGEMMTranspose1xWKernel</a>, <a class="el" href="classarm__compute_1_1_n_e_g_e_m_m_matrix_multiply_kernel.xhtml">arm_compute::NEGEMMMatrixMultiplyKernel</a>, <a class="el" href="classarm__compute_1_1_n_e_g_e_m_m_matrix_addition_kernel.xhtml">arm_compute::NEGEMMMatrixAdditionKernel</a> / <a class="el" href="classarm__compute_1_1_n_e_g_e_m_m.xhtml">arm_compute::NEGEMM</a></li>
409<li><a class="el" href="classarm__compute_1_1_n_e_pooling_layer_kernel.xhtml">arm_compute::NEPoolingLayerKernel</a> / <a class="el" href="classarm__compute_1_1_n_e_pooling_layer.xhtml">arm_compute::NEPoolingLayer</a></li>
Anthony Barbiera4376382017-04-12 15:12:46 +0100410</ul>
411</li>
412</ul>
Kaizen8938bd32017-09-28 14:38:23 +0100413<p>v17.02.1 Sources preview</p>
414<ul>
Anthony Barbiera4376382017-04-12 15:12:46 +0100415<li>New OpenCL kernels / functions:<ul>
Anthony Barbierdbdab852017-06-23 15:42:00 +0100416<li><a class="el" href="classarm__compute_1_1_c_l_logits1_d_max_kernel.xhtml">arm_compute::CLLogits1DMaxKernel</a>, <a class="el" href="classarm__compute_1_1_c_l_logits1_d_shift_exp_sum_kernel.xhtml">arm_compute::CLLogits1DShiftExpSumKernel</a>, <a class="el" href="classarm__compute_1_1_c_l_logits1_d_norm_kernel.xhtml">arm_compute::CLLogits1DNormKernel</a> / <a class="el" href="classarm__compute_1_1_c_l_softmax_layer.xhtml">arm_compute::CLSoftmaxLayer</a></li>
417<li><a class="el" href="classarm__compute_1_1_c_l_pooling_layer_kernel.xhtml">arm_compute::CLPoolingLayerKernel</a> / <a class="el" href="classarm__compute_1_1_c_l_pooling_layer.xhtml">arm_compute::CLPoolingLayer</a></li>
Kaizen8938bd32017-09-28 14:38:23 +0100418<li><a class="el" href="classarm__compute_1_1_c_l_im2_col_kernel.xhtml">arm_compute::CLIm2ColKernel</a>, <a class="el" href="classarm__compute_1_1_c_l_col2_im_kernel.xhtml">arm_compute::CLCol2ImKernel</a>, arm_compute::CLConvolutionLayerWeightsReshapeKernel / <a class="el" href="classarm__compute_1_1_c_l_convolution_layer.xhtml">arm_compute::CLConvolutionLayer</a></li>
Anthony Barbierdbdab852017-06-23 15:42:00 +0100419<li><a class="el" href="classarm__compute_1_1_c_l_remap_kernel.xhtml">arm_compute::CLRemapKernel</a> / <a class="el" href="classarm__compute_1_1_c_l_remap.xhtml">arm_compute::CLRemap</a></li>
420<li><a class="el" href="classarm__compute_1_1_c_l_gaussian_pyramid_hor_kernel.xhtml">arm_compute::CLGaussianPyramidHorKernel</a>, <a class="el" href="classarm__compute_1_1_c_l_gaussian_pyramid_vert_kernel.xhtml">arm_compute::CLGaussianPyramidVertKernel</a> / <a class="el" href="classarm__compute_1_1_c_l_gaussian_pyramid.xhtml">arm_compute::CLGaussianPyramid</a>, <a class="el" href="classarm__compute_1_1_c_l_gaussian_pyramid_half.xhtml">arm_compute::CLGaussianPyramidHalf</a>, <a class="el" href="classarm__compute_1_1_c_l_gaussian_pyramid_orb.xhtml">arm_compute::CLGaussianPyramidOrb</a></li>
421<li><a class="el" href="classarm__compute_1_1_c_l_min_max_kernel.xhtml">arm_compute::CLMinMaxKernel</a>, <a class="el" href="classarm__compute_1_1_c_l_min_max_location_kernel.xhtml">arm_compute::CLMinMaxLocationKernel</a> / <a class="el" href="classarm__compute_1_1_c_l_min_max_location.xhtml">arm_compute::CLMinMaxLocation</a></li>
422<li><a class="el" href="classarm__compute_1_1_c_l_non_linear_filter_kernel.xhtml">arm_compute::CLNonLinearFilterKernel</a> / <a class="el" href="classarm__compute_1_1_c_l_non_linear_filter.xhtml">arm_compute::CLNonLinearFilter</a></li>
Anthony Barbiera4376382017-04-12 15:12:46 +0100423</ul>
424</li>
425<li>New NEON FP16 kernels (Requires armv8.2 CPU)<ul>
Anthony Barbierdbdab852017-06-23 15:42:00 +0100426<li><a class="el" href="classarm__compute_1_1_n_e_accumulate_weighted_f_p16_kernel.xhtml">arm_compute::NEAccumulateWeightedFP16Kernel</a></li>
427<li><a class="el" href="classarm__compute_1_1_n_e_box3x3_f_p16_kernel.xhtml">arm_compute::NEBox3x3FP16Kernel</a></li>
428<li><a class="el" href="classarm__compute_1_1_n_e_non_maxima_suppression3x3_f_p16_kernel.xhtml">arm_compute::NENonMaximaSuppression3x3FP16Kernel</a></li>
Anthony Barbiera4376382017-04-12 15:12:46 +0100429</ul>
430</li>
431</ul>
Kaizen8938bd32017-09-28 14:38:23 +0100432<p>v17.02 Sources preview</p>
433<ul>
Anthony Barbiera4376382017-04-12 15:12:46 +0100434<li>New OpenCL kernels / functions:<ul>
Anthony Barbierdbdab852017-06-23 15:42:00 +0100435<li><a class="el" href="classarm__compute_1_1_c_l_activation_layer_kernel.xhtml">arm_compute::CLActivationLayerKernel</a> / <a class="el" href="classarm__compute_1_1_c_l_activation_layer.xhtml">arm_compute::CLActivationLayer</a></li>
436<li><a class="el" href="classarm__compute_1_1_c_l_channel_combine_kernel.xhtml">arm_compute::CLChannelCombineKernel</a> / <a class="el" href="classarm__compute_1_1_c_l_channel_combine.xhtml">arm_compute::CLChannelCombine</a></li>
437<li><a class="el" href="classarm__compute_1_1_c_l_derivative_kernel.xhtml">arm_compute::CLDerivativeKernel</a> / <a class="el" href="classarm__compute_1_1_c_l_channel_extract.xhtml">arm_compute::CLChannelExtract</a></li>
438<li><a class="el" href="classarm__compute_1_1_c_l_fast_corners_kernel.xhtml">arm_compute::CLFastCornersKernel</a> / <a class="el" href="classarm__compute_1_1_c_l_fast_corners.xhtml">arm_compute::CLFastCorners</a></li>
439<li><a class="el" href="classarm__compute_1_1_c_l_mean_std_dev_kernel.xhtml">arm_compute::CLMeanStdDevKernel</a> / <a class="el" href="classarm__compute_1_1_c_l_mean_std_dev.xhtml">arm_compute::CLMeanStdDev</a></li>
Anthony Barbiera4376382017-04-12 15:12:46 +0100440</ul>
441</li>
442<li>New NEON kernels / functions:<ul>
Anthony Barbierdbdab852017-06-23 15:42:00 +0100443<li>HOG / SVM: <a class="el" href="classarm__compute_1_1_n_e_h_o_g_orientation_binning_kernel.xhtml">arm_compute::NEHOGOrientationBinningKernel</a>, <a class="el" href="classarm__compute_1_1_n_e_h_o_g_block_normalization_kernel.xhtml">arm_compute::NEHOGBlockNormalizationKernel</a>, <a class="el" href="classarm__compute_1_1_n_e_h_o_g_detector_kernel.xhtml">arm_compute::NEHOGDetectorKernel</a>, arm_compute::NEHOGNonMaximaSuppressionKernel / <a class="el" href="classarm__compute_1_1_n_e_h_o_g_descriptor.xhtml">arm_compute::NEHOGDescriptor</a>, <a class="el" href="classarm__compute_1_1_n_e_h_o_g_detector.xhtml">arm_compute::NEHOGDetector</a>, <a class="el" href="classarm__compute_1_1_n_e_h_o_g_gradient.xhtml">arm_compute::NEHOGGradient</a>, <a class="el" href="classarm__compute_1_1_n_e_h_o_g_multi_detection.xhtml">arm_compute::NEHOGMultiDetection</a></li>
444<li><a class="el" href="classarm__compute_1_1_n_e_non_linear_filter_kernel.xhtml">arm_compute::NENonLinearFilterKernel</a> / <a class="el" href="classarm__compute_1_1_n_e_non_linear_filter.xhtml">arm_compute::NENonLinearFilter</a></li>
Anthony Barbiera4376382017-04-12 15:12:46 +0100445</ul>
446</li>
Anthony Barbierdbdab852017-06-23 15:42:00 +0100447<li>Introduced a CLScheduler to manage the default context and command queue used by the runtime library and create synchronisation events.</li>
Anthony Barbiera4376382017-04-12 15:12:46 +0100448<li>Switched all the kernels / functions to use tensors instead of images.</li>
449<li>Updated documentation to include instructions to build the library from sources.</li>
450</ul>
Kaizen8938bd32017-09-28 14:38:23 +0100451<p>v16.12 Binary preview release</p>
452<ul>
Anthony Barbiera4376382017-04-12 15:12:46 +0100453<li>Original release</li>
454</ul>
Anthony Barbier871448e2017-03-24 14:54:29 +0000455<h1><a class="anchor" id="S3_how_to_build"></a>
456How to build the library and the examples</h1>
457<h2><a class="anchor" id="S3_1_build_options"></a>
458Build options</h2>
Kaizen8938bd32017-09-28 14:38:23 +0100459<p>scons 2.3 or above is required to build the library. To see the build options available simply run <code>scons -h</code>: </p>
460<pre class="fragment">debug: Debug (yes|no)
Anthony Barbierdbdab852017-06-23 15:42:00 +0100461 default: False
462 actual: False
Anthony Barbier871448e2017-03-24 14:54:29 +0000463
Anthony Barbierdbdab852017-06-23 15:42:00 +0100464asserts: Enable asserts (this flag is forced to 1 for debug=1) (yes|no)
465 default: False
466 actual: False
Anthony Barbier871448e2017-03-24 14:54:29 +0000467
Anthony Barbierdbdab852017-06-23 15:42:00 +0100468arch: Target Architecture (armv7a|arm64-v8a|arm64-v8.2-a|x86_32|x86_64)
Anthony Barbier871448e2017-03-24 14:54:29 +0000469 default: armv7a
470 actual: armv7a
471
Anthony Barbierdbdab852017-06-23 15:42:00 +0100472os: Target OS (linux|android|bare_metal)
Anthony Barbier871448e2017-03-24 14:54:29 +0000473 default: linux
474 actual: linux
475
Anthony Barbierdbdab852017-06-23 15:42:00 +0100476build: Build type (native|cross_compile)
Anthony Barbier871448e2017-03-24 14:54:29 +0000477 default: cross_compile
478 actual: cross_compile
479
Anthony Barbierdbdab852017-06-23 15:42:00 +0100480examples: Build example programs (yes|no)
481 default: True
482 actual: True
Anthony Barbier871448e2017-03-24 14:54:29 +0000483
Anthony Barbierdbdab852017-06-23 15:42:00 +0100484Werror: Enable/disable the -Werror compilation flag (yes|no)
485 default: True
486 actual: True
Anthony Barbier871448e2017-03-24 14:54:29 +0000487
Anthony Barbierdbdab852017-06-23 15:42:00 +0100488opencl: Enable OpenCL support (yes|no)
489 default: True
490 actual: True
Anthony Barbier871448e2017-03-24 14:54:29 +0000491
Anthony Barbierdbdab852017-06-23 15:42:00 +0100492neon: Enable Neon support (yes|no)
493 default: False
Anthony Barbiera4376382017-04-12 15:12:46 +0100494 actual: False
495
Anthony Barbierdbdab852017-06-23 15:42:00 +0100496embed_kernels: Embed OpenCL kernels in library binary (yes|no)
497 default: False
498 actual: False
499
500set_soname: Set the library's soname and shlibversion (requires SCons 2.4 or above) (yes|no)
501 default: False
502 actual: False
503
504openmp: Enable OpenMP backend (yes|no)
505 default: False
506 actual: False
507
508cppthreads: Enable C++11 threads backend (yes|no)
509 default: True
510 actual: True
511
512build_dir: Specify sub-folder for the build ( /path/to/build_dir )
513 default: .
514 actual: .
515
Anthony Barbiera4376382017-04-12 15:12:46 +0100516extra_cxx_flags: Extra CXX flags to be appended to the build command
517 default:
518 actual:
Anthony Barbierdbdab852017-06-23 15:42:00 +0100519
520pmu: Enable PMU counters (yes|no)
521 default: False
522 actual: False
523
Kaizen8938bd32017-09-28 14:38:23 +0100524mali: Enable Mali hardware counters (yes|no)
525 default: False
526 actual: False
527
Anthony Barbierdbdab852017-06-23 15:42:00 +0100528validation_tests: Build validation test programs (yes|no)
529 default: False
530 actual: False
531
532benchmark_tests: Build benchmark test programs (yes|no)
533 default: False
534 actual: False
Kaizen8938bd32017-09-28 14:38:23 +0100535</pre><p><b>debug</b> / <b>asserts:</b> </p>
536<ul>
Anthony Barbier871448e2017-03-24 14:54:29 +0000537<li>With debug=1 asserts are enabled, and the library is built with symbols and no optimisations enabled.</li>
538<li>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)</li>
539<li>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).</li>
540</ul>
Anthony Barbierdbdab852017-06-23 15:42:00 +0100541<p><b>arch:</b> The x86_32 and x86_64 targets can only be used with neon=0 and opencl=1.</p>
Kaizen8938bd32017-09-28 14:38:23 +0100542<p><b>os:</b> Choose the operating system you are targeting: Linux, Android or bare metal. </p>
543<dl class="section note"><dt>Note</dt><dd>bare metal can only be used for NEON (not OpenCL), only static libraries get built and NEON's multi-threading support is disabled.</dd></dl>
Anthony Barbierdbdab852017-06-23 15:42:00 +0100544<p><b>build:</b> 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.</p>
545<dl class="section note"><dt>Note</dt><dd>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.</dd></dl>
546<p><b>Werror:</b> 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 <a href="#" onclick="location.href='mai'+'lto:'+'dev'+'el'+'ope'+'r@'+'arm'+'.c'+'om'; return false;">devel<span style="display: none;">.nosp@m.</span>oper<span style="display: none;">.nosp@m.</span>@arm.<span style="display: none;">.nosp@m.</span>com</a> so that the issue can be addressed).</p>
547<p><b>opencl</b> / <b>neon:</b> Choose which SIMD technology you want to target. (NEON for ARM Cortex-A CPUs or OpenCL for ARM Mali GPUs)</p>
548<p><b>embed_kernels:</b> For OpenCL only: set embed_kernels=1 if you want the OpenCL kernels to be built in the library's binaries instead of being read from separate ".cl" files. If embed_kernels is set to 0 then the application can set the path to the folder containing the OpenCL kernel files by calling CLKernelLibrary::init(). By default the path is set to "./cl_kernels".</p>
549<p><b>set_soname:</b> Do you want to build the versioned version of the library ?</p>
550<p>If enabled the library will contain a SONAME and SHLIBVERSION and some symlinks will automatically be created between the objects. Example: libarm_compute_core.so -&gt; libarm_compute_core.so.1.0.0 libarm_compute_core.so.1 -&gt; libarm_compute_core.so.1.0.0 libarm_compute_core.so.1.0.0</p>
Anthony Barbiera4376382017-04-12 15:12:46 +0100551<dl class="section note"><dt>Note</dt><dd>This options is disabled by default as it requires SCons version 2.4 or above.</dd></dl>
Anthony Barbierdbdab852017-06-23 15:42:00 +0100552<p><b>extra_cxx_flags:</b> Custom CXX flags which will be appended to the end of the build command.</p>
553<p><b>build_dir:</b> Build the library in a subfolder of the "build" folder. (Allows to build several configurations in parallel).</p>
554<p><b>examples:</b> Build or not the examples</p>
555<p><b>validation_tests:</b> Enable the build of the validation suite.</p>
Anthony Barbierdbdab852017-06-23 15:42:00 +0100556<p><b>benchmark_tests:</b> Enable the build of the benchmark tests</p>
557<p><b>pmu:</b> Enable the PMU cycle counter to measure execution time in benchmark tests. (Your device needs to support it)</p>
Kaizen8938bd32017-09-28 14:38:23 +0100558<p><b>mali:</b> 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)</p>
Anthony Barbierdbdab852017-06-23 15:42:00 +0100559<p><b>openmp</b> Build in the OpenMP scheduler for NEON.</p>
560<dl class="section note"><dt>Note</dt><dd>Only works when building with g++ not clang++</dd></dl>
561<p><b>cppthreads</b> Build in the C++11 scheduler for NEON.</p>
Kaizen8938bd32017-09-28 14:38:23 +0100562<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classarm__compute_1_1_scheduler.xhtml#aa35fa7aa123444c798c28d4ac8fe7546" title="Sets the user defined scheduler and makes it the active scheduler. ">arm_compute::Scheduler::set</a></dd></dl>
Anthony Barbier871448e2017-03-24 14:54:29 +0000563<h2><a class="anchor" id="S3_2_linux"></a>
Kaizen8938bd32017-09-28 14:38:23 +0100564Building for Linux</h2>
Anthony Barbier871448e2017-03-24 14:54:29 +0000565<h3><a class="anchor" id="S3_2_1_library"></a>
566How to build the library ?</h3>
Anthony Barbier46d59272017-05-04 09:15:15 +0100567<p>For Linux, the library was successfully built and tested using the following Linaro GCC toolchain:</p>
568<ul>
569<li>gcc-linaro-arm-linux-gnueabihf-4.9-2014.07_linux</li>
570<li>gcc-linaro-4.9-2016.02-x86_64_aarch64-linux-gnu</li>
571<li>gcc-linaro-6.3.1-2017.02-i686_aarch64-linux-gnu</li>
572</ul>
Anthony Barbier871448e2017-03-24 14:54:29 +0000573<dl class="section note"><dt>Note</dt><dd>If you are building with opencl=1 then scons will expect to find libOpenCL.so either in the current directory or in "build" (See the section below if you need a stub OpenCL library to link against)</dd></dl>
Kaizen8938bd32017-09-28 14:38:23 +0100574<p>To cross-compile the library in debug mode, with NEON only support, for Linux 32bit: </p>
575<pre class="fragment">scons Werror=1 -j8 debug=1 neon=1 opencl=0 os=linux arch=armv7a
576</pre><p>To cross-compile the library in asserts mode, with OpenCL only support, for Linux 64bit: </p>
577<pre class="fragment">scons Werror=1 -j8 debug=0 asserts=1 neon=0 opencl=1 embed_kernels=1 os=linux arch=arm64-v8a
578</pre><p>You can also compile the library natively on an ARM device by using <b>build=native</b>: </p>
579<pre class="fragment">scons Werror=1 -j8 debug=0 neon=1 opencl=0 os=linux arch=arm64-v8a build=native
Anthony Barbiera4376382017-04-12 15:12:46 +0100580scons Werror=1 -j8 debug=0 neon=1 opencl=0 os=linux arch=armv7a build=native
Anthony Barbierdbdab852017-06-23 15:42:00 +0100581</pre><dl class="section note"><dt>Note</dt><dd>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.</dd></dl>
Kaizen8938bd32017-09-28 14:38:23 +0100582<p>For example on a 64bit Debian based system you would have to install <b>g++-arm-linux-gnueabihf</b> </p>
583<pre class="fragment">apt-get install g++-arm-linux-gnueabihf
584</pre><p>Then run </p>
585<pre class="fragment">scons Werror=1 -j8 debug=0 neon=1 opencl=0 os=linux arch=armv7a build=cross_compile
586</pre><p>or simply remove the build parameter as build=cross_compile is the default value: </p>
587<pre class="fragment">scons Werror=1 -j8 debug=0 neon=1 opencl=0 os=linux arch=armv7a
Anthony Barbiera4376382017-04-12 15:12:46 +0100588</pre><dl class="section attention"><dt>Attention</dt><dd>To cross compile with opencl=1 you need to make sure to have a version of libOpenCL matching your target architecture.</dd></dl>
589<h3><a class="anchor" id="S3_2_2_examples"></a>
Anthony Barbier871448e2017-03-24 14:54:29 +0000590How to manually build the examples ?</h3>
591<p>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.</p>
Anthony Barbier46d59272017-05-04 09:15:15 +0100592<dl class="section note"><dt>Note</dt><dd>The following command lines assume the <a class="el" href="namespacearm__compute.xhtml">arm_compute</a> and libOpenCL binaries are present in the current directory or in the system library path. If this is not the case you can specify the location of the pre-built library with the compiler option -L. When building the OpenCL example the commands below assume that the CL headers are located in the include folder where the command is executed.</dd></dl>
Kaizen8938bd32017-09-28 14:38:23 +0100593<p>To cross compile a NEON example for Linux 32bit: </p>
594<pre class="fragment">arm-linux-gnueabihf-g++ examples/neon_convolution.cpp utils/Utils.cpp -I. -std=c++11 -mfpu=neon -L. -larm_compute -o neon_convolution
595</pre><p>To cross compile a NEON example for Linux 64bit: </p>
596<pre class="fragment">aarch64-linux-gnu-g++ examples/neon_convolution.cpp utils/Utils.cpp -I. -std=c++11 -L. -larm_compute -o neon_convolution
Anthony Barbier46d59272017-05-04 09:15:15 +0100597</pre><p>(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)</p>
Kaizen8938bd32017-09-28 14:38:23 +0100598<p>To cross compile an OpenCL example for Linux 32bit: </p>
599<pre class="fragment">arm-linux-gnueabihf-g++ examples/cl_convolution.cpp utils/Utils.cpp -I. -Iinclude -std=c++11 -mfpu=neon -L. -larm_compute -lOpenCL -o cl_convolution -DARM_COMPUTE_CL
600</pre><p>To cross compile an OpenCL example for Linux 64bit: </p>
601<pre class="fragment">aarch64-linux-gnu-g++ examples/cl_convolution.cpp utils/Utils.cpp -I. -Iinclude -std=c++11 -L. -larm_compute -lOpenCL -o cl_convolution -DARM_COMPUTE_CL
Anthony Barbier46d59272017-05-04 09:15:15 +0100602</pre><p>(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)</p>
Kaizen8938bd32017-09-28 14:38:23 +0100603<p>To compile natively (i.e directly on an ARM device) for NEON for Linux 32bit: </p>
604<pre class="fragment">g++ examples/neon_convolution.cpp utils/Utils.cpp -I. -std=c++11 -mfpu=neon -larm_compute -o neon_convolution
605</pre><p>To compile natively (i.e directly on an ARM device) for NEON for Linux 64bit: </p>
606<pre class="fragment">g++ examples/neon_convolution.cpp utils/Utils.cpp -I. -std=c++11 -larm_compute -o neon_convolution
Anthony Barbier46d59272017-05-04 09:15:15 +0100607</pre><p>(notice the only difference with the 32 bit command is that we don't need the -mfpu option)</p>
Kaizen8938bd32017-09-28 14:38:23 +0100608<p>To compile natively (i.e directly on an ARM device) for OpenCL for Linux 32bit or Linux 64bit: </p>
609<pre class="fragment">g++ examples/cl_convolution.cpp utils/Utils.cpp -I. -Iinclude -std=c++11 -larm_compute -lOpenCL -o cl_convolution -DARM_COMPUTE_CL
Anthony Barbier871448e2017-03-24 14:54:29 +0000610</pre><dl class="section note"><dt>Note</dt><dd>These two commands assume libarm_compute.so is available in your library path, if not add the path to it using -L</dd></dl>
Kaizen8938bd32017-09-28 14:38:23 +0100611<p>To run the built executable simply run: </p>
612<pre class="fragment">LD_LIBRARY_PATH=build ./neon_convolution
613</pre><p>or </p>
614<pre class="fragment">LD_LIBRARY_PATH=build ./cl_convolution
Anthony Barbier871448e2017-03-24 14:54:29 +0000615</pre><dl class="section note"><dt>Note</dt><dd>If you built the library with support for both OpenCL and NEON you will need to link against OpenCL even if your application only uses NEON.</dd></dl>
616<h2><a class="anchor" id="S3_3_android"></a>
Kaizen8938bd32017-09-28 14:38:23 +0100617Building for Android</h2>
618<p>For Android, the library was successfully built and tested using Google's standalone toolchains:</p>
619<ul>
Anthony Barbier871448e2017-03-24 14:54:29 +0000620<li>arm-linux-androideabi-4.9 for armv7a (clang++)</li>
621<li>aarch64-linux-android-4.9 for arm64-v8a (g++)</li>
622</ul>
623<p>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></p>
624<ul>
Anthony Barbierdbdab852017-06-23 15:42:00 +0100625<li>Download the NDK r14 from here: <a href="https://developer.android.com/ndk/downloads/index.html">https://developer.android.com/ndk/downloads/index.html</a></li>
Anthony Barbier871448e2017-03-24 14:54:29 +0000626<li>Make sure you have Python 2 installed on your machine.</li>
627<li>Generate the 32 and/or 64 toolchains by running the following commands:</li>
628</ul>
629<pre class="fragment">$NDK/build/tools/make_standalone_toolchain.py --arch arm64 --install-dir $MY_TOOLCHAINS/aarch64-linux-android-4.9 --stl gnustl
630$NDK/build/tools/make_standalone_toolchain.py --arch arm --install-dir $MY_TOOLCHAINS/arm-linux-androideabi-4.9 --stl gnustl
631</pre><dl class="section attention"><dt>Attention</dt><dd>Due to some NDK issues make sure you use g++ &amp; gnustl for aarch64 and clang++ &amp; gnustl for armv7</dd></dl>
632<dl class="section note"><dt>Note</dt><dd>Make sure to add the toolchains to your PATH: export PATH=$PATH:$MY_TOOLCHAINS/aarch64-linux-android-4.9/bin:$MY_TOOLCHAINS/arm-linux-androideabi-4.9/bin</dd></dl>
633<h3><a class="anchor" id="S3_3_1_library"></a>
634How to build the library ?</h3>
635<dl class="section note"><dt>Note</dt><dd>If you are building with opencl=1 then scons will expect to find libOpenCL.so either in the current directory or in "build" (See the section below if you need a stub OpenCL library to link against)</dd></dl>
Kaizen8938bd32017-09-28 14:38:23 +0100636<p>To cross-compile the library in debug mode, with NEON only support, for Android 32bit: </p>
637<pre class="fragment">CXX=clang++ CC=clang scons Werror=1 -j8 debug=1 neon=1 opencl=0 os=android arch=armv7a
638</pre><p>To cross-compile the library in asserts mode, with OpenCL only support, for Android 64bit: </p>
639<pre class="fragment">scons Werror=1 -j8 debug=0 asserts=1 neon=0 opencl=1 embed_kernels=1 os=android arch=arm64-v8a
Anthony Barbier871448e2017-03-24 14:54:29 +0000640</pre><h3><a class="anchor" id="S3_3_2_examples"></a>
641How to manually build the examples ?</h3>
642<p>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.</p>
Anthony Barbierdbdab852017-06-23 15:42:00 +0100643<dl class="section note"><dt>Note</dt><dd>The following command lines assume the <a class="el" href="namespacearm__compute.xhtml">arm_compute</a> and libOpenCL binaries are present in the current directory or in the system library path. If this is not the case you can specify the location of the pre-built library with the compiler option -L. When building the OpenCL example the commands below assume that the CL headers are located in the include folder where the command is executed.</dd></dl>
Anthony Barbier871448e2017-03-24 14:54:29 +0000644<p>Once you've got your Android standalone toolchain built and added to your path you can do the following:</p>
Kaizen8938bd32017-09-28 14:38:23 +0100645<p>To cross compile a NEON example: </p>
646<pre class="fragment">#32 bit:
Anthony Barbierdbdab852017-06-23 15:42:00 +0100647arm-linux-androideabi-clang++ examples/neon_convolution.cpp utils/Utils.cpp -I. -Iinclude -std=c++11 -larm_compute-static -L. -o neon_convolution_arm -static-libstdc++ -pie
Anthony Barbier871448e2017-03-24 14:54:29 +0000648#64 bit:
Anthony Barbierdbdab852017-06-23 15:42:00 +0100649aarch64-linux-android-g++ examples/neon_convolution.cpp utils/Utils.cpp -I. -Iinclude -std=c++11 -larm_compute-static -L. -o neon_convolution_aarch64 -static-libstdc++ -pie
Kaizen8938bd32017-09-28 14:38:23 +0100650</pre><p>To cross compile an OpenCL example: </p>
651<pre class="fragment">#32 bit:
652arm-linux-androideabi-clang++ examples/cl_convolution.cpp utils/Utils.cpp -I. -Iinclude -std=c++11 -larm_compute-static -L. -o cl_convolution_arm -static-libstdc++ -pie -lOpenCL -DARM_COMPUTE_CL
Anthony Barbier871448e2017-03-24 14:54:29 +0000653#64 bit:
Kaizen8938bd32017-09-28 14:38:23 +0100654aarch64-linux-android-g++ examples/cl_convolution.cpp utils/Utils.cpp -I. -Iinclude -std=c++11 -larm_compute-static -L. -o cl_convolution_aarch64 -static-libstdc++ -pie -lOpenCL -DARM_COMPUTE_CL
Anthony Barbier871448e2017-03-24 14:54:29 +0000655</pre><dl class="section note"><dt>Note</dt><dd>Due to some issues in older versions of the Mali OpenCL DDK (&lt;= r13p0), we recommend to link <a class="el" href="namespacearm__compute.xhtml">arm_compute</a> statically on Android.</dd></dl>
Kaizen8938bd32017-09-28 14:38:23 +0100656<p>Then you need to do is upload the executable and the shared library to the device using ADB: </p>
657<pre class="fragment">adb push neon_convolution_arm /data/local/tmp/
Anthony Barbier871448e2017-03-24 14:54:29 +0000658adb push cl_convolution_arm /data/local/tmp/
659adb shell chmod 777 -R /data/local/tmp/
Kaizen8938bd32017-09-28 14:38:23 +0100660</pre><p>And finally to run the example: </p>
661<pre class="fragment">adb shell /data/local/tmp/neon_convolution_arm
Anthony Barbier871448e2017-03-24 14:54:29 +0000662adb shell /data/local/tmp/cl_convolution_arm
Kaizen8938bd32017-09-28 14:38:23 +0100663</pre><p>For 64bit: </p>
664<pre class="fragment">adb push neon_convolution_aarch64 /data/local/tmp/
Anthony Barbier871448e2017-03-24 14:54:29 +0000665adb push cl_convolution_aarch64 /data/local/tmp/
666adb shell chmod 777 -R /data/local/tmp/
Kaizen8938bd32017-09-28 14:38:23 +0100667</pre><p>And finally to run the example: </p>
668<pre class="fragment">adb shell /data/local/tmp/neon_convolution_aarch64
Anthony Barbier871448e2017-03-24 14:54:29 +0000669adb shell /data/local/tmp/cl_convolution_aarch64
Kaizen8938bd32017-09-28 14:38:23 +0100670</pre><h2><a class="anchor" id="S3_4_windows_host"></a>
671Building on a Windows host system</h2>
672<p>Using <code>scons</code> directly from the Windows command line is known to cause problems. The reason seems to be that if <code>scons</code> is setup for cross-compilation it gets confused about Windows style paths (using backslashes). Thus it is recommended to follow one of the options outlined below.</p>
673<h3><a class="anchor" id="S3_4_1_ubuntu_on_windows"></a>
674Bash on Ubuntu on Windows</h3>
675<p>The best and easiest option is to use <a href="https://msdn.microsoft.com/en-gb/commandline/wsl/about">Ubuntu on Windows</a>. This feature is still marked as <em>beta</em> and thus might not be available. However, if it is building the library is as simple as opening a <em>Bash on Ubuntu on Windows</em> shell and following the general guidelines given above.</p>
676<h3><a class="anchor" id="S3_4_2_cygwin"></a>
677Cygwin</h3>
678<p>If the Windows subsystem for Linux is not available <a href="https://www.cygwin.com/">Cygwin</a> can be used to install and run <code>scons</code>. In addition to the default packages installed by Cygwin <code>scons</code> has to be selected in the installer. (<code>git</code> might also be useful but is not strictly required if you already have got the source code of the library.) Linaro provides pre-built versions of <a href="http://releases.linaro.org/components/toolchain/binaries/">GCC cross-compilers</a> that can be used from the Cygwin terminal. When building for Android the compiler is included in the Android standalone toolchain. After everything has been set up in the Cygwin terminal the general guide on building the library can be followed.</p>
679<h2><a class="anchor" id="S3_5_cl_stub_library"></a>
Anthony Barbier871448e2017-03-24 14:54:29 +0000680The OpenCL stub library</h2>
681<p>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 <a class="el" href="namespacearm__compute.xhtml">arm_compute</a> against.</p>
682<p>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.</p>
683<dl class="section warning"><dt>Warning</dt><dd>This OpenCL library provided is a stub and <em>not</em> a real implementation. You can use it to resolve OpenCL's symbols in <a class="el" href="namespacearm__compute.xhtml">arm_compute</a> 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.</dd></dl>
Kaizen8938bd32017-09-28 14:38:23 +0100684<p>To cross-compile the stub OpenCL library simply run: </p>
685<pre class="fragment">&lt;target-prefix&gt;-gcc -o libOpenCL.so -Iinclude opencl-1.2-stubs/opencl_stubs.c -fPIC -shared
686</pre><p>For example: </p>
687<pre class="fragment">&lt;target-prefix&gt;-gcc -o libOpenCL.so -Iinclude opencl-1.2-stubs/opencl_stubs.c -fPIC -shared
Anthony Barbier871448e2017-03-24 14:54:29 +0000688#Linux 32bit
689arm-linux-gnueabihf-gcc -o libOpenCL.so -Iinclude opencl-1.2-stubs/opencl_stubs.c -fPIC -shared
690#Linux 64bit
691aarch64-linux-gnu-gcc -o libOpenCL.so -Iinclude -shared opencl-1.2-stubs/opencl_stubs.c -fPIC
692#Android 32bit
693arm-linux-androideabi-clang -o libOpenCL.so -Iinclude -shared opencl-1.2-stubs/opencl_stubs.c -fPIC -shared
694#Android 64bit
Anthony Barbierdbdab852017-06-23 15:42:00 +0100695aarch64-linux-android-gcc -o libOpenCL.so -Iinclude -shared opencl-1.2-stubs/opencl_stubs.c -fPIC -shared</pre> </div></div><!-- contents -->
Anthony Barbier871448e2017-03-24 14:54:29 +0000696</div><!-- doc-content -->
697<!-- start footer part -->
698<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
699 <ul>
Kaizen8938bd32017-09-28 14:38:23 +0100700 <li class="footer">Generated on Thu Sep 28 2017 14:38:01 for Compute Library by
Anthony Barbier871448e2017-03-24 14:54:29 +0000701 <a href="http://www.doxygen.org/index.html">
Kaizen8938bd32017-09-28 14:38:23 +0100702 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
Anthony Barbier871448e2017-03-24 14:54:29 +0000703 </ul>
704</div>
705</body>
706</html>