Automatic Generation of Efficient Linear Algebra Programs

Henrik Barthels, Christos Psarras, Paolo Bientinesi
7/5/2019
cs.MS

Official code: HPAC/linnea (73 stars, Python, GPL-3.0, last commit 2025-08-24).

Abstract

The level of abstraction at which application experts reason about linear algebra computations and the level of abstraction used by developers of high-performance numerical linear algebra libraries do not match. The former is conveniently captured by high-level languages and libraries such as Matlab and Eigen, while the latter expresses the kernels included in the BLAS and LAPACK libraries.

Show full abstract

Unfortunately, the translation from a high-level computation to an efficient sequence of kernels is a task, far from trivial, that requires extensive knowledge of both linear algebra and high-performance computing. Internally, almost all high-level languages and libraries use efficient kernels; however, the translation algorithms are too simplistic and thus lead to a suboptimal use of said kernels, with significant performance losses. In order to both achieve the productivity that comes with high-level languages, and make use of the efficiency of low level kernels, we are developing Linnea, a code generator for linear algebra problems. As input, Linnea takes a high-level description of a linear algebra problem and produces as output an efficient sequence of calls to high-performance kernels. In 25 application problems, the code generated by Linnea always outperforms Matlab, Julia, Eigen and Armadillo, with speedups up to and exceeding 10x.

View on arXivView PDF

Code Implementations(1)

HPAC/linneaOfficial100%
GPL-3.0

Linnea is an experimental tool for the automatic generation of optimized code for linear algebra problems.

736Python, ShellJan 17, 20181 years agoGPL-3.0
blascode-generationcompilerhigh-performance-computingjulia+4 more

Similar Papers

Cite this paper

@article{barthels2019automatic,
  title  = {Automatic Generation of Efficient Linear Algebra Programs},
  author = {Henrik Barthels and Christos Psarras and Paolo Bientinesi},
  year   = {2019},
  eprint = {1907.02778},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1907.02778}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/1907.02778.svg)](https://codeofpaper.com/paper/1907.02778)

Discussion