Skip to content

Commit 0e205f7

Browse files
author
Jenkins
committed
arm_compute v19.11
1 parent 975dfe1 commit 0e205f7

File tree

11,071 files changed

+340695
-230992
lines changed

Some content is hidden

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

11,071 files changed

+340695
-230992
lines changed

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,9 @@ Tutorials:
2525
- [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)
2626
- [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)
2727

28-
Blogs:
29-
30-
- [Happy Birthday ACL!](https://community.arm.com/developer/tools-software/graphics/b/blog/posts/arm-compute-library-19-05-is-coming)
31-
32-
Documentation available here:
28+
Documentation (API, changelogs, build guide, contribution guide, errata, etc.) available here:
3329

30+
- [v19.11](https://arm-software.github.io/ComputeLibrary/v19.11/)
3431
- [v19.08](https://arm-software.github.io/ComputeLibrary/v19.08/)
3532
- [v19.05](https://arm-software.github.io/ComputeLibrary/v19.05/)
3633
- [v19.02](https://arm-software.github.io/ComputeLibrary/v19.02/)
@@ -50,6 +47,8 @@ Documentation available here:
5047

5148
Binaries available here:
5249

50+
- [v19.11-linux](https://github.com/ARM-software/ComputeLibrary/releases/download/v19.11/arm_compute-v19.11-bin-linux.tar.gz)
51+
- [v19.11-android](https://github.com/ARM-software/ComputeLibrary/releases/download/v19.11/arm_compute-v19.11-bin-android.tar.gz)
5352
- [v19.08-linux](https://github.com/ARM-software/ComputeLibrary/releases/download/v19.08/arm_compute-v19.08-bin-linux.tar.gz)
5453
- [v19.08-android](https://github.com/ARM-software/ComputeLibrary/releases/download/v19.08/arm_compute-v19.08-bin-android.tar.gz)
5554
- [v19.05-linux](https://github.com/ARM-software/ComputeLibrary/releases/download/v19.05/arm_compute-v19.05-bin-linux.tar.gz)

SConscript

Lines changed: 2 additions & 2 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 = "v19.08"
28-
SONAME_VERSION="16.0.0"
27+
VERSION = "v19.11"
28+
SONAME_VERSION="17.0.0"
2929

3030
Import('env')
3131
Import('vars')

SConstruct

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ vars.AddVariables(
4444
EnumVariable("os", "Target OS", "linux", allowed_values=("linux", "android", "bare_metal")),
4545
EnumVariable("build", "Build type", "cross_compile", allowed_values=("native", "cross_compile", "embed_only")),
4646
BoolVariable("examples", "Build example programs", True),
47+
BoolVariable("gemm_tuner", "Build gemm_tuner programs", True),
4748
BoolVariable("Werror", "Enable/disable the -Werror compilation flag", True),
4849
BoolVariable("standalone", "Builds the tests as standalone executables, links statically with libgcc, libstdc++ and libarm_compute", False),
4950
BoolVariable("opencl", "Enable OpenCL support", True),
@@ -126,11 +127,11 @@ if not env['exceptions']:
126127
env.Append(CPPDEFINES = ['ARM_COMPUTE_EXCEPTIONS_DISABLED'])
127128
env.Append(CXXFLAGS = ['-fno-exceptions'])
128129

129-
env.Append(CXXFLAGS = ['-Wno-deprecated-declarations','-Wall','-DARCH_ARM',
130-
'-Wextra','-Wno-unused-parameter','-pedantic','-Wdisabled-optimization','-Wformat=2',
130+
env.Append(CXXFLAGS = ['-Wall','-DARCH_ARM',
131+
'-Wextra','-pedantic','-Wdisabled-optimization','-Wformat=2',
131132
'-Winit-self','-Wstrict-overflow=2','-Wswitch-default',
132-
'-fpermissive','-std=gnu++11','-Wno-vla','-Woverloaded-virtual',
133-
'-Wctor-dtor-privacy','-Wsign-promo','-Weffc++','-Wno-format-nonliteral','-Wno-overlength-strings','-Wno-strict-overflow'])
133+
'-fpermissive','-std=gnu++11','-Woverloaded-virtual', '-Wformat-security',
134+
'-Wctor-dtor-privacy','-Wsign-promo','-Weffc++','-Wno-overlength-strings'])
134135

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

@@ -143,9 +144,11 @@ if env['os'] == 'android' and ( 'clang++' not in cpp_compiler or 'clang' not in
143144
print( "WARNING: Only clang is officially supported to build the Compute Library for Android")
144145

145146
if 'clang++' in cpp_compiler:
146-
env.Append(CXXFLAGS = ['-Wno-format-nonliteral','-Wno-deprecated-increment-bool','-Wno-vla-extension','-Wno-mismatched-tags'])
147+
env.Append(CXXFLAGS = ['-Wno-vla-extension'])
148+
elif 'armclang' in cpp_compiler:
149+
pass
147150
else:
148-
env.Append(CXXFLAGS = ['-Wlogical-op','-Wnoexcept','-Wstrict-null-sentinel', '-Wno-redundant-move'])
151+
env.Append(CXXFLAGS = ['-Wlogical-op','-Wnoexcept','-Wstrict-null-sentinel'])
149152

150153
if env['cppthreads']:
151154
env.Append(CPPDEFINES = [('ARM_COMPUTE_CPP_SCHEDULER', 1)])
@@ -159,6 +162,7 @@ if env['openmp']:
159162
env.Append(CXXFLAGS = ['-fopenmp'])
160163
env.Append(LINKFLAGS = ['-fopenmp'])
161164

165+
# Add architecture specific flags
162166
prefix = ""
163167
if env['arch'] == 'armv7a':
164168
env.Append(CXXFLAGS = ['-march=armv7-a', '-mthumb', '-mfpu=neon'])
@@ -174,15 +178,13 @@ if env['arch'] == 'armv7a':
174178
env.Append(CXXFLAGS = ['-mfloat-abi=softfp'])
175179
elif env['arch'] == 'arm64-v8a':
176180
env.Append(CXXFLAGS = ['-march=armv8-a'])
177-
env.Append(CPPDEFINES = ['ARM_COMPUTE_AARCH64_V8A','NO_DOT_IN_TOOLCHAIN'])
181+
env.Append(CPPDEFINES = ['ARM_COMPUTE_AARCH64_V8A'])
178182
if env['os'] == 'linux':
179183
prefix = "aarch64-linux-gnu-"
180184
elif env['os'] == 'bare_metal':
181185
prefix = "aarch64-elf-"
182186
elif env['os'] == 'android':
183187
prefix = "aarch64-linux-android-"
184-
if 'clang++' in cpp_compiler:
185-
env.Append(CXXFLAGS = ['-no-integrated-as'])
186188
elif 'arm64-v8.2-a' in env['arch']:
187189
if env['arch'] == 'arm64-v8.2-a-sve':
188190
env.Append(CXXFLAGS = ['-march=armv8.2-a+sve+fp16+dotprod'])
@@ -194,9 +196,7 @@ elif 'arm64-v8.2-a' in env['arch']:
194196
prefix = "aarch64-elf-"
195197
elif env['os'] == 'android':
196198
prefix = "aarch64-linux-android-"
197-
env.Append(CPPDEFINES = ['ARM_COMPUTE_AARCH64_V8_2','NO_DOT_IN_TOOLCHAIN'])
198-
if 'clang++' in cpp_compiler:
199-
env.Append(CXXFLAGS = ['-no-integrated-as'])
199+
env.Append(CPPDEFINES = ['ARM_COMPUTE_AARCH64_V8_2'])
200200
elif env['arch'] == 'x86_32':
201201
env.Append(CCFLAGS = ['-m32'])
202202
env.Append(LINKFLAGS = ['-m32'])
@@ -225,7 +225,9 @@ if not GetOption("help"):
225225
print("ERROR: Compiler '%s' not found" % env['CXX'])
226226
Exit(1)
227227

228-
if 'clang++' not in cpp_compiler:
228+
if 'armclang' in cpp_compiler:
229+
pass
230+
elif 'clang++' not in cpp_compiler:
229231
if env['arch'] == 'arm64-v8.2-a' and not version_at_least(compiler_ver, '6.2.1'):
230232
print("GCC 6.2.1 or newer is required to compile armv8.2-a code")
231233
Exit(1)
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
/*
2+
* Copyright (c) 2019 ARM Limited.
3+
*
4+
* SPDX-License-Identifier: MIT
5+
*
6+
* Permission is hereby granted, free of charge, to any person obtaining a copy
7+
* of this software and associated documentation files (the "Software"), to
8+
* deal in the Software without restriction, including without limitation the
9+
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10+
* sell copies of the Software, and to permit persons to whom the Software is
11+
* furnished to do so, subject to the following conditions:
12+
*
13+
* The above copyright notice and this permission notice shall be included in all
14+
* copies or substantial portions of the Software.
15+
*
16+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
* SOFTWARE.
23+
*/
24+
#ifndef __ARM_COMPUTE_CLCORERUNTIME_CONTEXT_H__
25+
#define __ARM_COMPUTE_CLCORERUNTIME_CONTEXT_H__
26+
27+
#include "arm_compute/core/CL/OpenCL.h"
28+
29+
namespace arm_compute
30+
{
31+
// Forward declarations
32+
class CLKernelLibrary;
33+
34+
/** Core runtime context for OpenCL */
35+
class CLCoreRuntimeContext final
36+
{
37+
public:
38+
/** Legacy constructor */
39+
CLCoreRuntimeContext();
40+
41+
/** Constructor */
42+
CLCoreRuntimeContext(CLKernelLibrary *kernel_lib, cl::Context ctx, cl::CommandQueue queue);
43+
/** Destructor */
44+
~CLCoreRuntimeContext() = default;
45+
/** Default copy constructor */
46+
CLCoreRuntimeContext(const CLCoreRuntimeContext &) = default;
47+
/** Default move constructor */
48+
CLCoreRuntimeContext(CLCoreRuntimeContext &&) = default;
49+
/** Default copy assignment */
50+
CLCoreRuntimeContext &operator=(const CLCoreRuntimeContext &) = default;
51+
/** Default move assignment operator */
52+
CLCoreRuntimeContext &operator=(CLCoreRuntimeContext &&) = default;
53+
/** Kernel Library accessor
54+
*
55+
* @return The kernel library instance used by the core context
56+
*/
57+
CLKernelLibrary *kernel_library() const;
58+
/** OpenCL context accessor
59+
*
60+
* @return The OpenCL context used by the core context
61+
*/
62+
cl::Context context();
63+
/** OpenCL command queue accessor
64+
*
65+
* @return The OpenCL queue used by the core context
66+
*/
67+
cl::CommandQueue queue();
68+
69+
private:
70+
CLKernelLibrary *_kernel_lib{ nullptr };
71+
cl::Context _ctx{};
72+
cl::CommandQueue _queue{};
73+
};
74+
} // namespace arm_compute
75+
#endif /*__ARM_COMPUTE_CLCORERUNTIME_CONTEXT_H__ */

arm_compute/core/CL/CLHelpers.h

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@
3434

3535
namespace arm_compute
3636
{
37+
class CLCoreRuntimeContext;
38+
class CLBuildOptions;
39+
3740
enum class DataType;
3841

3942
/** Max vector width of an OpenCL vector */
@@ -47,6 +50,22 @@ static constexpr unsigned int max_cl_vector_width = 16;
4750
*/
4851
std::string get_cl_type_from_data_type(const DataType &dt);
4952

53+
/** Translates a tensor data type to the appropriate OpenCL promoted type.
54+
*
55+
* @param[in] dt @ref DataType to be used to get the promoted OpenCL type.
56+
*
57+
* @return The string specifying the OpenCL type to be used.
58+
*/
59+
std::string get_cl_promoted_type_from_data_type(const DataType &dt);
60+
61+
/** Translates the element size to an unsigned integer data type
62+
*
63+
* @param[in] element_size Size in bytes of an element.
64+
*
65+
* @return The string specifying the OpenCL type to be used.
66+
*/
67+
std::string get_cl_unsigned_type_from_element_size(size_t element_size);
68+
5069
/** Translates a tensor data type to the appropriate OpenCL select type.
5170
*
5271
* @param[in] dt @ref DataType to be translated to OpenCL select type.
@@ -153,5 +172,15 @@ size_t preferred_vector_width(const cl::Device &device, DataType dt);
153172
* @return True if dummy work-items should be preferred to dispatch the NDRange
154173
*/
155174
bool preferred_dummy_work_items_support(const cl::Device &device);
156-
}
175+
176+
/** Creates an opencl kernel
177+
*
178+
* @param[in] ctx A context to be used to create the opencl kernel.
179+
* @param[in] kernel_name The kernel name.
180+
* @param[in] build_opts The build options to be used for the opencl kernel compilation.
181+
*
182+
* @return An opencl kernel
183+
*/
184+
cl::Kernel create_opencl_kernel(CLCoreRuntimeContext *ctx, const std::string &kernel_name, const CLBuildOptions &build_opts);
185+
} // namespace arm_compute
157186
#endif /* __ARM_COMPUTE_CLHELPERS_H__ */

0 commit comments

Comments
 (0)