Skip to content

Commit

Permalink
arm_compute v18.02
Browse files Browse the repository at this point in the history
Change-Id: I7207aa488e5470f235f39b6c188b4678dc38d1a6
  • Loading branch information
AnthonyBarbier committed Feb 23, 2018
1 parent 2922279 commit 06ea048
Show file tree
Hide file tree
Showing 6,837 changed files with 174,243 additions and 78,528 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@

: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
**Make sure you are using the latest version of the library before opening an issue. Thanks**

Related projects:

- [Caffe on Compute Library](https://github.com/OAID/caffeOnACL)
- [Caffe on Compute Library](https://github.com/OAID/Caffe-HRT)
- [Tutorial: Cartoonifying Images on Raspberry Pi with the Compute Library](https://community.arm.com/graphics/b/blog/posts/cartoonifying-images-on-raspberry-pi-with-the-compute-library)
- [Tutorial: Running AlexNet on Raspberry Pi with Compute Library](https://community.arm.com/processors/b/blog/posts/running-alexnet-on-raspberry-pi-with-compute-library)

Documentation available here:

- [v18.02](https://arm-software.github.io/ComputeLibrary/v18.02/)
- [v18.01](https://arm-software.github.io/ComputeLibrary/v18.01/)
- [v17.12](https://arm-software.github.io/ComputeLibrary/v17.12/)
- [v17.10](https://arm-software.github.io/ComputeLibrary/v17.10/)
Expand All @@ -20,6 +24,8 @@ Documentation available here:

Binaries available here:

- [v18.02-linux](https://github.com/ARM-software/ComputeLibrary/releases/download/v18.01/arm_compute-v18.02-bin-linux.tar.gz)
- [v18.02-android](https://github.com/ARM-software/ComputeLibrary/releases/download/v18.01/arm_compute-v18.02-bin-android.tar.gz)
- [v18.01](https://github.com/ARM-software/ComputeLibrary/releases/download/v18.01/arm_compute-v18.01-bin.tar.gz)
- [v17.12](https://github.com/ARM-software/ComputeLibrary/releases/download/v17.12/arm_compute-v17.12-bin.tar.gz)
- [v17.10](https://github.com/ARM-software/ComputeLibrary/releases/download/v17.10/arm_compute-v17.10-bin.tar.gz)
Expand Down
60 changes: 30 additions & 30 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.01"
SONAME_VERSION="7.0.0"
VERSION = "v18.02"
SONAME_VERSION="9.0.0"

Import('env')
Import('vars')
Expand Down Expand Up @@ -123,12 +123,34 @@ def create_version_file(target, source, env):
with open(target[0].get_path(), "w") as fd:
fd.write(build_info)


arm_compute_env = env.Clone()
# Don't allow undefined references in the libraries:
arm_compute_env.Append(LINKFLAGS=['-Wl,--no-undefined','-Wl,--no-allow-shlib-undefined'])

# Generate embed files
generate_embed = [ arm_compute_env.Command("src/core/arm_compute_version.embed", "", action=create_version_file) ]
if env['opencl'] and env['embed_kernels']:
cl_files = Glob('src/core/CL/cl_kernels/*.cl')
cl_files += Glob('src/core/CL/cl_kernels/*.h')

embed_files = [ f.get_path()+"embed" for f in cl_files ]
arm_compute_env.Append(CPPPATH =[Dir("./src/core/CL/").path] )

generate_embed.append(arm_compute_env.Command(embed_files, cl_files, action=resolve_includes))

if env['gles_compute'] and env['embed_kernels']:
cs_files = Glob('src/core/GLES_COMPUTE/cs_shaders/*.cs')
cs_files += Glob('src/core/GLES_COMPUTE/cs_shaders/*.h')

embed_files = [ f.get_path()+"embed" for f in cs_files ]
arm_compute_env.Append(CPPPATH =[Dir("./src/core/GLES_COMPUTE/").path] )

generate_embed.append(arm_compute_env.Command(embed_files, cs_files, action=resolve_includes))

Default(generate_embed)
if env["build"] == "embed_only":
Return()

# Don't allow undefined references in the libraries:
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"]:
Expand Down Expand Up @@ -161,24 +183,14 @@ if env['opencl']:
runtime_files += Glob('src/runtime/CL/*.cpp')
runtime_files += Glob('src/runtime/CL/functions/*.cpp')

# Generate embed files
if env['embed_kernels']:
cl_files = Glob('src/core/CL/cl_kernels/*.cl')
cl_files += Glob('src/core/CL/cl_kernels/*.h')

embed_files = [ f.get_path()+"embed" for f in cl_files ]
arm_compute_env.Append(CPPPATH =[Dir("./src/core/CL/").path] )

generate_embed.append(arm_compute_env.Command(embed_files, cl_files, action=resolve_includes))

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

# build winograd sources for either v7a / v8a
core_files += Glob('src/core/NEON/kernels/winograd/*.cpp')
core_files += Glob('src/core/NEON/kernels/winograd/transforms/*.cpp')
arm_compute_env.Append(CPPPATH = ["arm_compute/core/NEON/kernels/winograd/"])
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/"])

if env['arch'] == "armv7a":
core_files += Glob('src/core/NEON/kernels/arm32/*.cpp')
Expand All @@ -199,16 +211,6 @@ if env['gles_compute']:
runtime_files += Glob('src/runtime/GLES_COMPUTE/*.cpp')
runtime_files += Glob('src/runtime/GLES_COMPUTE/functions/*.cpp')

# Generate embed files
if env['embed_kernels']:
cs_files = Glob('src/core/GLES_COMPUTE/cs_shaders/*.cs')
cs_files += Glob('src/core/GLES_COMPUTE/cs_shaders/*.h')

embed_files = [ f.get_path()+"embed" for f in cs_files ]
arm_compute_env.Append(CPPPATH =[Dir("./src/core/GLES_COMPUTE/").path] )

generate_embed.append(arm_compute_env.Command(embed_files, cs_files, action=resolve_includes))

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

Expand Down Expand Up @@ -255,8 +257,6 @@ else:

Default(alias)

Default(generate_embed)

if env['standalone']:
Depends([alias,arm_compute_core_a], generate_embed)
else:
Expand Down
14 changes: 9 additions & 5 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,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", "x86_32", "x86_64")),
EnumVariable("os", "Target OS", "linux", allowed_values=("linux", "android", "bare_metal")),
EnumVariable("build", "Build type", "cross_compile", allowed_values=("native", "cross_compile")),
EnumVariable("build", "Build type", "cross_compile", allowed_values=("native", "cross_compile", "embed_only")),
BoolVariable("examples", "Build example programs", True),
BoolVariable("Werror", "Enable/disable the -Werror compilation flag", True),
BoolVariable("standalone", "Builds the tests as standalone executables, links statically with libgcc, libstdc++ and libarm_compute", False),
Expand All @@ -59,11 +59,17 @@ vars.AddVariables(

env = Environment(platform="posix", variables=vars, ENV = os.environ)
env.Append(LIBPATH = ["#build/%s" % env['build_dir']])
Export('env')
Export('vars')

SConsignFile('build/.%s' % env['build_dir'])

Help(vars.GenerateHelpText(env))

if env['build'] == "embed_only":
SConscript('./SConscript', variant_dir='#build/%s' % env['build_dir'], duplicate=0)
Return()

if env['neon'] and 'x86' in env['arch']:
print "Cannot compile NEON for x86"
Exit(1)
Expand All @@ -82,7 +88,7 @@ env.Append(CXXFLAGS = ['-Wno-deprecated-declarations','-Wall','-DARCH_ARM',
'-Wextra','-Wno-unused-parameter','-pedantic','-Wdisabled-optimization','-Wformat=2',
'-Winit-self','-Wstrict-overflow=2','-Wswitch-default',
'-fpermissive','-std=gnu++11','-Wno-vla','-Woverloaded-virtual',
'-Wctor-dtor-privacy','-Wsign-promo','-Weffc++','-Wno-format-nonliteral','-Wno-overlength-strings','-Wno-strict-overflow'])
'-Wctor-dtor-privacy','-Wsign-promo','-Weffc++','-Wno-format-nonliteral','-Wno-overlength-strings','-Wno-strict-overflow','-Wno-implicit-fallthrough'])

env.Append(CPPDEFINES = ['_GLIBCXX_USE_NANOSLEEP'])

Expand Down Expand Up @@ -134,8 +140,8 @@ elif env['arch'] == 'arm64-v8a':
elif env['os'] == 'android':
prefix = "aarch64-linux-android-"
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'])

Expand Down Expand Up @@ -229,8 +235,6 @@ if env['logging']:
env.Append(CPPPATH = ['#/include', "#"])
env.Append(CXXFLAGS = env['extra_cxx_flags'])

Export('vars')
Export('env')
Export('version_at_least')

if env['opencl']:
Expand Down
4 changes: 2 additions & 2 deletions arm_compute/core/AccessWindowAutoPadding.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017 ARM Limited.
* Copyright (c) 2017-2018 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
Expand Down Expand Up @@ -66,7 +66,7 @@ class AccessWindowAutoPadding : public IAccessWindow

// Inherited methods overridden:
bool update_window_if_needed(Window &window) const override;
bool update_padding_if_needed(const Window &window) const override;
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:
Expand Down
4 changes: 2 additions & 2 deletions arm_compute/core/AccessWindowStatic.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017 ARM Limited.
* Copyright (c) 2017-2018 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
Expand Down Expand Up @@ -79,7 +79,7 @@ class AccessWindowStatic : public IAccessWindow

// Inherited methods overriden:
bool update_window_if_needed(Window &window) const override;
bool update_padding_if_needed(const Window &window) const override;
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;

ITensorInfo *_info;
Expand Down
4 changes: 2 additions & 2 deletions arm_compute/core/AccessWindowTranspose.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017 ARM Limited.
* Copyright (c) 2017-2018 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
Expand Down Expand Up @@ -40,7 +40,7 @@ class AccessWindowTranspose : public AccessWindowRectangle
public:
using AccessWindowRectangle::AccessWindowRectangle;
bool update_window_if_needed(Window &window) const override;
bool update_padding_if_needed(const Window &window) const override;
bool update_padding_if_needed(const Window &window) override;
using AccessWindowRectangle::compute_valid_region;
ValidRegion compute_valid_region(const Window &window, ValidRegion input_valid_region, bool border_undefined, BorderSize border_size) const override;
};
Expand Down
1 change: 1 addition & 0 deletions arm_compute/core/CL/CLKernels.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
#include "arm_compute/core/CL/kernels/CLDerivativeKernel.h"
#include "arm_compute/core/CL/kernels/CLDilateKernel.h"
#include "arm_compute/core/CL/kernels/CLDirectConvolutionLayerKernel.h"
#include "arm_compute/core/CL/kernels/CLDirectConvolutionLayerOutputStageKernel.h"
#include "arm_compute/core/CL/kernels/CLErodeKernel.h"
#include "arm_compute/core/CL/kernels/CLFastCornersKernel.h"
#include "arm_compute/core/CL/kernels/CLFillBorderKernel.h"
Expand Down
Loading

0 comments on commit 06ea048

Please sign in to comment.