mlsanityData to 7 Oct 2026

Benchmarking the Linear Algebra Awareness of TensorFlow and PyTorch

arXiv 2202.09888 ↗First posted 20 Feb 2022cs.MS cs.LG cs.PFcited by 3

Not on the map. Why?

Abstract (arXiv)

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.

Key facts. Cited by 3 papers in the map (data through 7 Oct 2026). Builds on 12 of its 38 references that are in the map. First posted on arXiv 20 Feb 2022.

Builds on

12 of 38 references.

References · 12

  1. 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,160
  2. 2014cuDNN: Efficient Primitives for Deep Learningcited by 240
  3. 2015MXNet: A Flexible and Efficient Machine Learning Library for Heterogeneous Distributed Systemscited by 195
  4. 2019MLPerf Inference Benchmarkcited by 195
  5. 2018Tensor Comprehensions: Framework-Agnostic High-Performance Machine Learning Abstractionscited by 84
  6. 2018Glow: Graph Lowering Compiler Techniques for Neural Networkscited by 73
  7. 2020The Deep Learning Compiler: A Comprehensive Surveycited by 46
  8. 2018Intel nGraph: An Intermediate Representation, Compiler, and Executor for Deep Learningcited by 22
  9. 2017Stochastic Newton and Quasi-Newton Methods for Large Linear Least-squares Problemscited by 2
  10. 2019The Linear Algebra Mapping Problem. Current state of linear algebra languages and librariescited by 1
  11. 2020Discriminating Equivalent Algorithms via Relative Performancecited by 1
  12. 2021Performance Comparison for Scientific Computations on the Edge via Relative Performancecited by 1

Built on by

Cited by year

Citing papers per year: 2022: 1; 2023: 2.

3 papers.