Relax: Composable Abstractions for End-to-End Dynamic Machine Learning

Ruihang Lai, Junru Shao, Siyuan Feng, Steven S. Lyubomirsky, Bohan Hou +14 more
11/1/2023
cs.LGcs.AIcs.PL

No confident code implementation found for this paper.

Abstract

Dynamic shape computations have become critical in modern machine learning workloads, especially in emerging large language models. The success of these models has driven the demand for their universal deployment across a diverse set of backend environments. In this paper, we present Relax, a compiler abstraction for optimizing end-to-end dynamic machine learning workloads. Relax introduces a cross-level abstraction that encapsulates computational graphs, loop-level tensor programs, and external library calls in a single representation. Relax also introduces first-class symbolic shape annotations to track dynamic shape computations globally across the program, enabling dynamic shape-aware cross-level optimizations. We build an end-to-end compilation framework using the proposed approach to optimize dynamic shape models. Experimental results on LLMs show that Relax delivers performance competitive with state-of-the-art systems across various GPUs and enables deployment of emerging models to a broader set of emerging environments, including mobile phones, embedded devices, and web browsers.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{lai2023relax,
  title  = {Relax: Composable Abstractions for End-to-End Dynamic Machine Learning},
  author = {Ruihang Lai and Junru Shao and Siyuan Feng and Steven S. Lyubomirsky and Bohan Hou and Wuwei Lin and Zihao Ye and Hongyi Jin and Yuchen Jin and Jiawei Liu and Lesheng Jin and Yaxing Cai and Ziheng Jiang and Yong Wu and Sunghyun Park and Prakalp Srivastava and Jared G. Roesch and Todd C. Mowry and Tianqi Chen},
  year   = {2023},
  eprint = {2311.02103},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2311.02103v2}
}

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

Discussion