Halide: Decoupling Algorithms from Schedules for High-Performance Image Processing

被引:64
|
作者
Ragan-Kelley, Jonathan [6 ]
Adams, Andrew [1 ]
Sharlet, Dillon [1 ]
Barnes, Connelly [3 ]
Paris, Sylvain [5 ]
Levoy, Marc [1 ,4 ]
Amarasinghe, Saman [2 ]
Durand, Fredo [2 ]
机构
[1] Google, Mountain View, CA USA
[2] MIT CSAIL, Cambridge, MA 02139 USA
[3] Univ Virginia, Charlottesville, VA 22903 USA
[4] Stanford Univ, Stanford, CA 94305 USA
[5] Adobe, San Jose, CA USA
[6] Univ Calif Berkeley, Berkeley, CA 94720 USA
基金
美国国家科学基金会;
关键词
D O I
10.1145/3150211
中图分类号
TP3 [计算技术、计算机技术];
学科分类号
0812 ;
摘要
Writing high-performance code on modern machines requires not just locally optimizing inner loops, but globally reorganizing computations to exploit parallelism and locality-doing things such as tiling and blocking whole pipelines to fit in cache. This is especially true for image processing pipelines, where individual stages do much too little work to amortize the cost of loading and storing results to and from off-chip memory. As a result, the performance difference between a naive implementation of a pipeline and one globally optimized for parallelism and locality is often an order of magnitude. However, using existing programming tools, writing high-performance image processing code requires sacrificing simplicity, portability, and modularity. We argue that this is because traditional programming models conflate the computations defining the algorithm with decisions about intermediate storage and the order of computation, which we call the schedule. We propose a new programming language for image processing pipelines, called Halide, that separates the algorithm from its schedule. Programmers can change the schedule to express many possible organizations of a single algorithm. The Halide compiler then synthesizes a globally combined loop nest for an entire algorithm, given a schedule. Halide models a space of schedules which is expressive enough to describe organizations that match or outperform state-of-the-art hand-written implementations of many computational photography and computer vision algorithms. Its model is simple enough to do so often in only a few lines of code, and small changes generate efficient implementations for x86, ARM, Graphics Processors (GPUs), and specialized image processors, all from a single algorithm. Halide has been public and open source for over four years, during which it has been used by hundreds of programmers to deploy code to tens of thousands of servers and hundreds of millions of phones, processing billions of images every day.
引用
收藏
页码:106 / 115
页数:10
相关论文
共 50 条
  • [31] High-performance metal halide perovskite transistors
    Ao Liu
    Huihui Zhu
    Sai Bai
    Youjin Reo
    Mario Caironi
    Annamaria Petrozza
    Letian Dou
    Yong-Young Noh
    Nature Electronics, 2023, 6 : 559 - 571
  • [32] High-Performance Automotive Radar A review of signal processing algorithms and modulation schemes
    Hakobyan, Gor
    Yang, Bin
    IEEE SIGNAL PROCESSING MAGAZINE, 2019, 36 (05) : 32 - 44
  • [33] High-performance metal halide perovskite transistors
    Liu, Ao
    Zhu, Huihui
    Bai, Sai
    Reo, Youjin
    Caironi, Mario
    Petrozza, Annamaria
    Dou, Letian
    Noh, Yong-Young
    NATURE ELECTRONICS, 2023, 6 (08) : 559 - 571
  • [34] A Performance Estimator for Digital Image Processing Algorithms
    Koltsov, P. P.
    DOKLADY MATHEMATICS, 2011, 84 (02) : 753 - 755
  • [35] Performance evaluation of image processing algorithms in CADe
    Wirth, MA
    TECHNOLOGY IN CANCER RESEARCH & TREATMENT, 2005, 4 (02) : 159 - 172
  • [36] Performance evaluation of image processing algorithms on the GPU
    Castano-Diez, Daniel
    Moser, Dominik
    Schoenegger, Andreas
    Pruggnaller, Sabine
    Frangakis, Achilleas S.
    JOURNAL OF STRUCTURAL BIOLOGY, 2008, 164 (01) : 153 - 160
  • [37] A performance estimator for digital image processing algorithms
    P. P. Koltsov
    Doklady Mathematics, 2011, 84 : 753 - 755
  • [38] Performance evaluation of medical image processing algorithms
    Gee, JC
    MEDICAL IMAGING 2000: IMAGE PROCESSING, PTS 1 AND 2, 2000, 3979 : 19 - 27
  • [39] Performance of some image processing algorithms in TensorFlow
    Demirovic, Damir
    Skejic, Emir
    Serifovic-Trbalic, Amira
    2018 25TH INTERNATIONAL CONFERENCE ON SYSTEMS, SIGNALS AND IMAGE PROCESSING (IWSSIP), 2018,
  • [40] ImageNets - Framework for Fast Development of Robust and High Performance Image Processing Algorithms
    Lange, Uwe
    Kampe, Henning
    Graeser, Axel
    AT-AUTOMATISIERUNGSTECHNIK, 2013, 61 (03) : 203 - 212