Skip to content

Commit 4a2e529

Browse files
feat: update gemmlowp to 0.0~git20211220.e844ffd-1
1 parent 5bfc82f commit 4a2e529

File tree

156 files changed

+147750
-35
lines changed

Some content is hidden

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

156 files changed

+147750
-35
lines changed

.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
*.o
2+
*.ii
3+
*.s
4+
**/.DS_Store
5+
?
6+
??
7+
*binary*
8+
/.idea/
9+
CMakeLists.txt
10+
/bazel-*
11+
cmake_build/
12+
cmake_install/

.travis.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
2+
sudo: false
3+
4+
jobs:
5+
include:
6+
- stage: build
7+
name: Android NDK
8+
language: android
9+
compiler: clang
10+
os:
11+
- linux
12+
env:
13+
- NDK_VERSION=r14b TEST=arm
14+
- TEST=x86
15+
android:
16+
components:
17+
- build-tools-22.0.1
18+
- android-22
19+
- ndk-bundle
20+
- sys-img-armeabi-v7a-android-22
21+
before_script:
22+
- ./scripts/ci-before.sh
23+
script:
24+
- ./scripts/ci-test.sh
25+
26+
- name: Linux CMake(clang)
27+
os: linux
28+
dist: bionic
29+
language: cpp
30+
compiler: clang
31+
script:
32+
- cmake -S contrib -B cmake_build -DCMAKE_INSTALL_PREFIX=cmake_install
33+
- cmake --build cmake_build
34+
- cmake --build cmake_build --target install
35+
- ctest --test-dir cmake_build --output-on-failure --output-junit TEST-${TRAVIS_COMMIT}.xml

AUTHORS

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# This is the official list of gemmlowp authors for copyright purposes.
2+
# This file is distinct from the CONTRIBUTORS.txt file.
3+
# See the latter for an explanation.
4+
5+
# Names should be added to this file as:
6+
# Name or Organization <email address>
7+
# The email address is not required for organizations.
8+
9+
Google Inc.
10+
Intel Corporation
11+
ARM Ltd.
12+
Silk Labs Inc.
13+
MIPS Tech LLC
14+
Wave Computing Inc.

BUILD

