International Journal of Parallel Programming

, Volume 43, Issue 5, pp 752–785

pocl: A Performance-Portable OpenCL Implementation

  • Pekka Jääskeläinen
  • Carlos Sánchez de La Lama
  • Erik Schnetter
  • Kalle Raiskila
  • Jarmo Takala
  • Heikki Berg
Article

DOI: 10.1007/s10766-014-0320-y

Cite this article as:
Jääskeläinen, P., de La Lama, C.S., Schnetter, E. et al. Int J Parallel Prog (2015) 43: 752. doi:10.1007/s10766-014-0320-y

Abstract

OpenCL is a standard for parallel programming of heterogeneous systems. The benefits of a common programming standard are clear; multiple vendors can provide support for application descriptions written according to the standard, thus reducing the program porting effort. While the standard brings the obvious benefits of platform portability, the performance portability aspects are largely left to the programmer. The situation is made worse due to multiple proprietary vendor implementations with different characteristics, and, thus, required optimization strategies. In this paper, we propose an OpenCL implementation that is both portable and performance portable. At its core is a kernel compiler that can be used to exploit the data parallelism of OpenCL programs on multiple platforms with different parallel hardware styles. The kernel compiler is modularized to perform target-independent parallel region formation separately from the target-specific parallel mapping of the regions to enable support for various styles of fine-grained parallel resources such as subword SIMD extensions, SIMD datapaths and static multi-issue. Unlike previous similar techniques that work on the source level, the parallel region formation retains the information of the data parallelism using the LLVM IR and its metadata infrastructure. This data can be exploited by the later generic compiler passes for efficient parallelization. The proposed open source implementation of OpenCL is also platform portable, enabling OpenCL on a wide range of architectures, both already commercialized and on those that are still under research. The paper describes how the portability of the implementation is achieved. We test the two aspects to portability by utilizing the kernel compiler and the OpenCL implementation to run OpenCL applications in various platforms with different style of parallel resources. The results show that most of the benchmarked applications when compiled using pocl were faster or close to as fast as the best proprietary OpenCL implementation for the platform at hand.

Keywords

OpenCL LLVM GPGPU VLIW SIMD Parallel programming Heterogeneous platforms Performance portability 

Copyright information

© Springer Science+Business Media New York 2014

Authors and Affiliations

  • Pekka Jääskeläinen
    • 1
  • Carlos Sánchez de La Lama
    • 2
  • Erik Schnetter
    • 3
    • 4
    • 5
  • Kalle Raiskila
    • 6
  • Jarmo Takala
    • 1
  • Heikki Berg
    • 6
  1. 1.Tampere University of TechnologyTampereFinland
  2. 2.Knowledge Development for POFMadridSpain
  3. 3.Perimeter Institute for Theoretical PhysicsWaterlooCanada
  4. 4.Department of PhysicsUniversity of GuelphGuelphCanada
  5. 5.Center for Computation and TechnologyLouisiana State UniversityBaton RougeUSA
  6. 6.Nokia Research CenterEspooFinland

Personalised recommendations