MAGIS: Memory Optimization Via Coordinated Graph Transformation and Scheduling for DNN

Renze Chen,Zijian Ding,Size Zheng,Chengrui Zhang,Jingwen Leng,Xuanzhe Liu,Yun Liang
DOI: https://doi.org/10.1145/3620666.3651330
2024-01-01
Abstract:Recently, memory consumption of Deep Neural Network (DNN) rapidly increases, mainly due to long lifetimes and large shapes of tensors. Graph scheduling has emerged as an effective memory optimization technique, which determines the optimal execution, re-computation, swap-out, and swap-in timings for each operator/tensor. However, it often hurts performance significantly and can only manipulate tensors' lifetimes but not shapes, limiting the optimization space. We find that graph transformation, which can change the tensor shapes and graph structure, creates a new trade-off space between memory and performance. Nevertheless, graph transformation are applied separately so far, with primary focus on optimizing performance and not memory.
What problem does this paper attempt to address?