FlexiBLAS - A BLAS and LAPACK wrapper library with runtime exchangable backends

FlexiBLAS - A BLAS and LAPACK wrapper library with runtime exchangable backends

The BLAS library is one of the central libraries for the implementation of numerical algorithms. It serves as the basis for many other numerical libraries like LAPACK, PLASMA or MAGMA (to mention only the most obvious). Thus a fast BLAS implementation is the key ingredient for efficient  applications in this area. However, for debugging or benchmarking purposes it is often necessary to replace the underlying BLAS implementation of an application, e.g. to disable threading or to include  debugging symbols. We present a novel  framework that allows one to exchange the BLAS implementation at   run-time via an environment variable. Our concept neither requires relinkage, nor recompilation of the application. Numerical experiments show that there is no notable overhead introduced by this new approach. For only a very little overhead the framework naturally extends to a minimal profiling setup that allows one to count numbers of calls to the BLAS routines used and measure the time spent therein.

Main Features

  • Runtime exchangeable BLAS and LAPACK backend without recompilation of any software.
  • Supports all BLAS functions and al LAPACK functions from Version 3.10.0 with an 100% BLAS and LAPACK compatible ABI/API.
  • Flexible per system/per user/per host configuration files.
  • Integration of user-owned BLAS libraries without administrator privileges, even in system-wide installed programs.
  • Interface for GNU Octave to change the BLAS backend at runtime.
  • Works with NETLIB-BLAS, OpenBLAS, ATLAS, Intel MKL, BLIS, ...
  • Aware of 32-bit and 64-bit integers
  • New: Introspection API to build analysis and profiling tools.

Since version 3.0.1 the library is released under the terms of the GPL3+ license with the exception that as long as only the BLAS and LAPACK routines, which are part of the reference implementation, are used the library is allowed to be linked against any other code. This exception also covers the usage of FlexiBLAS as BLAS backend of closed source software.

Planed Features / In Development

  • Replay functionality to simulate all BLAS calls with different BLAS implementations.
  • GPU offloading backend to accelerate BLAS calls on GPU enabled systems.
  • Continuous import of new LAPACK versions.
  • Suffixed symbols for better interoperability with Julia

 

Downloads

Version 3.4.2

Older versions:

 

 

  • portage.tar.gz - A local portage overlay for Gentoo x86 and amd64 systems.

Public git repository: https://gitlab.mpi-magdeburg.mpg.de/software/flexiblas-release or https://www.mpi-magdeburg.mpg.de/projects/flexiblas

 

Installation Instructions

Simply download the source tarball and follow the steps described in the README.md file therein.

Fedora Linux  / EPEL

If you are running Fedora Linux (or some EPEL enabled RHEL distributions) you can install FlexiBLAS via dnf:

dnf install flexiblas

FreeBSD

FlexiBLAS is available in the FreeBSD ports collections as well(https://www.freshports.org/math/flexiblas).  There it can be installed either from source

cd /usr/ports/math/flexiblas/ && make install clean

or using the package manager

pkg install math/flexiblas

R Interface

The FlexiBLAS API can be used directly from R. The interface is written by Iñaki Ucar and provided on GitHub: https://github.com/Enchufa2/r-flexiblas

Posters/Publications/Talks

Related News

Go to Editor View