Memory Safe Computations with XLA Compiler

被引:0
|
作者
Artemev, Artem [1 ,2 ]
An, Yuze [1 ]
Roeder, Tilman [1 ]
van der Wilk, Mark [1 ]
机构
[1] Imperial Coll London, London, England
[2] Secondmind, Cambridge, England
关键词
D O I
暂无
中图分类号
TP18 [人工智能理论];
学科分类号
081104 ; 0812 ; 0835 ; 1405 ;
摘要
Software packages like TensorFlow and PyTorch are designed to support linear algebra operations, and their speed and usability determine their success. However, by prioritising speed, they often neglect memory requirements. As a consequence, the implementations of memory-intensive algorithms that are convenient in terms of software design can often not be run for large problems due to memory overflows. Memory-efficient solutions require complex programming approaches with significant logic outside the computational framework. This impairs the adoption and use of such algorithms. To address this, we developed an XLA compiler extension(1) that adjusts the computational data-flow representation of an algorithm according to a user-specified memory limit. We show that k-nearest neighbour, sparse Gaussian process regression methods and Transformers can be run on a single device at a much larger scale, where standard implementations would have failed. Our approach leads to better use of hardware resources. We believe that further focus on removing memory constraints at a compiler level will widen the range of machine learning methods that can be developed in the future.
引用
收藏
页数:13
相关论文
共 50 条
  • [31] Compiler analysis of irregular memory accesses
    Lin, Y
    Padua, D
    ACM SIGPLAN NOTICES, 2000, 35 (05) : 157 - 168
  • [32] CLAM: Compiler Lease of Cache Memory
    Prechtl, Ian
    Reber, Ben
    Ding, Chen
    Patru, Dorin
    Chen, Dong
    PROCEEDINGS OF THE INTERNATIONAL SYMPOSIUM ON MEMORY SYSTEMS, MEMSYS 2020, 2020, : 281 - 296
  • [33] OpenMP compiler for distributed memory architectures
    Wang Jue
    Hu ChangJun
    Zhang JiLin
    Li JianJiang
    SCIENCE CHINA-INFORMATION SCIENCES, 2010, 53 (05) : 932 - 944
  • [34] Hiding relaxed memory consistency with a compiler
    Lee, J
    Padua, DA
    IEEE TRANSACTIONS ON COMPUTERS, 2001, 50 (08) : 824 - 833
  • [35] CLAM: Compiler Leasing of Accelerator Memory
    Chen, Dong
    Ding, Chen
    Patru, Dorin
    LANGUAGES AND COMPILERS FOR PARALLEL COMPUTING, LCPC 2019, 2021, 11998 : 89 - 97
  • [36] A High Performance Compiler for Very Large Scale Surface Code Computations
    Watkins, George
    Nguyen, Hoang Minh
    Watkins, Keelan
    Pearce, Steven
    Lau, Hoi-Kwan
    Paler, Alexandru
    QUANTUM, 2024, 8
  • [37] HOPE: A Python']Python just-in-time compiler for astrophysical computations
    Akeret, J.
    Gamper, L.
    Amara, A.
    Refregier, A.
    ASTRONOMY AND COMPUTING, 2015, 10 : 1 - 8
  • [38] A Compiler for Sound Floating-Point Computations using Affine Arithmetic
    Rivera, Joao
    Franchetti, Franz
    Puschel, Markus
    CGO '22: PROCEEDINGS OF THE 2022 IEEE/ACM INTERNATIONAL SYMPOSIUM ON CODE GENERATION AND OPTIMIZATION (CGO), 2022, : 66 - 78
  • [39] Optimizing Sparse Matrix Computations Through Compiler-Assisted Programming
    Rietveld, Kristian F. D.
    Wijshoff, Harry A. G.
    PROCEEDINGS OF THE ACM INTERNATIONAL CONFERENCE ON COMPUTING FRONTIERS (CF'16), 2016, : 100 - 109
  • [40] Specializing Compiler Optimizations Through Programmable Composition For Dense Matrix Computations
    Yi, Qing
    Wang, Qian
    Cui, Huimin
    2014 47TH ANNUAL IEEE/ACM INTERNATIONAL SYMPOSIUM ON MICROARCHITECTURE (MICRO), 2014, : 596 - 608