Lines Matching +full:- +full:- +full:build +full:- +full:and +full:- +full:test
1 # gemmlowp: a small self-contained low-precision GEMM library
3 [](http://travis-ci.org/google/gem…
9 [doc/low-precision.md](doc/low-precision.md)
22 gemmlowp-related discussion, about either development or usage, is welcome on
29 Should be portable to any platform with some C++11 and POSIX support, while we
39 * pthreads (for multi-threaded operation and for profiling).
40 * sysconf (for multi-threaded operation to detect number of cores; may be
45 * Architecture-specific code paths use intrinsics or inline assembly. See
46 "Architecture-specific optimized code paths" below.
48 ## Architecture-specific optimized code paths
52 and Clang are supported.
56 * ARM with NEON (both 32bit and 64bit).
57 * Intel x86 with SSE 4.1 (both 32bit and 64bit).
59 When building for x86, it's very important to pass `-msse4.1` to the compiler,
61 running `bazel build --copt=-msse4.1 //gemmlowp:all`. The compiled binary should
66 generally a better idea to pass `-march=native` to the compiler. That flag
67 implies `-msse4.1` flag, along with others that might be helpful. This of course
69 to run `bazel build --config=opt //gemmlowp:all` instead.
72 suitable GEMM kernel and accompanying packing code, are explained in this file:
81 This is a headers-only library, so there is nothing to link to.
83 Usage documentation, and comments on the deprecation status of each public entry
86 A full, self-contained usage example, showing how to quantize float matrices and
94 should be considered purely legacy, deprecated, and going to be removed at some
101 Because gemmlowp is so simple, working with it involves only single-command-line
104 own preferred build system.
106 Keep in mind (previous section) that gemmlowp itself is a pure-headers-only
107 library so there is nothing to build.
110 script to build and run a program on an Android device:
113 scripts/test-android.sh
118 That being said, we also maintain a Bazel BUILD system as part of gemmlowp. Its
119 usage is not mandatory at all and is only one possible way that gemmlowp
120 libraries and tests may be built. If you are interested, Bazel's home page is
121 http://bazel.build/ And you can get started with using Bazel to build gemmlowp
128 $ bazel build gemmlowp:all
133 ### Testing by manually building and running tests
135 The test/ directory contains unit tests. The primary unit test is
138 test/test.cc
151 test/test_data.cc
158 test/test.cc
160 test/test_data.cc
163 The `scripts/` directory contains a script to build and run a program on an
167 scripts/test-android.sh
171 compiler, and expects source files (and optionally, cflags) as command-line
172 parameters. To build and run the above-mentioned main unit test, first set `CXX`
176 $ export CXX=/some/toolchains/arm-linux-androideabi-4.8/bin/arm-linux-androideabi-g++
182 $ ./scripts/test-android.sh \
183 test/test.cc \
185 test/test_data.cc
190 Alternatively, you can use Bazel to build and run tests. See the Bazel
195 $ bazel test gemmlowp:all
201 build a standalone toolchain:
207 $ export INSTALL_DIR=~/toolchains/clang-21-stl-gnu
208 $ $NDK/build/tools/make-standalone-toolchain.sh \
209 --toolchain=arm-linux-androideabi-clang3.5 --platform=android-21 \
210 --install-dir=$INSTALL_DIR
211 $ export CXX="$INSTALL_DIR/bin/arm-linux-androideabi-g++ \
212 --sysroot=$INSTALL_DIR/sysroot"
216 support NEON assembly. The benchmark build process will issue a warning if
217 support isn't detected, and you should make sure you're using a compiler like
218 arm-linux-androideabi-g++ that does include NEON.
225 test/benchmark.cc
229 with assertions disabled (`-DNDEBUG`).
231 For example, the benchmark can be built and run on an Android device by doing:
234 $ ./scripts/test-android.sh test/benchmark.cc -DNDEBUG
238 profiling instrumentation (which makes it slower) and will dump profiles. See
244 non-interrupting sampling profiler that only requires pthreads (no signals).
246 It relies on source code being instrumented with pseudo-stack labels. See
252 Contribution-related discussion is always welcome on the gemmlowp mailing list
256 Prospective contributors are welcome to pick one to work on, and communicate
269 about it, like any GEMM, because of the impact on speed, and we also care