Memory Safe Computations with XLA Compiler

Artem Artemev, Tilman Roeder, Mark van der Wilk
6/28/2022
cs.LGcs.PLstat.ML

Official code: awav/tensorflow (1 star, C++, Apache-2.0, last commit 2022-11-23).

Abstract

Software packages like TensorFlow and PyTorch are designed to support linear algebra operations, and their speed and usability determine their success. However, by prioritising speed, they often neglect memory requirements.

Show full abstract

As a consequence, the implementations of memory-intensive algorithms that are convenient in terms of software design can often not be run for large problems due to memory overflows. Memory-efficient solutions require complex programming approaches with significant logic outside the computational framework. This impairs the adoption and use of such algorithms. To address this, we developed an XLA compiler extension that adjusts the computational data-flow representation of an algorithm according to a user-specified memory limit. We show that k-nearest neighbour and sparse Gaussian process regression methods can be run at a much larger scale on a single device, where standard implementations would have failed. Our approach leads to better use of hardware resources. We believe that further focus on removing memory constraints at a compiler level will widen the range of machine learning methods that can be developed in the future.

View on arXivView PDF

Code Implementations(1)

awav/tensorflowOfficial100%
Apache-2.0
11C++, PythonFeb 10, 20214 years agoApache-2.0

Similar Papers

Cite this paper

@article{artemev2022memory,
  title  = {Memory Safe Computations with XLA Compiler},
  author = {Artem Artemev and Tilman Roeder and Mark van der Wilk},
  year   = {2022},
  eprint = {2206.14148},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2206.14148}
}

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/2206.14148.svg)](https://codeofpaper.com/paper/2206.14148)

Discussion