LGDCPLMar 8, 2023

RAF: Holistic Compilation for Deep Learning Model Training

arXiv:2303.04759v13 citationsh-index: 27Has Code
Originality Highly original
AI Analysis

This addresses the bottleneck of training large deep learning models for practitioners by providing holistic compiler optimizations, though it is incremental over existing compilers focused on inference.

The paper tackles the problem of inefficient deep learning model training by introducing RAF, a compiler that generates training graphs and integrates multiple kernel implementations, achieving better training throughput or larger batch sizes compared to PyTorch, XLA, and DeepSpeed for transformer models on GPUs.

As deep learning is pervasive in modern applications, many deep learning frameworks are presented for deep learning practitioners to develop and train DNN models rapidly. Meanwhile, as training large deep learning models becomes a trend in recent years, the training throughput and memory footprint are getting crucial. Accordingly, optimizing training workloads with compiler optimizations is inevitable and getting more and more attentions. However, existing deep learning compilers (DLCs) mainly target inference and do not incorporate holistic optimizations, such as automatic differentiation and automatic mixed precision, in training workloads. In this paper, we present RAF, a deep learning compiler for training. Unlike existing DLCs, RAF accepts a forward model and in-house generates a training graph. Accordingly, RAF is able to systematically consolidate graph optimizations for performance, memory and distributed training. In addition, to catch up to the state-of-the-art performance with hand-crafted kernel libraries as well as tensor compilers, RAF proposes an operator dialect mechanism to seamlessly integrate all possible kernel implementations. We demonstrate that by in-house training graph generation and operator dialect mechanism, we are able to perform holistic optimizations and achieve either better training throughput or larger batch size against PyTorch (eager and torchscript mode), XLA, and DeepSpeed for popular transformer models on GPUs.

Code Implementations3 repos
Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes