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 条
  • [21] High-performance computing service over the Internet for intraoperative image processing
    Kawasaki, Y
    Ino, F
    Mizutani, Y
    Fujimoto, N
    Sasama, T
    Sato, Y
    Sugano, N
    Tamura, S
    Hagihara, K
    IEEE TRANSACTIONS ON INFORMATION TECHNOLOGY IN BIOMEDICINE, 2004, 8 (01): : 36 - 46
  • [22] A HIGH-PERFORMANCE IMAGE ACQUISITION AND PROCESSING UNIT USING FPGA TECHNOLOGIES
    Kimura, Shinichi
    Terakura, Masato
    Miyasaka, Akira
    Sakamoto, Nobuomi
    Miyashita, Naoki
    Funase, Ryu
    Sawada, Hirotaka
    APPLICATIONS OF SPACE TECHNOLOGY FOR HUMANITY, 2010, 138 : 407 - 414
  • [23] HIGH-PERFORMANCE IMAGE-PROCESSING SYSTEM WITH PERSONAL-COMPUTER
    FUKAMACHI, M
    TETSU TO HAGANE-JOURNAL OF THE IRON AND STEEL INSTITUTE OF JAPAN, 1985, 71 (07): : 912 - 913
  • [24] The long and winding road to high-performance image processing with MMX/SSE
    Conte, G
    Tommesani, S
    Zanichelli, F
    5TH INTERNATIONAL WORKSHOP ON COMPUTER ARCHITECTURES FOR MACHINE PERCEPTION, PROCEEDINGS, 2000, : 302 - 310
  • [25] Window memoization: an efficient hardware architecture for high-performance image processing
    Khalvati, Farzad
    Aagaard, Mark D.
    JOURNAL OF REAL-TIME IMAGE PROCESSING, 2010, 5 (03) : 195 - 212
  • [26] High-Performance Image Acquisition and Processing System with MTCA.4
    Makowski, D.
    Mielczarek, A.
    Perek, P.
    Jablonski, G.
    Orlikowski, M.
    Napieralski, A.
    Makijarvi, P.
    Simrock, S.
    Martin, V.
    2014 19TH IEEE-NPSS REAL TIME CONFERENCE (RT), 2014,
  • [27] Exact window memoization: an optimization method for high-performance image processing
    Farzmandi, Mojtaba
    Luo, Rong
    JOURNAL OF REAL-TIME IMAGE PROCESSING, 2019, 16 (02) : 491 - 503
  • [28] High-Performance Image Acquisition and Processing System with MTCA.4
    Makowski, D.
    Mielczarek, A.
    Perek, P.
    Jablonski, G.
    Orlikowski, M.
    Sakowicz, B.
    Napieralski, A.
    Makijarvi, P.
    Simrock, S.
    Martin, V.
    IEEE TRANSACTIONS ON NUCLEAR SCIENCE, 2015, 62 (03) : 925 - 931
  • [29] Exact window memoization: an optimization method for high-performance image processing
    Mojtaba Farzmahdi
    Rong Luo
    Journal of Real-Time Image Processing, 2019, 16 : 491 - 503
  • [30] Window memoization: an efficient hardware architecture for high-performance image processing
    Farzad Khalvati
    Mark D. Aagaard
    Journal of Real-Time Image Processing, 2010, 5 : 195 - 212