Back to results

Universität Passau

Automatic Performance Optimization of Stencil Codes

Abstract

dc:description.abstract

A widely used class of codes are stencil codes. Their general structure is very simple: data points in a large grid are repeatedly recomputed from neighboring values. This predefined neighborhood is the so-called stencil. Despite their very simple structure, stencil codes are hard to optimize since only few computations are performed while a comparatively large number of values have to be accessed, i.e., stencil codes usually have a very low computational intensity. Moreover, the set of optimizations and their parameters also depend on the hardware on which the code is executed. To cut a long story short, current production compilers are not able to fully optimize this class of codes and optimizing each application by hand is not practical. As a remedy, we propose a set of optimizations and describe how they can be applied automatically by a code generator for the domain of stencil codes. A combination of a space and time tiling is able to increase the data locality, which significantly reduces the memory-bandwidth requirements: a standard three-dimensional 7-point Jacobi stencil can be accelerated by a factor of 3. This optimization can target basically any stencil code, while others are more specialized. E.g., support for arbitrary linear data layout transformations is especially beneficial for colored kernels, such as a Red-Black Gauss-Seidel smoother. On the one hand, an optimized data layout for such kernels reduces the bandwidth requirements while, on the other hand, it simplifies an explicit vectorization. Other noticeable optimizations described in detail are redundancy elimination techniques to eliminate common subexpressions both in a sequence of statements and across loop boundaries, arithmetic simplifications and normalizations, and the vectorization mentioned previously. In combination, these optimizations are able to increase the performance not only of the model problem given by Poisson’s equation, but also of real-world applications: an optical flow simulation and the simulation of a non-isothermal and non-Newtonian fluid flow.

Degree

thesis:*
Level thesis:degree_level
thesis.doctoral
Grantor dc:publisher
Universität Passau
Year
2019

Author and committee

dc:creator, dc:contributor.*
Author dc:creator
  • Kronawitter, Stefan
Contributors dc:contributor
  • Lengauer, Christian
  • Wellein, Gerhard

Rights

dc:rights
Statement dc:rights
  • Standardbedingung laut Einverständniserklärung

Identifiers

dc:identifier.*
OAI identifier oai:identifier
oai:kobv.de-opus4-uni-passau:761

Chain of custody

source
Harvested from
Universität Passau
Base URL
opus4.kobv.de/opus4-uni-passau/oai
Last updated
2026-07-24
Source record
OAI-PMH GetRecord
citation

Kronawitter, Stefan. Automatic Performance Optimization of Stencil Codes. thesis.doctoral thesis, Universität Passau, 2019. https://opus4.kobv.de/opus4-uni-passau/frontdoor/index/index/docId/761