Skip to content

Commit b3a371b

Browse files
JenkinsAnthonyBarbier
authored andcommitted
arm_compute v18.05
1 parent 67c8c91 commit b3a371b

File tree

9,954 files changed

+351691
-369891
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

9,954 files changed

+351691
-369891
lines changed

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
:warning: **Deprecation notice: QS8 and QS16 data types will be removed in the 18.05 release** (As far as we know nobody uses these data types, if you do or think they are useful please open an Issue or send us an email):warning:
2+
:warning: **Deprecation notice: QS8 and QS16 data types will be removed in the next release** (As far as we know nobody uses these data types, if you do or think they are useful please open an Issue or send us an email):warning:
33

44
Please report issues here: https://github.com/ARM-software/ComputeLibrary/issues
55
**Make sure you are using the latest version of the library before opening an issue. Thanks**
@@ -15,7 +15,7 @@ News:
1515
- Familiarity in developing compute-intensive applications and ideally industry experience of product development
1616
- Experience programming in assembly language.
1717

18-
Interested ? Contact us: [email protected]
18+
Interested ? Contact us: developer-compute@arm.com
1919
- Come talk to us: [Gian Marco will be presenting his work at the EVS](https://www.embedded-vision.com/summit/even-faster-cnns-exploring-new-class-winograd-algorithms)
2020

2121
Related projects:
@@ -27,6 +27,7 @@ Related projects:
2727

2828
Documentation available here:
2929

30+
- [v18.05](https://arm-software.github.io/ComputeLibrary/v18.05/)
3031
- [v18.03](https://arm-software.github.io/ComputeLibrary/v18.03/)
3132
- [v18.02](https://arm-software.github.io/ComputeLibrary/v18.02/)
3233
- [v18.01](https://arm-software.github.io/ComputeLibrary/v18.01/)
@@ -40,6 +41,8 @@ Documentation available here:
4041

4142
Binaries available here:
4243

44+
- [v18.05-linux](https://github.com/ARM-software/ComputeLibrary/releases/download/v18.05/arm_compute-v18.05-bin-linux.tar.gz)
45+
- [v18.05-android](https://github.com/ARM-software/ComputeLibrary/releases/download/v18.05/arm_compute-v18.05-bin-android.tar.gz)
4346
- [v18.03-linux](https://github.com/ARM-software/ComputeLibrary/releases/download/v18.03/arm_compute-v18.03-bin-linux.tar.gz)
4447
- [v18.03-android](https://github.com/ARM-software/ComputeLibrary/releases/download/v18.03/arm_compute-v18.03-bin-android.tar.gz)
4548
- [v18.02-linux](https://github.com/ARM-software/ComputeLibrary/releases/download/v18.02/arm_compute-v18.02-bin-linux.tar.gz)
@@ -53,6 +56,6 @@ Binaries available here:
5356
- [v17.04](https://github.com/ARM-software/ComputeLibrary/releases/download/v17.04/arm_compute-v17.04-bin.tar.gz)
5457
- [v17.03.1](https://github.com/ARM-software/ComputeLibrary/releases/download/v17.03.1/arm_compute-v17.03.1-bin.tar.gz)
5558

56-
59+
Support: developer-compute@arm.com
5760

5861
License & Contributions: The software is provided under MIT license. Contributions to this project are accepted under the same license.

SConscript

Lines changed: 22 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ import os.path
2424
import re
2525
import subprocess
2626

27-
VERSION = "v18.03"
28-
SONAME_VERSION="10.0.0"
27+
VERSION = "v18.05"
28+
SONAME_VERSION="11.0.0"
2929

3030
Import('env')
3131
Import('vars')
@@ -153,9 +153,6 @@ if env["build"] == "embed_only":
153153
arm_compute_env.Append(LINKFLAGS=['-Wl,--no-undefined'])
154154
arm_compute_env.Append(CPPPATH =[Dir("./src/core/").path] )
155155

156-
if env["os"] not in ["android", "bare_metal"]:
157-
arm_compute_env.Append(LIBS = ['pthread'])
158-
159156
arm_compute_env.Append(LIBS = ['dl'])
160157

161158
core_files = Glob('src/core/*.cpp')
@@ -170,6 +167,9 @@ runtime_files += Glob('src/runtime/CPP/functions/*.cpp')
170167
# CLHarrisCorners uses the Scheduler to run CPP kernels
171168
runtime_files += Glob('src/runtime/CPP/SingleThreadScheduler.cpp')
172169

170+
graph_files = Glob('src/graph/*.cpp')
171+
graph_files += Glob('src/graph/*/*.cpp')
172+
173173
if env['cppthreads']:
174174
runtime_files += Glob('src/runtime/CPP/CPPScheduler.cpp')
175175

@@ -182,21 +182,30 @@ if env['opencl']:
182182

183183
runtime_files += Glob('src/runtime/CL/*.cpp')
184184
runtime_files += Glob('src/runtime/CL/functions/*.cpp')
185+
runtime_files += Glob('src/runtime/CL/tuners/*.cpp')
186+
187+
graph_files += Glob('src/graph/backends/CL/*.cpp')
188+
185189

186190
if env['neon']:
187191
core_files += Glob('src/core/NEON/*.cpp')
188192
core_files += Glob('src/core/NEON/kernels/*.cpp')
189193

194+
core_files += Glob('src/core/NEON/kernels/arm_gemm/*.cpp')
195+
190196
# build winograd sources for either v7a / v8a
191197
core_files += Glob('src/core/NEON/kernels/convolution/*/*.cpp')
192198
core_files += Glob('src/core/NEON/kernels/convolution/winograd/*/*.cpp')
193199
arm_compute_env.Append(CPPPATH = ["arm_compute/core/NEON/kernels/winograd/", "arm_compute/core/NEON/kernels/assembly/"])
194200

201+
graph_files += Glob('src/graph/backends/NEON/*.cpp')
202+
195203
if env['arch'] == "armv7a":
196-
core_files += Glob('src/core/NEON/kernels/arm32/*.cpp')
204+
core_files += Glob('src/core/NEON/kernels/arm_gemm/kernels/a32_*/*.cpp')
205+
197206

198207
if "arm64-v8" in env['arch']:
199-
core_files += Glob('src/core/NEON/kernels/arm64/*.cpp')
208+
core_files += Glob('src/core/NEON/kernels/arm_gemm/kernels/a64_*/*.cpp')
200209

201210
runtime_files += Glob('src/runtime/NEON/*.cpp')
202211
runtime_files += Glob('src/runtime/NEON/functions/*.cpp')
@@ -211,6 +220,8 @@ if env['gles_compute']:
211220
runtime_files += Glob('src/runtime/GLES_COMPUTE/*.cpp')
212221
runtime_files += Glob('src/runtime/GLES_COMPUTE/functions/*.cpp')
213222

223+
graph_files += Glob('src/graph/backends/GLES/*.cpp')
224+
214225
arm_compute_core_a = build_library('arm_compute_core-static', core_files, static=True)
215226
Export('arm_compute_core_a')
216227

@@ -226,30 +237,14 @@ if env['os'] != 'bare_metal' and not env['standalone']:
226237
Depends(arm_compute_so, arm_compute_core_so)
227238
Export('arm_compute_so')
228239

229-
if env['neon'] and env['opencl']:
230-
Import('opencl')
231-
graph_files = Glob('src/graph/*.cpp')
232-
graph_files += Glob('src/graph/nodes/*.cpp')
233-
graph_files += Glob('src/graph/operations/*.cpp')
234-
235-
graph_files += Glob('src/graph/CL/*.cpp')
236-
graph_files += Glob('src/graph/NEON/*.cpp')
237-
238-
shared_graph_objects = [arm_compute_env.SharedObject(f) for f in graph_files]
239-
static_graph_objects = [arm_compute_env.StaticObject(f) for f in graph_files]
240+
arm_compute_graph_a = build_library('arm_compute_graph-static', graph_files, static=True, libs = [ arm_compute_a])
241+
Export('arm_compute_graph_a')
240242

241-
arm_compute_graph_a = build_library('arm_compute_graph-static', static_graph_objects, static=True, libs = [ arm_compute_a ])
242-
Export('arm_compute_graph_a')
243-
244-
arm_compute_env.Append(LIBPATH = ["#build/%s/opencl-1.2-stubs" % env['build_dir']])
245-
arm_compute_graph_so = build_library('arm_compute_graph', shared_graph_objects, static=False, libs = [ "arm_compute", "arm_compute_core"])
243+
if env['os'] != 'bare_metal' and not env['standalone']:
244+
arm_compute_graph_so = build_library('arm_compute_graph', graph_files, static=False, libs = [ "arm_compute" , "arm_compute_core"])
246245
Depends(arm_compute_graph_so, arm_compute_so)
247-
Depends(arm_compute_graph_so, opencl)
248246
Export('arm_compute_graph_so')
249247

250-
graph_alias = arm_compute_env.Alias("arm_compute_graph", [arm_compute_graph_a, arm_compute_graph_so])
251-
Default(graph_alias)
252-
253248
if env['standalone']:
254249
alias = arm_compute_env.Alias("arm_compute", [arm_compute_a])
255250
else:

SConstruct

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ vars.AddVariables(
5454
BoolVariable("openmp", "Enable OpenMP backend", False),
5555
BoolVariable("cppthreads", "Enable C++11 threads backend", True),
5656
PathVariable("build_dir", "Specify sub-folder for the build", ".", PathVariable.PathAccept),
57-
("extra_cxx_flags", "Extra CXX flags to be appended to the build command", "")
57+
("extra_cxx_flags", "Extra CXX flags to be appended to the build command", ""),
58+
("compiler_cache", "Command to prefix to the C and C++ compiler (e.g ccache)", "")
5859
)
5960

6061
env = Environment(platform="posix", variables=vars, ENV = os.environ)
@@ -97,10 +98,10 @@ default_c_compiler = 'gcc' if env['os'] != 'android' else 'clang'
9798
cpp_compiler = os.environ.get('CXX', default_cpp_compiler)
9899
c_compiler = os.environ.get('CC', default_c_compiler)
99100

100-
if env['os'] == 'android' and ( cpp_compiler != 'clang++' or c_compiler != 'clang'):
101+
if env['os'] == 'android' and ( 'clang++' not in cpp_compiler or 'clang' not in c_compiler ):
101102
print "WARNING: Only clang is officially supported to build the Compute Library for Android"
102103

103-
if cpp_compiler == 'clang++':
104+
if 'clang++' in cpp_compiler:
104105
env.Append(CXXFLAGS = ['-Wno-format-nonliteral','-Wno-deprecated-increment-bool','-Wno-vla-extension','-Wno-mismatched-tags'])
105106
else:
106107
env.Append(CXXFLAGS = ['-Wlogical-op','-Wnoexcept','-Wstrict-null-sentinel'])
@@ -109,7 +110,7 @@ if env['cppthreads']:
109110
env.Append(CPPDEFINES = [('ARM_COMPUTE_CPP_SCHEDULER', 1)])
110111

111112
if env['openmp']:
112-
if cpp_compiler == 'clang++':
113+
if 'clang++' in cpp_compiler:
113114
print "Clang does not support OpenMP. Use scheduler=cpp."
114115
Exit(1)
115116

@@ -132,19 +133,20 @@ if env['arch'] == 'armv7a':
132133
env.Append(CXXFLAGS = ['-mfloat-abi=softfp'])
133134
elif env['arch'] == 'arm64-v8a':
134135
env.Append(CXXFLAGS = ['-march=armv8-a'])
135-
env.Append(CPPDEFINES = ['ARM_COMPUTE_AARCH64_V8A'])
136+
env.Append(CPPDEFINES = ['ARM_COMPUTE_AARCH64_V8A','NO_DOT_IN_TOOLCHAIN'])
136137
if env['os'] == 'linux':
137138
prefix = "aarch64-linux-gnu-"
138139
elif env['os'] == 'bare_metal':
139140
prefix = "aarch64-elf-"
140141
elif env['os'] == 'android':
141142
prefix = "aarch64-linux-android-"
143+
if 'clang++' in cpp_compiler:
144+
env.Append(CXXFLAGS = ['-no-integrated-as'])
142145
elif env['arch'] == 'arm64-v8.2-a':
143146
env.Append(CXXFLAGS = ['-march=armv8.2-a+fp16']) # explicitly enable fp16 extension otherwise __ARM_FEATURE_FP16_VECTOR_ARITHMETIC is undefined
144-
env.Append(CPPDEFINES = ['ARM_COMPUTE_AARCH64_V8_2'])
145-
if cpp_compiler == 'clang++':
146-
env.Append(CXXFLAGS = ['-fno-integrated-as'])
147-
147+
env.Append(CPPDEFINES = ['ARM_COMPUTE_AARCH64_V8_2','NO_DOT_IN_TOOLCHAIN'])
148+
if 'clang++' in cpp_compiler:
149+
env.Append(CXXFLAGS = ['-no-integrated-as'])
148150
if env['os'] == 'linux':
149151
prefix = "aarch64-linux-gnu-"
150152
elif env['os'] == 'bare_metal':
@@ -161,8 +163,8 @@ elif env['arch'] == 'x86_64':
161163
if env['build'] == 'native':
162164
prefix = ""
163165

164-
env['CC'] = prefix + c_compiler
165-
env['CXX'] = prefix + cpp_compiler
166+
env['CC'] = env['compiler_cache']+" "+prefix + c_compiler
167+
env['CXX'] = env['compiler_cache']+" "+prefix + cpp_compiler
166168
env['LD'] = prefix + "ld"
167169
env['AS'] = prefix + "as"
168170
env['AR'] = prefix + "ar"
@@ -175,7 +177,7 @@ if not GetOption("help"):
175177
print("ERROR: Compiler '%s' not found" % env['CXX'])
176178
Exit(1)
177179

178-
if cpp_compiler == 'g++':
180+
if 'clang++' not in cpp_compiler:
179181
if env['arch'] == 'arm64-v8.2-a' and not version_at_least(compiler_ver, '6.2.1'):
180182
print "GCC 6.2.1 or newer is required to compile armv8.2-a code"
181183
Exit(1)
@@ -192,8 +194,6 @@ if not GetOption("help"):
192194
if env['standalone']:
193195
env.Append(CXXFLAGS = ['-fPIC'])
194196
env.Append(LINKFLAGS = ['-static-libgcc','-static-libstdc++'])
195-
if env['cppthreads']:
196-
env.Append(LINKFLAGS = ['-lpthread'])
197197

198198
if env['Werror']:
199199
env.Append(CXXFLAGS = ['-Werror'])
@@ -210,9 +210,17 @@ elif env['os'] == 'bare_metal':
210210

211211
if env['opencl']:
212212
if env['os'] in ['bare_metal'] or env['standalone']:
213-
print("Cannot link OpenCL statically, which is required on bare metal")
213+
print("Cannot link OpenCL statically, which is required for bare metal / standalone builds")
214214
Exit(1)
215215

216+
if env['gles_compute']:
217+
if env['os'] in ['bare_metal'] or env['standalone']:
218+
print("Cannot link OpenGLES statically, which is required for bare metal / standalone builds")
219+
Exit(1)
220+
221+
if env["os"] not in ["android", "bare_metal"] and (env['opencl'] or env['cppthreads']):
222+
env.Append(LIBS = ['pthread'])
223+
216224
if env['opencl'] or env['gles_compute']:
217225
if env['embed_kernels']:
218226
env.Append(CPPDEFINES = ['EMBEDDED_KERNELS'])
@@ -242,7 +250,6 @@ if env['opencl']:
242250

243251
if env['gles_compute'] and env['os'] != 'android':
244252
env.Append(CPPPATH = ['#/include/linux'])
245-
env.Append(LIBPATH = ["#build/%s/opengles-3.1-stubs" % env['build_dir']])
246253
SConscript("./opengles-3.1-stubs/SConscript", variant_dir="build/%s/opengles-3.1-stubs" % env['build_dir'], duplicate=0)
247254

248255
SConscript('./SConscript', variant_dir='#build/%s' % env['build_dir'], duplicate=0)

arm_compute/core/AccessWindowAutoPadding.h

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,25 @@ class AccessWindowAutoPadding : public IAccessWindow
5252
* @param[in,out] info Tensor info of the accessed kernel.
5353
*/
5454
AccessWindowAutoPadding(ITensorInfo *info);
55+
/** Prevent instances of this class from being copied (As this class contains pointers) */
5556
AccessWindowAutoPadding(const AccessWindowAutoPadding &) = delete;
57+
/** Prevent instances of this class from being copied (As this class contains pointers) */
5658
AccessWindowAutoPadding &operator=(const AccessWindowAutoPadding &) = delete;
57-
AccessWindowAutoPadding(AccessWindowAutoPadding &&) = default;
59+
/** Allow instances of this class to be move constructed */
60+
AccessWindowAutoPadding(AccessWindowAutoPadding &&) = default;
61+
/** Allow instances of this class to be moved */
5862
AccessWindowAutoPadding &operator=(AccessWindowAutoPadding &&) = default;
59-
~AccessWindowAutoPadding() = default;
63+
/** Default destructor */
64+
~AccessWindowAutoPadding() = default;
6065

6166
/** Set the valid region to match the entire tensor. */
6267
void set_valid_region();
6368

64-
/** Return a valid region that spans across the entire tensor. */
69+
/** Return a valid region that spans across the entire tensor.
70+
*
71+
* @return a valid region.
72+
*
73+
*/
6574
ValidRegion compute_valid_region() const;
6675

6776
// Inherited methods overridden:

arm_compute/core/AccessWindowStatic.h

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,16 @@ class AccessWindowStatic : public IAccessWindow
5656
*/
5757
AccessWindowStatic(ITensorInfo *info, int start_x, int start_y, int end_x, int end_y);
5858

59+
/** Prevent instances of this class from being copied (As this class contains pointers) */
5960
AccessWindowStatic(const AccessWindowStatic &) = delete;
61+
/** Prevent instances of this class from being copied (As this class contains pointers) */
6062
AccessWindowStatic &operator=(const AccessWindowStatic &) = delete;
61-
AccessWindowStatic(AccessWindowStatic &&) = default;
63+
/** Allow instances of this class to be move constructed */
64+
AccessWindowStatic(AccessWindowStatic &&) = default;
65+
/** Allow instances of this class to be moved */
6266
AccessWindowStatic &operator=(AccessWindowStatic &&) = default;
63-
~AccessWindowStatic() = default;
67+
/** Default destructor */
68+
~AccessWindowStatic() = default;
6469

6570
/** Set the valid region based on the static access pattern and valid
6671
* region of the inputs.
@@ -74,6 +79,9 @@ class AccessWindowStatic : public IAccessWindow
7479
*
7580
* @param[in] window Execution window of the kernel.
7681
* @param[in] input_valid_region Combined valid region of all inputs.
82+
*
83+
* @return a valid region.
84+
*
7785
*/
7886
ValidRegion compute_valid_region(const Window &window, ValidRegion input_valid_region) const;
7987

@@ -82,6 +90,7 @@ class AccessWindowStatic : public IAccessWindow
8290
bool update_padding_if_needed(const Window &window) override;
8391
ValidRegion compute_valid_region(const Window &window, ValidRegion input_valid_region, bool border_undefined, BorderSize border_size) const override;
8492

93+
private:
8594
ITensorInfo *_info;
8695
int _start_x;
8796
int _start_y;

0 commit comments

Comments
 (0)