LAGrad: Statically Optimized Differentiable Programming in MLIR

被引:1
作者
Peng, Mai Jacob [1 ]
Dubach, Christophe [1 ,2 ]
机构
[1] McGill Univ, Montreal, PQ, Canada
[2] Mila, Montreal, PQ, Canada
来源
PROCEEDINGS OF THE 32ND ACM SIGPLAN INTERNATIONAL CONFERENCE ON COMPILER CONSTRUCTION, CC 2023 | 2023年
基金
加拿大自然科学与工程研究理事会;
关键词
automatic differentiation; MLIR; differentiable programming; static analysis; sparsity;
D O I
10.1145/3578360.3580259
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Automatic differentiation (AD) is a central algorithm in deep learning and the emerging field of differentiable programming. However, the performance of AD remains a significant bottleneck in these fields. Training large models requires repeatedly evaluating gradients via AD potentially millions of times. Additionally, the most common form of AD incurs an asymptotically large memory cost relative to the original function being differentiated. This paper introduces LAGrad, a reverse-mode, source-to-source AD system that leverages high-level information in MLIR to produce efficient differentiated code. LAGrad employs a collection of novel static optimizations that benefit from the semantics of high-level MLIR dialects to exploit the sparsity and structured control flow of generated code. Using these, LAGrad is able to achieve speedups of up to 2.8x and use 35x less memory relative to state of the art AD systems on real-world machine learning and computer vision benchmarks.
引用
收藏
页码:228 / 238
页数:11
相关论文
共 25 条
  • [21] A benchmark of selected algorithmic differentiation tools on some problems in computer vision and machine learning
    Srajer, Filip
    Kukelova, Zuzana
    Fitzgibbon, Andrew
    [J]. OPTIMIZATION METHODS & SOFTWARE, 2018, 33 (4-6) : 889 - 906
  • [22] van Merrienboer Bart, 2018, Advances in Neural Information Processing Systems, V31
  • [23] Vasilache N, 2018, Arxiv, DOI arXiv:1802.04730
  • [24] Demystifying Differentiable Programming: Shift/Reset the Penultimate Backpropagator
    Wang, Fei
    Zheng, Daniel
    Decker, James
    Wu, Xilun
    Essertel, Gregory M.
    Rompf, Tiark
    [J]. PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2019, 3 (ICFP):
  • [25] Model-driven Level 3 BLAS Performance Optimization on Loongson 3A Processor
    Zhang Xianyi
    Wang Qian
    Zhang Yunquan
    [J]. PROCEEDINGS OF THE 2012 IEEE 18TH INTERNATIONAL CONFERENCE ON PARALLEL AND DISTRIBUTED SYSTEMS (ICPADS 2012), 2012, : 684 - 691