Copperhead: Compiling an Embedded Data Parallel Language

被引:0
|
作者
Catanzaro, Bryan [1 ]
Garland, Michael
Keutzer, Kurt [1 ]
机构
[1] Univ Calif Berkeley, Berkeley, CA 94720 USA
关键词
!text type='Python']Python[!/text; Data Parallelism; GPU; Algorithms; Design; Performance;
D O I
10.1145/2038037.1941562
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Modern parallel microprocessors deliver high performance on applications that expose substantial fine-grained data parallelism. Although data parallelism is widely available in many computations, implementing data parallel algorithms in low-level languages is often an unnecessarily difficult task. The characteristics of parallel microprocessors and the limitations of current programming methodologies motivate our design of Copperhead, a high-level data parallel language embedded in Python. The Copperhead programmer describes parallel computations via composition of familiar data parallel primitives supporting both flat and nested data parallel computation on arrays of data. Copperhead programs are expressed in a subset of the widely used Python programming language and interoperate with standard Python modules, including libraries for numeric computation, data visualization, and analysis. In this paper, we discuss the language, compiler, and runtime features that enable Copperhead to efficiently execute data parallel code. We define the restricted subset of Python which Copperhead supports and introduce the program analysis techniques necessary for compiling Copperhead code into efficient low-level implementations. We also outline the runtime support by which Copperhead programs interoperate with standard Python modules. We demonstrate the effectiveness of our techniques with several examples targeting the CUDA platform for parallel programming on GPUs. Copperhead code is concise, on average requiring 3.6 times fewer lines of code than CUDA, and the compiler generates efficient code, yielding 45-100% of the performance of hand-crafted, well optimized CUDA code.
引用
收藏
页码:47 / 56
页数:10
相关论文
共 50 条
  • [1] Compiling data parallel tasks for coordinated execution
    Laure, E
    Haines, M
    Mehrotra, P
    Zima, H
    EURO-PAR'99: PARALLEL PROCESSING, 1999, 1685 : 413 - 417
  • [2] COMPILING TASK AND DATA PARALLEL PROGRAMS FOR IWARP
    GROSS, T
    HINRICHS, S
    LUEH, G
    OHALLARON, D
    STICHNOTH, J
    SUBHLOK, J
    SIGPLAN NOTICES, 1993, 28 (01): : 32 - 35
  • [3] Compiling data-parallel programs for clusters of SMPs
    Benkner, S
    Brandes, T
    CONCURRENCY AND COMPUTATION-PRACTICE & EXPERIENCE, 2004, 16 (2-3): : 111 - 132
  • [4] Compiling embedded languages
    Elliott, C
    Finne, S
    de Moor, O
    SEMANTICS, APPLICATIONS AND IMPLEMENTATION OF PROGRAM GENERATION, PROCEEDINGS, 2000, 1924 : 9 - 27
  • [5] Compiling embedded languages
    Elliott, C
    Finne, S
    De Moor, O
    JOURNAL OF FUNCTIONAL PROGRAMMING, 2003, 13 : 455 - 481
  • [6] Language-independent methods for compiling monolingual lexical data
    Biemann, C
    Bordag, S
    Heyer, G
    Quasthoff, U
    Wolff, C
    COMPUTATIONAL LINGUISTICS AND INTELLIGENT TEXT PROCESSING, 2004, 2945 : 217 - 228
  • [7] Compiling array references with affine functions for data-parallel programs
    Wei, WH
    Shih, KP
    Sheu, JP
    JOURNAL OF INFORMATION SCIENCE AND ENGINEERING, 1998, 14 (04) : 695 - 723
  • [8] Array regrouping and its use in compiling data-intensive embedded applications
    De la Luz, V
    Kandemir, M
    IEEE TRANSACTIONS ON COMPUTERS, 2004, 53 (01) : 1 - 19
  • [9] Compiling Cross-Language Network Programs Into Hybrid Data Plane
    Li, Hao
    Zhang, Peng
    Sun, Guangda
    Cao, Wanyue
    Hu, Chengchen
    Shan, Danfeng
    Pan, Tian
    Fu, Qiang
    IEEE-ACM TRANSACTIONS ON NETWORKING, 2022, 30 (03) : 1088 - 1103
  • [10] Compiling data-parallel programs to a distributed runtime environment with thread isomigration
    Antoniu, G
    Bougé, L
    Namyst, R
    Perez, C
    INTERNATIONAL CONFERENCE ON PARALLEL AND DISTRIBUTED PROCESSING TECHNIQUES AND APPLICATIONS, VOLS I-V, PROCEEDINGS, 1999, : 1756 - 1762