-
Notifications
You must be signed in to change notification settings - Fork 37
Building
TBLIS uses a standard GNU build system:
./configure && make && make installThe 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 and AMD 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+.
- GCC version 4.8+ (except 4.8.4). 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=noneor--disable-thread-modelto disable threading. -
--enable-config=<config>Build one or more specific configurations (i.e. specific architectures).
configmay be one or more (given as a comma-separated list) ofbulldozer,excavator,core2,haswell,knl,piledriver,reference,sandybridge, andauto. The default isautowhich 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-length-type=<type>Use the ISO C type
typeas the type of length parameters (i.e.len_type). The default isptrdiff_t. -
--with-stride-type=<type>Use the ISO C type
typeas the type of stride parameters (i.e.stride_type). The default isptrdiff_t. -
--with-label-type=<type>Use the ISO C type
typeas the type of label strings (i.e.label_type). The default ischar. -
--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).