Tensor Relational Algebra for Distributed Machine Learning System Design Binhang Yuany, Dimitrije Jankovy, Jia Zouz, Yuxin Tangy, Daniel Bourgeoisy, Chris Jermainey yRice University; zArizona State University y{by8, dj16, yuxin.tang, dcb10, cmj4}@rice.edu;
[email protected] ABSTRACT This operational approach has certain drawbacks, namely that We consider the question: what is the abstraction that should be the system has limited latitude for automatic optimization. The implemented by the computational engine of a machine learning programmer is responsible for making sure that the operations can system? Current machine learning systems typically push whole run successfully using available resources (such as the amount of tensors through a series of compute kernels such as matrix multi- RAM on each GPU), and if the operations cannot run successfully, plications or activation functions, where each kernel runs on an AI the programmer must figure out how to break the operations up into accelerator (ASIC) such as a GPU. This implementation abstraction smaller pieces that can run. Tasks such as getting a computation provides little built-in support for ML systems to scale past a single to run on multiple GPUs or on multiple machines in a distributed machine, or for handling large models with matrices or tensors cluster so as to minimize communication are left to the programmer. that do not easily fit into the RAM of an ASIC. In this paper, we Toward declarative tensor programming. There has been work present an alternative implementation abstraction called the tensor on programming models that are more declarative. PyTorch and relational algebra (TRA). The TRA is a set-based algebra based on TensorFlow now both support variants of Einstein notation—a clas- the relational algebra.