arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1410.6685cs.DCcs.SE
收藏

基于契约的通用GPU编程

Contract-Based General-Purpose GPU Programming

Alexey Kolesnichenko, Christopher M. Poskitt, Sebastian Nanz, Bertrand Meyer

摘要:

使用GPU作为通用处理器,通过为大量且不断增长的算法集提供台式机上的大规模数据并行化,彻底改变了并行计算。然而,广泛采用的一个障碍是编程的困难和实现良好性能所需的硬件的低级控制。本文提出了一个编程库,SafeGPU,旨在达到程序员的生产力和性能之间的平衡,使GPU的数据并行操作可从一个经典的面向对象的程序设计语言。该解决方案与合同设计方法相结合,通过将可执行程序规范嵌入到程序文本中,提高了对功能程序正确性的信心。我们表明,我们的库导致模块化和维护代码,可访问GPGPU的非专家,同时提供的性能是与手写的CUDA代码。此外,运行时合约检查是可行的,因为合约可以在GPU上执行。

英文摘要:

Using GPUs as general-purpose processors has revolutionized parallel computing by offering, for a large and growing set of algorithms, massive data-parallelization on desktop machines. An obstacle to widespread adoption, however, is the difficulty of programming them and the low-level control of the hardware required to achieve good performance. This paper suggests a programming library, SafeGPU, that aims at striking a balance between programmer productivity and performance, by making GPU data-parallel operations accessible from within a classical object-oriented programming language. The solution is integrated with the design-by-contract approach, which increases confidence in functional program correctness by embedding executable program specifications into the program text. We show that our library leads to modular and maintainable code that is accessible to GPGPU non-experts, while providing performance that is comparable with hand-written CUDA code. Furthermore, runtime contract checking turns out to be feasible, as the contracts can be executed on the GPU.

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

↑