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 条
  • [1] Decoupling Algorithms from Schedules for Easy Optimization of Image Processing Pipelines
    Ragan-Kelley, Jonathan
    Adams, Andrew
    Paris, Sylvain
    Levoy, Marc
    Amarasinghe, Saman
    Durand, Fredo
    ACM TRANSACTIONS ON GRAPHICS, 2012, 31 (04):
  • [2] High-Performance Digital Image Processing
    P. V. Bezmaternykh
    D. P. Nikolaev
    V. L. Arlazarov
    Pattern Recognition and Image Analysis, 2023, 33 : 743 - 755
  • [3] High-Performance Digital Image Processing
    Bezmaternykh, P. V.
    Nikolaev, D. P.
    Arlazarov, V. L.
    PATTERN RECOGNITION AND IMAGE ANALYSIS, 2023, 33 (04) : 743 - 755
  • [4] High-performance image processing on the desktop
    Jordan, SD
    IMAGE DISPLAY: MEDICAL IMAGING 1996, 1996, 2707 : 370 - 377
  • [5] Evaluation on high-performance image compaction algorithms in spatio-temporal data processing
    Li, Guozhang
    Xing, Kongduo
    Alfred, Rayner
    Wang, Yetong
    INTELLIGENT DECISION TECHNOLOGIES-NETHERLANDS, 2024, 18 (04): : 2885 - 2899
  • [6] Image processing on high-performance RISC systems
    Baglietto, P
    Maresca, M
    Migliardi, M
    Zingirian, N
    PROCEEDINGS OF THE IEEE, 1996, 84 (07) : 917 - 930
  • [7] A framework of high-performance computation algorithms for processing satellite
    Wan, Wei
    Hao, Xuetao
    Sun, Jijuan
    Zhu, Lingya
    Hou, Minghui
    Journal of Information and Computational Science, 2013, 10 (08): : 2391 - 2397
  • [9] Technology of high-performance image processing on multiprocessor computer
    E. V. Rusin
    Pattern Recognition and Image Analysis, 2012, 22 (3) : 470 - 472
  • [10] HIGH-PERFORMANCE IMAGE-PROCESSING SYSTEM FOR SEM
    ISHIKAWA, H
    IWATA, T
    UCHIKAWA, Y
    HATTORI, M
    MATSUDA, Y
    JOURNAL OF ELECTRON MICROSCOPY, 1989, 38 (04): : 299 - 299