Copperhead

Copperhead: Compiling an embedded data parallel language. 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.


References in zbMATH (referenced in 5 articles )

Showing results 1 to 5 of 5.
Sorted by year (citations)

  1. Rompf, Tiark; Amin, Nada: A SQL to C compiler in 500 lines of code (2019)
  2. Svensson, Bo Joel; Newton, Ryan R.; Sheeran, Mary: A language for hierarchical data parallel design-space exploration on GPUs (2016)
  3. Viñas, Moisés; Bozkus, Zeki; Fraguela, Basilio B.: Exploiting heterogeneous parallelism with the heterogeneous programming library (2013) ioport
  4. Klöckner, Andreas; Pinto, Nicolas; Lee, Yunsup; Catanzaro, Bryan; Ivanov, Paul; Fasih, Ahmed: PyCUDA and PyOpenCL: a scripting-based approach to GPU run-time code generation (2012) ioport
  5. Strzodka, Robert: Data layout optimization for multi-valued containers in opencl (2012) ioport