Accelerating high‐order stencils on GPUs
- 22 August 2021
- journal article
- research article
- Published by Wiley in Concurrency and Computation: Practice and Experience
- Vol. 34 (20) , e6467
Abstract
Summary: Finite‐difference methods based on high‐order stencils are commonly used for modeling of seismic wave propagation, weather forecasting, computational fluid dynamics, convolutional neural networks, and others. Nowadays, the community commonly employs graphics processing units (GPUs) to accelerate such stencil computations. As a result, knowing how to write efficient stencil computations for GPUs is of significant interest. While high‐performance, low‐order stencils on GPUs have been studied extensively in the literature, not all proposed approaches work well for high‐order stencils. Furthermore, coping with boundary conditions used with stencils for seismic modeling makes it challenging to efficiently exploit thread‐level parallelism on GPUs. In this article, we describe several implementations of a 25‐point stencil. We evaluate our stencil code shapes, memory hierarchy usage, data access patterns, and other performance attributes on several modern GPUs and compare them with machine rooflines. On average, our top‐performing kernels achieve six times the performance of a 25‐point stencil code developed in C and mapped to GPUs using OpenACC. Several of our implementations have excellent performance portability across multiple generations of both NVIDIA and AMD GPUs.Keywords
All Related Versions
This publication has 30 references indexed in Scilit:
- Algorithm 942ACM Transactions on Mathematical Software, 2014
- Towards a performance portable, architecture agnostic implementation strategy for weather and climate modelsSupercomputing Frontiers and Innovations, 2014
- High-performance code generation for stencil computations on GPU architectures2012
- Introducing the Semi-stencil AlgorithmLecture Notes in Computer Science, 2010
- RooflineCommunications of the ACM, 2009
- 3D finite difference computation on GPUs using CUDA2009
- A practical automatic polyhedral parallelizer and locality optimizerACM SIGPLAN Notices, 2008
- Effective automatic parallelization of stencil computationsACM SIGPLAN Notices, 2007
- The cache complexity of multithreaded cache oblivious algorithms2006
- Cache oblivious stencil computations2005