-
Notifications
You must be signed in to change notification settings - Fork 29
Building
TBLIS uses a standard GNU build system:
./configure && make && make install
The configure
script takes a variety of options, some of which are described in the next section. TBLIS is safe to build in parallel, so use make -jN
liberally.
TBLIS supports Linux, Apple OSX/macOS, and probably works on other UNIXes. TBLIS also probably works on Cygwin, but does not otherwise support Microsoft Windows. TBLIS contains optimized kernels for a variety of Intel, AMD, ARM, IBM, and other architectures. A full list of architecture configurations is given in the next section. Additionally, TBLIS can be compiled simultaneously for multiple architectures, and the appropriate kernel can be selected at run-time. By default, TBLIS builds all of the binary-compatible configurations for the detected host hardware.
- Intel C/C++ compiler version 15+. Note that version 17 is known to produce an internal compiler error :(.
- GCC version 4.8+. Version 5+ is recommended.
- LLVM clang version 3.3+, but 3.8+ is recommended since it supports OpenMP.
In addition to the usual GNU configure
options for a library (--prefix
, CC/CXX
, --enable-shared
, etc.), TBIS offers the following package-specific options:
-
--enable-thread-model[=<model>]
or--enable-threading[=<model>]
Enable threading with the given thread model, one of
auto
,openmp
,pthreads
, ornone
. The default isauto
. If no thread model flag is given, threading is automatically enabled, so use--enable-thread-model=none
or--disable-thread-model
to disable threading. -
--enable-config=<config>
Build one or more specific configurations (i.e. specific architectures).
config
may be one or more (given as a comma-separated list) ofarmv7a
,armv8a
,bgq
,bulldozer
,excavator
,cortex-a15
,cortex-a9
,core2
,haswell
,knl
,loongson3a
,mic
,piledriver
,power7
,reference
,sandybridge
, andauto
. The default isauto
which builds all configurations that are binary-compatible with the host hardware. The following meta-configurations are also accepted:-
intel
=core2,sandybridge,haswell,knl
-
amd
=bulldozer,piledriver,excavator
-
x86
=intel,amd
-
-
--with-blas[=<libs>]
If an external BLAS library is specified with this option, or found automatically, the benchmark utility is build with this library as the reference implementation. TBLIS does not otherwise use or require a BLAS library.
A full list of configure options can be obtained by running ./configure --help=recursive
. It is possible to specify custom compiler flags with CFLAGS
and CXXFLAGS
, but this is not recommended and may interfere with built-in optimization flags leading to sub-optimal performance (although setting these variables may be helpful for debugging).