Skip to content

Commit

Permalink
arm_compute v18.05
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins authored and AnthonyBarbier committed May 23, 2018
1 parent 67c8c91 commit b3a371b
Show file tree
Hide file tree
Showing 9,954 changed files with 351,691 additions and 369,891 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

: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:
: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:

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**
Expand All @@ -15,7 +15,7 @@ News:
- Familiarity in developing compute-intensive applications and ideally industry experience of product development
- Experience programming in assembly language.

Interested ? Contact us: [email protected]
Interested ? Contact us: developer-compute@arm.com
- 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)

Related projects:
Expand All @@ -27,6 +27,7 @@ Related projects:

Documentation available here:

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

Binaries available here:

- [v18.05-linux](https://github.com/ARM-software/ComputeLibrary/releases/download/v18.05/arm_compute-v18.05-bin-linux.tar.gz)
- [v18.05-android](https://github.com/ARM-software/ComputeLibrary/releases/download/v18.05/arm_compute-v18.05-bin-android.tar.gz)
- [v18.03-linux](https://github.com/ARM-software/ComputeLibrary/releases/download/v18.03/arm_compute-v18.03-bin-linux.tar.gz)
- [v18.03-android](https://github.com/ARM-software/ComputeLibrary/releases/download/v18.03/arm_compute-v18.03-bin-android.tar.gz)
- [v18.02-linux](https://github.com/ARM-software/ComputeLibrary/releases/download/v18.02/arm_compute-v18.02-bin-linux.tar.gz)
Expand All @@ -53,6 +56,6 @@ Binaries available here:
- [v17.04](https://github.com/ARM-software/ComputeLibrary/releases/download/v17.04/arm_compute-v17.04-bin.tar.gz)
- [v17.03.1](https://github.com/ARM-software/ComputeLibrary/releases/download/v17.03.1/arm_compute-v17.03.1-bin.tar.gz)

Support: [email protected]
Support: developer-compute@arm.com

License & Contributions: The software is provided under MIT license. Contributions to this project are accepted under the same license.
49 changes: 22 additions & 27 deletions SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import os.path
import re
import subprocess

VERSION = "v18.03"
SONAME_VERSION="10.0.0"
VERSION = "v18.05"
SONAME_VERSION="11.0.0"

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

if env["os"] not in ["android", "bare_metal"]:
arm_compute_env.Append(LIBS = ['pthread'])

arm_compute_env.Append(LIBS = ['dl'])

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

graph_files = Glob('src/graph/*.cpp')
graph_files += Glob('src/graph/*/*.cpp')

if env['cppthreads']:
runtime_files += Glob('src/runtime/CPP/CPPScheduler.cpp')

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

runtime_files += Glob('src/runtime/CL/*.cpp')
runtime_files += Glob('src/runtime/CL/functions/*.cpp')
runtime_files += Glob('src/runtime/CL/tuners/*.cpp')

graph_files += Glob('src/graph/backends/CL/*.cpp')


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

core_files += Glob('src/core/NEON/kernels/arm_gemm/*.cpp')

# build winograd 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/winograd/", "arm_compute/core/NEON/kernels/assembly/"])

graph_files += Glob('src/graph/backends/NEON/*.cpp')

if env['arch'] == "armv7a":
core_files += Glob('src/core/NEON/kernels/arm32/*.cpp')
core_files += Glob('src/core/NEON/kernels/arm_gemm/kernels/a32_*/*.cpp')


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

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

graph_files += Glob('src/graph/backends/GLES/*.cpp')

arm_compute_core_a = build_library('arm_compute_core-static', core_files, static=True)
Export('arm_compute_core_a')

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

if env['neon'] and env['opencl']:
Import('opencl')
graph_files = Glob('src/graph/*.cpp')
graph_files += Glob('src/graph/nodes/*.cpp')
graph_files += Glob('src/graph/operations/*.cpp')

graph_files += Glob('src/graph/CL/*.cpp')
graph_files += Glob('src/graph/NEON/*.cpp')

shared_graph_objects = [arm_compute_env.SharedObject(f) for f in graph_files]
static_graph_objects = [arm_compute_env.StaticObject(f) for f in graph_files]
arm_compute_graph_a = build_library('arm_compute_graph-static', graph_files, static=True, libs = [ arm_compute_a])
Export('arm_compute_graph_a')

arm_compute_graph_a = build_library('arm_compute_graph-static', static_graph_objects, static=True, libs = [ arm_compute_a ])
Export('arm_compute_graph_a')

arm_compute_env.Append(LIBPATH = ["#build/%s/opencl-1.2-stubs" % env['build_dir']])
arm_compute_graph_so = build_library('arm_compute_graph', shared_graph_objects, static=False, libs = [ "arm_compute", "arm_compute_core"])
if env['os'] != 'bare_metal' and not env['standalone']:
arm_compute_graph_so = build_library('arm_compute_graph', graph_files, static=False, libs = [ "arm_compute" , "arm_compute_core"])
Depends(arm_compute_graph_so, arm_compute_so)
Depends(arm_compute_graph_so, opencl)
Export('arm_compute_graph_so')

graph_alias = arm_compute_env.Alias("arm_compute_graph", [arm_compute_graph_a, arm_compute_graph_so])
Default(graph_alias)

if env['standalone']:
alias = arm_compute_env.Alias("arm_compute", [arm_compute_a])
else:
Expand Down
39 changes: 23 additions & 16 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ vars.AddVariables(
BoolVariable("openmp", "Enable OpenMP backend", False),
BoolVariable("cppthreads", "Enable C++11 threads backend", True),
PathVariable("build_dir", "Specify sub-folder for the build", ".", PathVariable.PathAccept),
("extra_cxx_flags", "Extra CXX flags to be appended to the build command", "")
("extra_cxx_flags", "Extra CXX flags to be appended to the build command", ""),
("compiler_cache", "Command to prefix to the C and C++ compiler (e.g ccache)", "")
)

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

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

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

if env['openmp']:
if cpp_compiler == 'clang++':
if 'clang++' in cpp_compiler:
print "Clang does not support OpenMP. Use scheduler=cpp."
Exit(1)

Expand All @@ -132,19 +133,20 @@ if env['arch'] == 'armv7a':
env.Append(CXXFLAGS = ['-mfloat-abi=softfp'])
elif env['arch'] == 'arm64-v8a':
env.Append(CXXFLAGS = ['-march=armv8-a'])
env.Append(CPPDEFINES = ['ARM_COMPUTE_AARCH64_V8A'])
env.Append(CPPDEFINES = ['ARM_COMPUTE_AARCH64_V8A','NO_DOT_IN_TOOLCHAIN'])
if env['os'] == 'linux':
prefix = "aarch64-linux-gnu-"
elif env['os'] == 'bare_metal':
prefix = "aarch64-elf-"
elif env['os'] == 'android':
prefix = "aarch64-linux-android-"
if 'clang++' in cpp_compiler:
env.Append(CXXFLAGS = ['-no-integrated-as'])
elif env['arch'] == 'arm64-v8.2-a':
env.Append(CXXFLAGS = ['-march=armv8.2-a+fp16']) # explicitly enable fp16 extension otherwise __ARM_FEATURE_FP16_VECTOR_ARITHMETIC is undefined
env.Append(CPPDEFINES = ['ARM_COMPUTE_AARCH64_V8_2'])
if cpp_compiler == 'clang++':
env.Append(CXXFLAGS = ['-fno-integrated-as'])

env.Append(CPPDEFINES = ['ARM_COMPUTE_AARCH64_V8_2','NO_DOT_IN_TOOLCHAIN'])
if 'clang++' in cpp_compiler:
env.Append(CXXFLAGS = ['-no-integrated-as'])
if env['os'] == 'linux':
prefix = "aarch64-linux-gnu-"
elif env['os'] == 'bare_metal':
Expand All @@ -161,8 +163,8 @@ elif env['arch'] == 'x86_64':
if env['build'] == 'native':
prefix = ""

env['CC'] = prefix + c_compiler
env['CXX'] = prefix + cpp_compiler
env['CC'] = env['compiler_cache']+" "+prefix + c_compiler
env['CXX'] = env['compiler_cache']+" "+prefix + cpp_compiler
env['LD'] = prefix + "ld"
env['AS'] = prefix + "as"
env['AR'] = prefix + "ar"
Expand All @@ -175,7 +177,7 @@ if not GetOption("help"):
print("ERROR: Compiler '%s' not found" % env['CXX'])
Exit(1)

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

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

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

if env['gles_compute']:
if env['os'] in ['bare_metal'] or env['standalone']:
print("Cannot link OpenGLES statically, which is required for bare metal / standalone builds")
Exit(1)

if env["os"] not in ["android", "bare_metal"] and (env['opencl'] or env['cppthreads']):
env.Append(LIBS = ['pthread'])

if env['opencl'] or env['gles_compute']:
if env['embed_kernels']:
env.Append(CPPDEFINES = ['EMBEDDED_KERNELS'])
Expand Down Expand Up @@ -242,7 +250,6 @@ if env['opencl']:

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

SConscript('./SConscript', variant_dir='#build/%s' % env['build_dir'], duplicate=0)
Expand Down
15 changes: 12 additions & 3 deletions arm_compute/core/AccessWindowAutoPadding.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,25 @@ class AccessWindowAutoPadding : public IAccessWindow
* @param[in,out] info Tensor info of the accessed kernel.
*/
AccessWindowAutoPadding(ITensorInfo *info);
/** Prevent instances of this class from being copied (As this class contains pointers) */
AccessWindowAutoPadding(const AccessWindowAutoPadding &) = delete;
/** Prevent instances of this class from being copied (As this class contains pointers) */
AccessWindowAutoPadding &operator=(const AccessWindowAutoPadding &) = delete;
AccessWindowAutoPadding(AccessWindowAutoPadding &&) = default;
/** Allow instances of this class to be move constructed */
AccessWindowAutoPadding(AccessWindowAutoPadding &&) = default;
/** Allow instances of this class to be moved */
AccessWindowAutoPadding &operator=(AccessWindowAutoPadding &&) = default;
~AccessWindowAutoPadding() = default;
/** Default destructor */
~AccessWindowAutoPadding() = default;

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

/** Return a valid region that spans across the entire tensor. */
/** Return a valid region that spans across the entire tensor.
*
* @return a valid region.
*
*/
ValidRegion compute_valid_region() const;

// Inherited methods overridden:
Expand Down
13 changes: 11 additions & 2 deletions arm_compute/core/AccessWindowStatic.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,16 @@ class AccessWindowStatic : public IAccessWindow
*/
AccessWindowStatic(ITensorInfo *info, int start_x, int start_y, int end_x, int end_y);

/** Prevent instances of this class from being copied (As this class contains pointers) */
AccessWindowStatic(const AccessWindowStatic &) = delete;
/** Prevent instances of this class from being copied (As this class contains pointers) */
AccessWindowStatic &operator=(const AccessWindowStatic &) = delete;
AccessWindowStatic(AccessWindowStatic &&) = default;
/** Allow instances of this class to be move constructed */
AccessWindowStatic(AccessWindowStatic &&) = default;
/** Allow instances of this class to be moved */
AccessWindowStatic &operator=(AccessWindowStatic &&) = default;
~AccessWindowStatic() = default;
/** Default destructor */
~AccessWindowStatic() = default;

/** Set the valid region based on the static access pattern and valid
* region of the inputs.
Expand All @@ -74,6 +79,9 @@ class AccessWindowStatic : public IAccessWindow
*
* @param[in] window Execution window of the kernel.
* @param[in] input_valid_region Combined valid region of all inputs.
*
* @return a valid region.
*
*/
ValidRegion compute_valid_region(const Window &window, ValidRegion input_valid_region) const;

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

private:
ITensorInfo *_info;
int _start_x;
int _start_y;
Expand Down
Loading

0 comments on commit b3a371b

Please sign in to comment.