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

Lingqi Zhang, Mohamed Wahib, Peng Chen, Jintao Meng, Xiao Wang +2 more
4/5/2022
cs.DC

Official code: neozhang307/PERKS (14 stars, Cuda, BSD-3-Clause, last commit 2023-05-24).

Abstract

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations(1)

neozhang307/PERKSOfficial100%
BSD-3-Clause

persistent kernel sample implementation of iterative stencil solver and conjugate gradient solver

141Cuda, C++Oct 5, 20213 years agoBSD-3-Clause

Similar Papers

Cite this paper

@article{zhang2022perks,
  title  = {PERKS: a Locality-Optimized Execution Model for Iterative Memory-bound GPU Applications},
  author = {Lingqi Zhang and Mohamed Wahib and Peng Chen and Jintao Meng and Xiao Wang and Toshio Endo and Satoshi Matsuoka},
  year   = {2022},
  eprint = {2204.02064},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2204.02064}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2204.02064.svg)](https://codeofpaper.com/paper/2204.02064)

Discussion