Lines changed: 232 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,232 @@
1+
#
2+
# Description:
3+
# gemmlowp is a small self-contained low-precision GEMM library.
4+
# https://github.com/google/gemmlowp
5+
6+
licenses(["notice"]) # Apache 2.0
7+
8+
exports_files(["LICENSE"])
9+
10+
config_setting(
11+
name = "windows",
12+
values = {
13+
"cpu": "x64_windows",
14+
},
15+
)
16+
17+
config_setting(
18+
name = "android",
19+
values = {
20+
"crosstool_top": "//external:android/crosstool",
21+
},
22+
)
23+
24+
load(":flags.bzl", "LIB_COPTS", "LIB_LINKOPTS", "BIN_LINKOPTS")
25+
26+
filegroup(
27+
name = "gemmlowp_private_headers",
28+
srcs = glob([
29+
"fixedpoint/*.h",
30+
"internal/*.h",
31+
]),
32+
visibility = ["//visibility:private"],
33+
)
34+
35+
filegroup(
36+
name = "gemmlowp_public_headers",
37+
srcs = glob([
38+
"meta/*.h",
39+
"public/*.h",
40+
"profiling/*.h",
41+
]),
42+
visibility = ["//visibility:public"],
43+
)
44+
45+
filegroup(
46+
name = "gemmlowp_headers",
47+
srcs = [
48+
":gemmlowp_private_headers",
49+
":gemmlowp_public_headers",
50+
],
51+
visibility = ["//visibility:private"],
52+
)
53+
54+
filegroup(
55+
name = "eight_bit_int_gemm_headers",
56+
srcs = glob(["eight_bit_int_gemm/*.h"]),
57+
visibility = ["//visibility:private"],
58+
)
59+
60+
filegroup(
61+
name = "eight_bit_int_gemm_public_headers",
62+
srcs = [
63+
":eight_bit_int_gemm_headers",
64+
":gemmlowp_public_headers",
65+
],
66+
visibility = ["//visibility:public"],
67+
)
68+
69+
filegroup(
70+
name = "eight_bit_int_gemm_sources_with_no_headers",
71+
srcs = glob(["eight_bit_int_gemm/*.cc"]),
72+
visibility = ["//visibility:private"],
73+
)
74+
75+
filegroup(
76+
name = "eight_bit_int_gemm_sources",
77+
srcs = [
78+
":eight_bit_int_gemm_headers",
79+
":eight_bit_int_gemm_sources_with_no_headers",
80+
":gemmlowp_headers",
81+
],
82+
visibility = ["//visibility:public"],
83+
)
84+
85+
filegroup(
86+
name = "gemmlowp_test_headers",
87+
srcs = [":gemmlowp_headers"] + glob(["test/*.h"]),
88+
visibility = ["//visibility:private"],
89+
)
90+
91+
filegroup(
92+
name = "fixedpoint_private_headers",
93+
srcs = glob([
94+
"fixedpoint/*.h",
95+
]) + [
96+
"internal/common.h",
97+
"internal/detect_platform.h",
98+
],
99+
visibility = ["//visibility:private"],
100+
)
101+
102+
cc_library(
103+
name = "fixedpoint",
104+
srcs = [
105+
":fixedpoint_private_headers",
106+
],
107+
hdrs = [
108+
"fixedpoint/fixedpoint.h",
109+
],
110+
# Blaze warning:
111+
# "setting 'linkstatic=1' is recommended if there are no object files."
112+
linkstatic = 1,
113+
visibility = ["//visibility:public"],
114+
)
115+
116+
cc_library(
117+
name = "gemmlowp",
118+
hdrs = [":gemmlowp_headers"],
119+
linkopts = LIB_LINKOPTS,
120+
# Blaze warning:
121+
# "setting 'linkstatic=1' is recommended if there are no object files."
122+
linkstatic = 1,
123+
visibility = ["//visibility:public"],
124+
deps = [":fixedpoint"],
125+
)
126+
127+
cc_library(
128+
name = "eight_bit_int_gemm",
129+
srcs = [":eight_bit_int_gemm_sources_with_no_headers"],
130+
hdrs = [
131+
":eight_bit_int_gemm_headers",
132+
":gemmlowp_private_headers",
133+
":gemmlowp_public_headers",
134+
],
135+
copts = LIB_COPTS,
136+
linkopts = LIB_LINKOPTS,
137+
visibility = ["//visibility:public"],
138+
deps = [":gemmlowp"],
139+
)
140+
141+
cc_library(
142+
name = "profiler",
143+
hdrs = [
144+
"profiling/instrumentation.h",
145+
"profiling/profiler.h",
146+
"profiling/pthread_everywhere.h",
147+
],
148+
visibility = ["//visibility:public"],
149+
)
150+
151+
# The main gemmlowp unit test
152+
cc_test(
153+
name = "test",
154+
size = "medium",
155+
srcs = [
156+
"test/test.cc",
157+
"test/test_data.cc",
158+
":gemmlowp_test_headers",
159+
],
160+
copts = ["-O3"],
161+
deps = [":eight_bit_int_gemm"],
162+
)
163+
164+
# Math helpers test
165+
cc_test(
166+
name = "test_math_helpers",
167+
size = "small",
168+
srcs = [
169+
"test/test_math_helpers.cc",
170+
":gemmlowp_test_headers",
171+
],
172+
)
173+
174+
# BlockingCounter test
175+
cc_test(
176+
name = "test_blocking_counter",
177+
size = "medium",
178+
srcs = [
179+
"test/test_blocking_counter.cc",
180+
":gemmlowp_test_headers",
181+
],
182+
linkopts = BIN_LINKOPTS,
183+
)
184+
185+
# Allocator test
186+
cc_test(
187+
name = "test_allocator",
188+
size = "small",
189+
srcs = [
190+
"test/test_allocator.cc",
191+
":gemmlowp_test_headers",
192+
],
193+
)
194+
195+
# FixedPoint test
196+
cc_test(
197+
name = "test_fixedpoint",
198+
size = "small",
199+
srcs = [
200+
"test/test_fixedpoint.cc",
201+
":gemmlowp_test_headers",
202+
],
203+
)
204+
205+
# Benchmark
206+
cc_binary(
207+
name = "benchmark",
208+
srcs = [
209+
"test/benchmark.cc",
210+
":gemmlowp_test_headers",
211+
],
212+
copts = [
213+
"-O3",
214+
"-DNDEBUG",
215+
],
216+
linkopts = BIN_LINKOPTS,
217+
)
218+
219+
# Benchmark
220+
cc_binary(
221+
name = "benchmark_profile",
222+
srcs = [
223+
"test/benchmark.cc",
224+
":gemmlowp_test_headers",
225+
],
226+
copts = [
227+
"-O3",
228+
"-DNDEBUG",
229+
"-DGEMMLOWP_TEST_PROFILE",
230+
],
231+
linkopts = BIN_LINKOPTS,
232+
)

