Benchmarking the Linear Algebra Awareness of TensorFlow and PyTorch

02/20/2022
by   Aravind Sankaran, et al.
0

Linear algebra operations, which are ubiquitous in machine learning, form major performance bottlenecks. The High-Performance Computing community invests significant effort in the development of architecture-specific optimized kernels, such as those provided by the BLAS and LAPACK libraries, to speed up linear algebra operations. However, end users are progressively less likely to go through the error prone and time-consuming process of directly using said kernels; instead, frameworks such as TensorFlow (TF) and PyTorch (PyT), which facilitate the development of machine learning applications, are becoming more and more popular. Although such frameworks link to BLAS and LAPACK, it is not clear whether or not they make use of linear algebra knowledge to speed up computations. For this reason, in this paper we develop benchmarks to investigate the linear algebra optimization capabilities of TF and PyT. Our analyses reveal that a number of linear algebra optimizations are still missing; for instance, reducing the number of scalar operations by applying the distributive law, and automatically identifying the optimal parenthesization of a matrix chain. In this work, we focus on linear algebra computations in TF and PyT; we both expose opportunities for performance enhancement to the benefit of the developers of the frameworks and provide end users with guidelines on how to achieve performance gains.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
11/21/2019

The Linear Algebra Mapping Problem

We observe a disconnect between the developers and the end users of line...
research
07/05/2019

Automatic Generation of Efficient Linear Algebra Programs

The level of abstraction at which application experts reason about linea...
research
12/30/2019

Linnea: Automatic Generation of Efficient Linear Algebra Programs

The translation of linear algebra computations into efficient sequences ...
research
04/10/2018

The Generalized Matrix Chain Algorithm

In this paper, we present a generalized version of the matrix chain algo...
research
10/23/2018

numpywren: serverless linear algebra

Linear algebra operations are widely used in scientific computing and ma...
research
08/13/2019

Exploiting Parallelism Opportunities with Deep Learning Frameworks

State-of-the-art machine learning frameworks support a wide variety of d...
research
10/24/2017

Auto-Differentiating Linear Algebra

Development systems for deep learning, such as Theano, Torch, TensorFlow...

Please sign up or login with your details

Forgot password? Click here to reset