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

利用多面体方法在 FPGA 上通过 stencil 专用高速缓存、数据复用和宽数据突发优化 stencil

Employing polyhedral methods to optimize stencils on FPGAs with stencil-specific caches, data reuse, and wide data bursts

Florian Mayer, Julian Brandner, Michael Philippsen

AI总结:

本文提出用多面体方法为 FPGA 自动生成 stencil 专用高速缓存、数据复用与宽突发访存结构,使 10 个 stencil 提速 43–156 倍。

摘要:

众所周知,为了在 CPU 或 GPU 上加速 stencil 代码并利用硬件高速缓存及其缓存行,优化器必须发现数组访问的空间和时间局部性,以获取数据复用机会。在 FPGA 上存在一个负担,即没有内置高速缓存(或者只有针对高速缓存块的预构建硬件描述,而这些描述对 stencil 代码而言效率低下)。但本文表明,这种缺失也是一个机会,因为可以使用多面体方法在 FPGA 上生成尺寸合适的 stencil 专用高速缓存结构,并在 stencil 执行期间通过宽突发高效地填充和清空它们。本文展示了如何从 stencil 代码中推导适当的指令和代码重构,以便 FPGA 编译器生成快速的 stencil 硬件。启用我们的优化后,一组 10 个 stencil 的运行时间提升了 43 倍至 156 倍。

英文摘要:

It is well known that to accelerate stencil codes on CPUs or GPUs and to exploit hardware caches and their lines optimizers must find spatial and temporal locality of array accesses to harvest data-reuse opportunities. On FPGAs there is the burden that there are no built-in caches (or only pre-built hardware descriptions for cache blocks that are inefficient for stencil codes). But this paper demonstrates that this lack is also a chance as polyhedral methods can be used to generate stencil-specific cache-structures of the right sizes on the FPGA and to fill and flush them efficiently with wide bursts during stencil execution. The paper shows how to derive the appropriate directives and code restructurings from stencil codes so that the FPGA compiler generates fast stencil hardware. Switching on our optimization improves the runtime of a set of 10 stencils by between 43x and 156x.

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

↑