arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1611.07083cs.DC
收藏

一种性能可移植的OpenCL实现

pocl: A Performance-Portable OpenCL Implementation

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

摘要:

OpenCL是异构系统并行编程的标准。通用编程标准的好处是显而易见的;多个供应商可以为根据该标准编写的应用程序描述提供支持,从而减少程序移植工作。虽然该标准带来了平台可移植性的明显好处,但性能可移植性方面主要留给程序员。由于多个专有供应商实现具有不同的特性,因此需要优化策略,情况变得更糟。在本文中,我们提出了一个OpenCL的实现,是便携式和性能便携式。它的核心是一个内核编译器,可用于在具有不同并行硬件风格的多个平台上开发OpenCL程序的数据并行。内核编译器被模块化,以执行独立于目标的并行区域的形成与区域的特定于目标的并行映射分开,以支持各种风格的细粒度并行资源,例如子字SIMD扩展、SIMD数据路径和静态多问题。与以前在源级别上工作的类似技术不同,并行区域形成使用LLVM IR及其元数据基础设施来保留数据并行的信息。这些数据可以被后来的通用编译器通道利用,以实现高效的并行化。OpenCL的开源实现也是平台可移植的,使OpenCL能够在广泛的体系结构上运行,无论是已经商业化的还是仍在研究中的。本文介绍了如何实现的可移植性。我们的研究结果表明,大多数基准测试的应用程序使用pocl编译时,速度更快或接近手头的平台上最好的专有OpenCL实现一样快。

英文摘要:

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. Our 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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