Computational Science Technical Note CSTN-087

CSTN Home

Automatically Generating Efficient Simulation Codes on GPUs from Partial Differential Equations

K. A. Hawick and D. P. Playne

Archived April 2009, Revised July 2010

Abstract

We show how compiler technology can generate fast and efficient yet human-readable data-parallel simulation code for solving certain partial differential equation (PDE) based problems. We present a code parser and generator based on an ANTLR grammar and tree walking approach that transforms a mathematical formulation of an equation such as the Cahn-Hilliard family into simulation software in C++ or in NVIDIA's Compute Unified Device Architecture (CUDA) language for programming Graphical Processing Units (GPUS). We present software architectural ideas, generated specimen code and detailed performance data on modern GPUs. We discuss how code generation techniques can be used to speed up code development and computational run time for related complex system simulation problems.

Keywords: automatic code generation; compiler; grammar; partial differential equation; finite difference, stencil; GPU.

Full Document Text: PDF version.

Citation Information: BiBTeX database for CSTN Notes.

BiBTeX reference:

@TECHREPORT{CSTN-087,
  author = {K. A. Hawick and D. P. Playne},
  title = {{Automatically Generating Efficient Simulation Codes on GPUs from
	Partial Differential Equations}},
  institution = {Computer Science, Massey University},
  year = {2010},
  number = {CSTN-087},
  address = {Albany, North Shore 102-904, Auckland, New Zealand},
  month = {July},
  timestamp = {2009.09.06},
  url = {http://www.massey.ac.nz/~kahawick/cstn/087/cstn-087.pdf}
}


[ CSTN Index | CSTN BiBTeX ]