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

PERKS:面向迭代型内存受限GPU应用的局部性优化执行模型

PERKS: a Locality-Optimized Execution Model for Iterative Memory-bound GPU Applications

Lingqi Zhang, Mohamed Wahib, Peng Chen, Jintao Meng, Xiao Wang, Toshio Endo, Satoshi Matsuoka

AI总结:

针对迭代型内存受限GPU应用,提出持久内核执行模型PERKS,将时间循环移入内核并利用寄存器/共享内存缓存减少访存,在2D/3D模板和共轭梯度求解器上分别获得最高2.12倍和4.86倍加速。

摘要:

迭代型内存受限求解器常见于高性能计算代码中。典型的GPU实现会在主机端设置一个循环,按照时间或算法步骤的数量调用GPU内核。每个内核的终止隐式地充当了每步推进解之后所需的屏障。我们提出了一种用于运行内存受限迭代GPU内核的执行模型:持久内核(PERsistent KernelS,PERKS)。在该模型中,时间循环被移入持久内核内部,并使用设备级屏障进行同步。然后,我们通过在每个时间步中将输出子集缓存到未使用的寄存器和共享内存中,来减少对设备内存的流量。PERKS可以推广到任何迭代求解器:它们在很大程度上独立于求解器的实现。我们阐述了PERKS的设计原理,并展示了PERKS在广泛的迭代2D/3D模板基准测试中的有效性(与最先进的库相比,2D模板的几何平均加速比为2.12倍,3D模板为1.24倍),以及Krylov子空间共轭梯度求解器(与最先进的库相比,在SuiteSparse中较小的SpMV数据集上几何平均加速比为4.86倍,在较大的SpMV数据集上为1.43倍)。所有基于PERKS的实现可在以下网址获取:https://github.com/neozhang307/PERKS。

英文摘要:

Iterative memory-bound solvers commonly occur in HPC codes. Typical GPU implementations have a loop on the host side that invokes the GPU kernel as much as time/algorithm steps there are. The termination of each kernel implicitly acts the barrier required after advancing the solution every time step. We propose an execution model for running memory-bound iterative GPU kernels: PERsistent KernelS (PERKS). In this model, the time loop is moved inside persistent kernel, and device-wide barriers are used for synchronization. We then reduce the traffic to device memory by caching subset of the output in each time step in the unused registers and shared memory. PERKS can be generalized to any iterative solver: they largely independent of the solver's implementation. We explain the design principle of PERKS and demonstrate effectiveness of PERKS for a wide range of iterative 2D/3D stencil benchmarks (geomean speedup of $2.12$x for 2D stencils and $1.24$x for 3D stencils over state-of-art libraries), and a Krylov subspace conjugate gradient solver (geomean speedup of $4.86$x in smaller SpMV datasets from SuiteSparse and $1.43$x in larger SpMV datasets over a state-of-art library). All PERKS-based implementations available at: https://github.com/neozhang307/PERKS.

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

↑