Tiling optimizations for stencil computations using rewrite rules in Lift

Stoltzfus, L., Hagedorn, B., Steuwer, M. , Gorlatch, S. and Dubach, C. (2019) Tiling optimizations for stencil computations using rewrite rules in Lift. ACM Transactions on Architecture and Code Optimization, 16(4), 52. (doi: 10.1145/3368858)

[img]
Preview
Text
205600.pdf - Accepted Version

1MB

Abstract

Stencil computations are a widely used type of algorithm, found in applications from physical simulations to machine learning. Stencils are embarrassingly parallel, therefore fit on modern hardware such as Graphic Processing Units perfectly. Although stencil computations have been extensively studied, optimizing them for increasingly diverse hardware remains challenging. Domain-specific Languages (DSLs) have raised the programming abstraction and offer good performance; however, this method places the burden on DSL implementers to write almost full-fledged parallelizing compilers and optimizers. Lift has recently emerged as a promising approach to achieve performance portability by using a small set of reusable parallel primitives that DSL or library writers utilize. Lift’s key novelty is in its encoding of optimizations as a system of extensible rewrite rules which are used to explore the optimization space. This article demonstrates how complex multi-dimensional stencil code and optimizations are expressed using compositions of simple 1D Lift primitives and rewrite rules. We introduce two optimizations that provide high performance for stencils in particular: classical overlapped tiling for multi-dimensional stencils and 2.5D tiling specifically for 3D stencils. We provide an in-depth analysis on how the tiling optimizations affects stencils of different shapes and sizes across different applications. Our experimental results show that our approach outperforms existing compiler approaches and hand-tuned codes.

Item Type:Articles
Status:Published
Refereed:Yes
Glasgow Author(s) Enlighten ID:Steuwer, Dr Michel
Authors: Stoltzfus, L., Hagedorn, B., Steuwer, M., Gorlatch, S., and Dubach, C.
College/School:College of Science and Engineering > School of Computing Science
Journal Name:ACM Transactions on Architecture and Code Optimization
Publisher:ACM
ISSN:1544-3566
ISSN (Online):1544-3973
Copyright Holders:Copyright © 2019 The Authors
Publisher Policy:Reproduced in accordance with the copyright policy of the publisher

University Staff: Request a correction | Enlighten Editors: Update this record