Arto's Notes re:
BLAS
Table of Contents
Levels
- Level 1 BLAS, aka BLAS1: vector-vector operations.
- Level 2 BLAS, aka BLAS2: vector-matrix operations.
- Level 3 BLAS, aka BLAS3: matrix-matrix operations.
Installation
Installation on macOS
$ brew install openblas
Installation on Ubuntu
$ apt install libblas3 libblas-dev
$ apt install libopenblas-base libopenblas-dev
Reference
Interface for C
#include <cblas.h>
int main(void) {
// TODO
}
Implementations
Reference Implementation
Packaged as libblas3 in Ubuntu.
Implementations for C
CBLAS
OpenBLAS
Packaged as libopenblas-base in Ubuntu.
ATLAS
- https://en.wikipedia.org/wiki/Automatically_Tuned_Linear_Algebra_Software
- http://math-atlas.sourceforge.net/
- https://github.com/math-atlas/math-atlas
GSL
Intel Math Kernel Library (MKL)
- https://software.intel.com/en-us/mkl
- https://software.intel.com/en-us/mkl-developer-reference-c
- https://github.com/intel/mkl-dnn
- https://software.intel.com/en-us/articles/intelr-mkl-and-c-template-libraries
cuBLAS
Apple Accelerate Framework
- https://developer.apple.com/documentation/accelerate
- https://developer.apple.com/library/archive/releasenotes/Performance/RN-vecLib/
AMD Core Math Library (ACML)
Discontinued.
Implementations for C++
BLAS++
Implementations for Java
- https://github.com/fommil/netlib-java
- https://math.nist.gov/javanumerics/
- http://icl.cs.utk.edu/f2j/
Miscellaneous
- https://wiki.debian.org/DebianScience/LinearAlgebraLibraries
- https://github.com/xianyi/OpenBLAS/wiki/Developer-manual#optimize-gemm
- https://github.com/xianyi/BLAS-Tester
Alternatives
BLIS
- https://github.com/flame/blis
- https://github.com/devinamatthews/tblis
- Accelerating Machine Learning Using BLIS