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

面向FPGA优化性能的遗留科学代码到OpenCL的自动转换

Towards Automatic Transformation of Legacy Scientific Code into OpenCL for Optimal Performance on FPGAs

Wim Vanderbauwhede, Syed Waqar Nabi

摘要:

有大量的传统科学代码是用Fortran等语言编写的,这些代码没有经过优化,无法从GPU和FPGA等异构加速设备中获得最佳性能,手动将这些代码移植到OpenCL等并行语言框架中需要付出相当大的努力。我们正在努力开发一个交钥匙,自我优化的编译器,以加速科学应用,可以自动将遗留代码转换为异构目标的解决方案。在本文中,我们专注于FPGA作为加速设备,并进行我们的讨论的情况下,OpenCL编程框架。我们展示了一条自动创建内核的路线,这些内核以“流”方式进行了优化,从而在FPGA上实现了最佳性能。我们使用一个二维浅水模型作为说明,具体来说,我们展示了如何使用\emph{channels}直接对等内核之间的通信和使用片上内存创建模板缓冲区可以导致显着的性能改善。我们的研究结果表明,FPGA性能更好的基准CPU实现,更好的能源效率对CPU和GPU的实现。

英文摘要:

There is a large body of legacy scientific code written in languages like Fortran that is not optimised to get the best performance out of heterogeneous acceleration devices like GPUs and FPGAs, and manually porting such code into parallel languages frameworks like OpenCL requires considerable effort. We are working towards developing a turn-key, self-optimising compiler for accelerating scientific applications, that can automatically transform legacy code into a solution for heterogeneous targets. In this paper we focus on FPGAs as the acceleration devices, and carry out our discussion in the context of the OpenCL programming framework. We show a route to automatic creation of kernels which are optimised for execution in a "streaming" fashion, which gives optimal performance on FPGAs. We use a 2D shallow-water model as an illustration; specifically we show how the use of \emph{channels} to communicate directly between peer kernels and the use of on-chip memory to create stencil buffers can lead to significant performance improvements. Our results show better FPGA performance against a baseline CPU implementation, and better energy-efficiency against both CPU and GPU implementations.

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

↑