Skip to content

Building

Devin Matthews edited this page Nov 13, 2016 · 10 revisions

Overview

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.

Supported Operating Systems and Architectures

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.

Supported Compilers

  • 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.

Configuration Options

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, or none. The default is auto. 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) of armv7a, armv8a, bgq, bulldozer, excavator, cortex-a15, cortex-a9, core2, haswell, knl, loongson3a, mic, piledriver, power7, reference, sandybridge, and auto. The default is auto 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-length-type=<type>

    Use the ISO C type type as the type of length parameters. The default is ptrdiff_t.

  • --with-stride-type=<type>

    Use the ISO C type type as the type of stride parameters. The default is ptrdiff_t.

  • --with-label-type=<type>

    Use the ISO C type type as the type of label strings. The default is char.

  • --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).

Clone this wiki locally