Skip to content

Commit

Permalink
arm_compute v20.11
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins committed Nov 27, 2020
1 parent 18b685f commit 49b8f90
Show file tree
Hide file tree
Showing 1,931 changed files with 112,181 additions and 84,637 deletions.
159 changes: 88 additions & 71 deletions Android.bp

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions README.md
Expand Up @@ -10,6 +10,10 @@ Please report issues here: https://github.com/ARM-software/ComputeLibrary/issues

**Make sure you are using the latest version of the library before opening an issue. Thanks**

Deprecation notice:
- We have deprecated the GLES backend and it will be removed from the library in the release 21.05
- We have deprecated the NEON and OpenCL computer vision functions and they will be removed in 21.05

News:

- [Gian Marco's talk on Performance Analysis for Optimizing Embedded Deep Learning Inference Software](https://www.embedded-vision.com/platinum-members/arm/embedded-vision-training/videos/pages/may-2019-embedded-vision-summit)
Expand Down Expand Up @@ -44,6 +48,3 @@ To indicate that you agree to the the terms of the DCO, you "sign off" your cont
```Signed-off-by: John Doe <john.doe@example.org>```

You must use your real name, no pseudonyms or anonymous contributions are accepted.

### Security Issues
If you believe you have discovered a security issue please contact MLG-Security@arm.com
37 changes: 17 additions & 20 deletions SConscript
Expand Up @@ -24,8 +24,8 @@ import os.path
import re
import subprocess

VERSION = "v20.08"
LIBRARY_VERSION_MAJOR = 20
VERSION = "v20.11"
LIBRARY_VERSION_MAJOR = 21
LIBRARY_VERSION_MINOR = 0
LIBRARY_VERSION_PATCH = 0
SONAME_VERSION = str(LIBRARY_VERSION_MAJOR) + "." + str(LIBRARY_VERSION_MINOR) + "." + str(LIBRARY_VERSION_PATCH)
Expand All @@ -48,20 +48,6 @@ def build_library(name, sources, static=False, libs=[]):
else:
if env['set_soname']:
obj = arm_compute_env.SharedLibrary(name, source=sources, SHLIBVERSION = SONAME_VERSION, LIBS = arm_compute_env["LIBS"] + libs)

symlinks = []
# Manually delete symlinks or SCons will get confused:
directory = os.path.dirname(obj[0].path)
library_prefix = obj[0].path[:-(1 + len(SONAME_VERSION))]
real_lib = "%s.%s" % (library_prefix, SONAME_VERSION)

for f in Glob("#%s.*" % library_prefix):
if str(f) != real_lib:
symlinks.append("%s/%s" % (directory,str(f)))

clean = arm_compute_env.Command('clean-%s' % str(obj[0]), [], Delete(symlinks))
Default(clean)
Depends(obj, clean)
else:
obj = arm_compute_env.SharedLibrary(name, source=sources, LIBS = arm_compute_env["LIBS"] + libs)

Expand Down Expand Up @@ -178,6 +164,7 @@ arm_compute_env.Append(LIBS = ['dl'])
core_files = Glob('src/core/*.cpp')
core_files += Glob('src/core/CPP/*.cpp')
core_files += Glob('src/core/CPP/kernels/*.cpp')
core_files += Glob('src/core/helpers/*.cpp')
core_files += Glob('src/core/utils/*.cpp')
core_files += Glob('src/core/utils/helpers/*.cpp')
core_files += Glob('src/core/utils/io/*.cpp')
Expand Down Expand Up @@ -228,11 +215,10 @@ if env['neon']:
# build winograd/depthwise sources for either v7a / v8a
core_files += Glob('src/core/NEON/kernels/convolution/*/*.cpp')
core_files += Glob('src/core/NEON/kernels/convolution/winograd/*/*.cpp')
arm_compute_env.Append(CPPPATH = ["arm_compute/core/NEON/kernels/convolution/common/",
"arm_compute/core/NEON/kernels/convolution/winograd/",
"arm_compute/core/NEON/kernels/convolution/depthwise/",
"src/core/NEON/kernels/assembly/",
arm_compute_env.Append(CPPPATH = ["src/core/NEON/kernels/convolution/common/",
"src/core/NEON/kernels/convolution/winograd/",
"src/core/NEON/kernels/convolution/depthwise/",
"src/core/NEON/kernels/assembly/",
"arm_compute/core/NEON/kernels/assembly/"])

graph_files += Glob('src/graph/backends/NEON/*.cpp')
Expand All @@ -245,6 +231,17 @@ if env['neon']:
if "sve" in env['arch']:
core_files += Glob('src/core/NEON/kernels/arm_gemm/kernels/sve_*/*.cpp')

if any(i in env['data_type_support'] for i in ['all', 'fp16']):
core_files += Glob('src/core/NEON/kernels/*/impl/fp16_*.cpp')
if any(i in env['data_type_support'] for i in ['all', 'fp32']):
core_files += Glob('src/core/NEON/kernels/*/impl/fp32_*.cpp')
if any(i in env['data_type_support'] for i in ['all', 'qasymm8']):
core_files += Glob('src/core/NEON/kernels/*/impl/qasymm8_neon*.cpp')
if any(i in env['data_type_support'] for i in ['all', 'qasymm8_signed']):
core_files += Glob('src/core/NEON/kernels/*/impl/qasymm8_signed_*.cpp')
if any(i in env['data_type_support'] for i in ['all', 'qsymm16']):
core_files += Glob('src/core/NEON/kernels/*/impl/qsymm16_*.cpp')

runtime_files += Glob('src/runtime/NEON/*.cpp')
runtime_files += Glob('src/runtime/NEON/functions/*.cpp')
runtime_files += Glob('src/runtime/NEON/functions/assembly/*.cpp')
Expand Down
38 changes: 30 additions & 8 deletions SConstruct
Expand Up @@ -25,12 +25,14 @@ import os
import subprocess

def version_at_least(version, required):
end = min(len(version), len(required))

for i in range(0, end, 2):
if int(version[i]) < int(required[i]):
version_list = version.split('.')
required_list = required.split('.')
end = min(len(version_list), len(required_list))
for i in range(0, end):
if int(version_list[i]) < int(required_list[i]):
return False
elif int(version[i]) > int(required[i]):
elif int(version_list[i]) > int(required_list[i]):
return True

return True
Expand All @@ -42,7 +44,7 @@ vars.AddVariables(
BoolVariable("logging", "Logging (this flag is forced to 1 for debug=1)", False),
EnumVariable("arch", "Target Architecture", "armv7a",
allowed_values=("armv7a", "arm64-v8a", "arm64-v8.2-a", "arm64-v8.2-a-sve", "x86_32", "x86_64",
"armv8a", "armv8.2-a", "armv8.2-a-sve", "armv8.6-a", "x86")),
"armv8a", "armv8.2-a", "armv8.2-a-sve", "armv8.6-a", "armv8.6-a-sve", "x86")),
EnumVariable("estate", "Execution State", "auto", allowed_values=("auto", "32", "64")),
EnumVariable("os", "Target OS", "linux", allowed_values=("linux", "android", "tizen", "bare_metal")),
EnumVariable("build", "Build type", "cross_compile", allowed_values=("native", "cross_compile", "embed_only")),
Expand All @@ -62,6 +64,8 @@ vars.AddVariables(
PathVariable("install_dir", "Specify sub-folder for the install", "", PathVariable.PathAccept),
BoolVariable("exceptions", "Enable/disable C++ exception support", True),
PathVariable("linker_script", "Use an external linker script", "", PathVariable.PathAccept),
ListVariable("custom_options", "Custom options that can be used to turn on/off features", "none", ["disable_mmla_fp"]),
ListVariable("data_type_support", "Enable a list of data types to support", "all", ["qasymm8", "qasymm8_signed", "qsymm16", "fp16", "fp32"]),
("toolchain_prefix", "Override the toolchain prefix", ""),
("compiler_prefix", "Override the compiler prefix", ""),
("extra_cxx_flags", "Extra CXX flags to be appended to the build command", ""),
Expand Down Expand Up @@ -204,7 +208,9 @@ elif 'v8' in env['arch']:
env.Append(CXXFLAGS = ['-march=armv8-a'])

if 'v8.6-a' in env['arch']:
env.Append(CPPDEFINES = ['MMLA_INT8', 'MMLA_FP32', 'V8P6', 'V8P6_BF', 'ARM_COMPUTE_FORCE_BF16'])
env.Append(CPPDEFINES = ['MMLA_INT8', 'V8P6', 'V8P6_BF', 'ARM_COMPUTE_FORCE_BF16'])
if "disable_mmla_fp" not in env['custom_options']:
env.Append(CPPDEFINES = ['MMLA_FP32'])

elif 'x86' in env['arch']:
if env['estate'] == '32':
Expand Down Expand Up @@ -256,7 +262,7 @@ env['RANLIB'] = prefix + "ranlib"

if not GetOption("help"):
try:
compiler_ver = subprocess.check_output(env['CXX'].split() + ["-dumpversion"]).strip()
compiler_ver = subprocess.check_output(env['CXX'].split() + ["-dumpversion"]).decode().strip()
except OSError:
print("ERROR: Compiler '%s' not found" % env['CXX'])
Exit(1)
Expand All @@ -277,6 +283,21 @@ if not GetOption("help"):
if compiler_ver == '4.8.3':
env.Append(CXXFLAGS = ['-Wno-array-bounds'])

if not version_at_least(compiler_ver, '7.0.0') and env['os'] == 'bare_metal':
env.Append(LINKFLAGS = ['-fstack-protector-strong'])

if env['data_type_support']:
if any(i in env['data_type_support'] for i in ['all', 'fp16']):
env.Append(CXXFLAGS = ['-DENABLE_FP16_KERNELS'])
if any(i in env['data_type_support'] for i in ['all', 'fp32']):
env.Append(CXXFLAGS = ['-DENABLE_FP32_KERNELS'])
if any(i in env['data_type_support'] for i in ['all', 'qasymm8']):
env.Append(CXXFLAGS = ['-DENABLE_QASYMM8_KERNELS'])
if any(i in env['data_type_support'] for i in ['all', 'qasymm8_signed']):
env.Append(CXXFLAGS = ['-DENABLE_QASYMM8_SIGNED_KERNELS'])
if any(i in env['data_type_support'] for i in ['all', 'qsymm16']):
env.Append(CXXFLAGS = ['-DENABLE_QSYMM16_KERNELS'])

if env['standalone']:
env.Append(CXXFLAGS = ['-fPIC'])
env.Append(LINKFLAGS = ['-static-libgcc','-static-libstdc++'])
Expand All @@ -293,6 +314,8 @@ elif env['os'] == 'bare_metal':
env.Append(CXXFLAGS = ['-fPIC'])
env.Append(CPPDEFINES = ['NO_MULTI_THREADING'])
env.Append(CPPDEFINES = ['BARE_METAL'])
if env['os'] == 'linux' and env['arch'] == 'armv7a':
env.Append(CXXFLAGS = [ '-Wno-psabi' ])

if env['opencl']:
if env['os'] in ['bare_metal'] or env['standalone']:
Expand Down Expand Up @@ -338,7 +361,6 @@ for dirname in os.listdir("./include"):

Export('version_at_least')


if env['gles_compute'] and env['os'] != 'android':
env.Append(CPPPATH = ['#/include/linux'])

Expand Down
69 changes: 69 additions & 0 deletions SECURITY.md
@@ -0,0 +1,69 @@
**Reporting vulnerabilities**

Arm takes security issues seriously and welcomes feedback from researchers and the security community in order to improve the security of its products and services. We operate a coordinated disclosure policy for disclosing vulnerabilities and other security issues.

Security issues can be complex and one single timescale doesn't fit all circumstances. We will make best endeavours to inform you when we expect security notifications and fixes to be available and facilitate coordinated disclosure when notifications and patches/mitigations are available.

**Report**

For all security issues, contact Arm by email at [arm-security@arm.com](mailto:arm-security@arm.com).


**Secure submission using PGP**

We support and encourage secure submission of vulnerability reports using PGP, using the key below. If you would like replies to be encrypted, please provide your own public key through a secure mechanism.

~~~
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFr7/RMBEACjHR5QZL/z1t2aLCRNXLE4KJiQmCo7edU5Be+7MTjIJDzZNu68
lNEUYRoLexeayif8eC4T19bUsSbGpxHiYsFFjV8ewL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9Lr3Vy3StgMciRUIP8m0XwARAQAB
iQI2BBgBCAAgFiEE33OoPBlEv+8XSKFx180p3PhsFGIFAlr7/RMCGwwACgkQ180p
3PhsFGLWMA//V/XKrnI2YBh/SptUrgg7knPXva45bb7tGSH1fJg8f/wqycOSFFCY
ES45boA5jlQ3z8uw6BYCz5KeOucGhxAMw+x5EDdxZ33ksY5zqXB35WaMXzEwGYYb
E113/yhOsTbzu4bBKABSXbJO98MdAWvWpyCpp2MHIR3S9+ycM7/FMZ5xi3czZNRg
9+WZP+7W4qWhJptQ0kBh5C3N/tiltju5WQ2Y7XIn+5dMOJdtseFS7CNerxXZGAtH
nfRxaD/4ENdbWOwaVJiVW7+ioUJz09OWgy0gLYSDW+hciDnW1QAaJLpdAbniGZ0S
JsTmaZla8JnUKqZPgbFfA2OcnH9H+DWc0pHv17c5tJzTMP7rgirgGRX/U2LOzmFZ
1UxjQj5nn3Oa5frXbIAzb8xKiR0VDaquCM/3sti1AesYiS0Gw0Sqnw8qpFypgFXN
CKVgYXppIT+TmbDbNJDOB2UycxeI4vbiBwU8fI4qSpW12WsGdAJt/rx3UsyhZ+02
4aSqDHzhJmtDPQ6lnaKe1fUkC90tgp8loVGmriWQx82jAQMqATVjIklTpE4vm00f
ocQIWOKEE90mKNEoV6rNbfl5QevmapTVdV/pmrRBzhbsa1uAUS4HZdH0Nf/OXEyv
yYCr2gCFPymkkRYhPr2w5EgbWyzLaBIwqjyIbXaveuB3DYi2Lhbf64I=
=EaN7
-----END PGP PUBLIC KEY BLOCK-----
~~~

For more information visit https://developer.arm.com/support/arm-security-updates/report-security-vulnerabilities
8 changes: 8 additions & 0 deletions arm_compute/core/CL/CLCompileContext.h
Expand Up @@ -118,6 +118,14 @@ class Program final
{
return _name;
}
/** Returns program binary data.
*
* @return Program's binary data.
*/
const std::vector<unsigned char> &binary() const
{
return _binary;
}
/** User-defined conversion to the underlying CL program.
*
* @return The CL program object.
Expand Down

0 comments on commit 49b8f90

Please sign in to comment.