CONTRIBUTING

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
Want to contribute? Great! First, read this page (including the small print at the end).
2+
3+
4+
Before you contribute
5+
=====================
6+
7+
Before we can use your code, you must sign the Google Individual Contributor
8+
License Agreement (CLA),
9+
10+
https://developers.google.com/open-source/cla/individual?csw=1
11+
12+
which you can do online. The CLA is necessary mainly because you own the
13+
copyright to your changes, even after your contribution becomes part of our
14+
codebase, so we need your permission to use and distribute your code. We also
15+
need to be sure of various other things—for instance that you'll tell us if you
16+
know that your code infringes on other people's patents. You don't have to sign
17+
the CLA until after you've submitted your code for review and a member has
18+
approved it, but you must do it before we can put your code into our codebase.
19+
Before you start working on a larger contribution, you should get in touch with
20+
us first through the issue tracker with your idea so that we can help out and
21+
possibly guide you. Coordinating up front makes it much easier to avoid
22+
frustration later on.
23+
24+
25+
Getting in touch with the gemmlowp community
26+
============================================
27+
28+
The central point of communication around gemmlowp is the mailing list,
29+
https://groups.google.com/forum/#!forum/gemmlowp
30+
31+
32+
TODO items and projects
33+
=======================
34+
35+
We try to keep a current list of TODO items in the todo/ directory.
36+
Please feel free to pick one to work on, and to ask current maintainers for
37+
guidance. The gemmlowp mailing list is a good place for that.
38+
39+
40+
Code reviews
41+
============
42+
43+
All submissions, including submissions by project members, require review.
44+
For this purpose, we use Github pull requests against this repository:
45+
46+
https://github.com/google/gemmlowp
47+
48+
49+
The small print
50+
===============
51+
52+
Contributions made by corporations are covered by a different agreement than
53+
the one above, the Software Grant and Corporate Contributor License Agreement.

CONTRIBUTORS

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# People who have agreed to one of the CLAs and can contribute patches.
2+
# The AUTHORS.txt file lists the copyright holders; this file
3+
# lists people. For example, Google employees are listed here
4+
# but not in AUTHORS.txt, because Google holds the copyright.
5+
#
6+
# https://developers.google.com/open-source/cla/individual
7+
# https://developers.google.com/open-source/cla/corporate
8+
#
9+
# Names should be added to this file as:
10+
# Name <email address>
11+
12+
Google:
13+
Benoit Jacob <benoitjacob@google.com>
14+
Pete Warden <petewarden@google.com>
15+
Miao Wang <miaowang@google.com>
16+
David Andersen <dga@google.com>
17+
Maciek Chociej <maciekc@google.com>
18+
Justine Tunney <jart@google.com>
19+
Mark J. Matthews <mjmatthews@google.com>
20+
Marie White <mariewhite@google.com>
21+
Suharsh Sivakumar <suharshs@google.com>
22+
23+
Intel:
24+
Sagi Marcovich <sagi.marcovich@intel.com>
25+
Murat Efe Guney <murat.e.guney@intel.com>
26+
Sarah Knepper <sarah.knepper@intel.com>
27+
Mourad Gouicem <mourad.gouicem@intel.com>
28+
Richard Winterton <richard.winterton@intel.com>
29+
30+
ARM:
31+
David Mansell <David.Mansell@arm.com>
32+
33+
Silk Labs:
34+
Andreas Gal <andreas@silklabs.com>
35+
36+
MIPS Tech LLC:
37+
Alexey Frunze <Alexey.Frunze@mips.com>
38+
39+
Wave Computing Inc.:
40+
Alexey Frunze <afrunze@wavecomp.com>

0 commit comments

Comments
 (0)