The Linear Algebra Mapping Problem

11/21/2019
by   Christos Psarras, et al.
0

We observe a disconnect between the developers and the end users of linear algebra libraries. On the one hand, the numerical linear algebra and the high-performance communities invest significant effort in the development and optimization of highly sophisticated numerical kernels and libraries, aiming at the maximum exploitation of both the properties of the input matrices, and the architectural features of the target computing platform. On the other hand, end users are progressively less likely to go through the error-prone and time consuming process of directly using said libraries by writing their code in C or Fortran; instead, languages and libraries such as Matlab, Julia, Eigen and Armadillo, which offer a higher level of abstraction, are becoming more and more popular. Users are given the opportunity to code matrix computations with a syntax that closely resembles the mathematical description; it is then a compiler or an interpreter that internally maps the input program to lower level kernels, as provided by libraries such as BLAS and LAPACK. Unfortunately, our experience suggests that in terms of performance, this translation is typically vastly suboptimal. In this paper, we first introduce the Linear Algebra Mapping Problem, and then investigate how effectively a benchmark of test problems is solved by popular high-level programming languages. Specifically, we consider Matlab, Octave, Julia, R, Armadillo (C++), Eigen (C++), and NumPy (Python); the benchmark is meant to test both standard compiler optimizations such as common subexpression elimination and loop-invariant code motion, as well as linear algebra specific optimizations such as optimal parenthesization of a matrix product and kernel selection for matrices with properties. The aim of this study is to give concrete guidelines for the development of languages and libraries that support linear algebra computations.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
07/05/2019

Automatic Generation of Efficient Linear Algebra Programs

The level of abstraction at which application experts reason about linea...
research
02/20/2022

Benchmarking the Linear Algebra Awareness of TensorFlow and PyTorch

Linear algebra operations, which are ubiquitous in machine learning, for...
research
04/10/2018

The Generalized Matrix Chain Algorithm

In this paper, we present a generalized version of the matrix chain algo...
research
09/24/2021

ILA: Compilable Markdown for Linear Algebra

Communicating linear algebra in written form is challenging: mathematici...
research
08/22/2022

MOM: Matrix Operations in MLIR

Modern research in code generators for dense linear algebra computations...
research
05/12/2018

Program Generation for Small-Scale Linear Algebra Applications

We present SLinGen, a program generation system for linear algebra. The ...
research
04/27/2018

Tiramisu: A Polyhedral Compiler for Expressing Fast and Portable Code

This paper introduces Tiramisu, a polyhedral framework designed to gener...

Please sign up or login with your details

Forgot password? Click here to reset