Delivering Performance-Portable Stencil Computations on CPUs and GPUs Using Bricks
Delivering Performance-Portable Stencil Computations on CPUs and GPUs Using Bricks
复制标题
使用 Brick 在 CPU 和 GPU 上提供性能可移植的模板计算
DOI:
--
复制
发表时间:
2018
期刊:
影响因子:
--
通讯作者:
H. Johansen
中科院分区:
文献类型:
--
作者:
Tuowen Zhao;Samuel Williams;Mary W. Hall;H. Johansen
Achieving high performance on stencil computations poses a number of challenges on modern architectures. The optimization strategy varies significantly across architectures, types of stencils, and types of applications. The standard approach to adapting stencil computations to different architectures, used by both compilers and application programmers, is through the use of iteration space tiling, whereby the data footprint of the computation and its computation partitioning are adjusted to match the memory hierarchy and available parallelism of different platforms. In this paper, we explore an alternative performance portability strategy for stencils, a data layout library for stencils called bricks, that adapts data footprint and parallelism through fine-grained data blocking. Bricks are designed to exploit the inherent multi-dimensional spatial locality of stencils, facilitating improved code generation that can adapt to CPUs or GPUs, and reducing pressure on the memory system. We demonstrate that bricks are performance-portable across CPU and GPU architectures and afford performance advantages over various tiling strategies, particularly for modern multi-stencil and high-order stencil computations. For a range of stencil computations, we achieve high performance on both the Intel Knights Landing (Xeon Phi) and Skylake (Xeon) CPUs as well as the NVIDIA P100 (Pascal) GPU delivering up to a 5x speedup against tiled code.