arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1502.02389cs.DCcs.PFcs.PL
收藏

系统代码生成的模式和重写规则(从高级功能模式到高性能OpenCL代码)

Patterns and Rewrite Rules for Systematic Code Generation (From High-Level Functional Patterns to High-Performance OpenCL Code)

Michel Steuwer, Christian Fensch, Christophe Dubach

摘要:

随着组合多核CPU和GPU的异构硬件的出现,计算系统变得越来越复杂。这些并行系统表现出巨大的计算能力,在增加编程工作的成本。这导致了实现性能和代码可移植性之间的矛盾。代码要么使用特定于设备的优化进行调优以实现最大性能,要么用高级语言编写以牺牲性能来实现可移植性。我们提出了一种新的方法,提供高层次的编程,代码的可移植性和高性能。它基于算法模式组合,再加上一组强大而简单的重写规则。这使得能够将高级程序系统地转换和优化为导致高性能代码的低级硬件特定表示。我们在实践中测试我们的设计,通过描述一个子集的OpenCL编程模型与低级别的模式,并通过实现一个编译器,生成高性能的OpenCL代码。我们的实验表明,我们可以系统地从简单的高层次的算法表达式获得高性能的设备特定的实现。生成的OpenCL代码的性能与专家编写的针对多核CPU和GPU的高度调优实现不相上下

英文摘要:

Computing systems have become increasingly complex with the emergence of heterogeneous hardware combining multicore CPUs and GPUs. These parallel systems exhibit tremendous computational power at the cost of increased programming effort. This results in a tension between achieving performance and code portability. Code is either tuned using device-specific optimizations to achieve maximum performance or is written in a high-level language to achieve portability at the expense of performance. We propose a novel approach that offers high-level programming, code portability and high-performance. It is based on algorithmic pattern composition coupled with a powerful, yet simple, set of rewrite rules. This enables systematic transformation and optimization of a high-level program into a low-level hardware specific representation which leads to high performance code. We test our design in practice by describing a subset of the OpenCL programming model with low-level patterns and by implementing a compiler which generates high performance OpenCL code. Our experiments show that we can systematically derive high-performance device-specific implementations from simple high-level algorithmic expressions. The performance of the generated OpenCL code is on par with highly tuned implementations for multicore CPUs and GPUs written by experts

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

↑