No.019 Bridging the theory of staged programming languages and the practice of high-performance computing

Icon

NII Shonan Meeting – Seminar site

Overview

This discussion-heavy workshop aims to bridge the theory of programming languages (PL) with the practice of high-performance computing (HPC). The topic of the discussion will be code generation, or staging, a form of meta-programming. Both the PL and HPC communities have come to realize the importance of code generation: whereas PL theorists widely regard staging as the leading approach to making modular software and expressive languages run fast, HPC practitioners widely regard staging as the leading approach to making high-performance software reusable and maintainable. Thanks to this confluence of theory and practice, we have the rare chance to bring together PL researchers and the potential consumers of their work.

A particular area of current interest shared by PL and HPC researchers is how to use domain-specific languages (DSL) to capture and automate patterns and techniques of code generation, transformation, and optimization that recur in an application domain. For example, HPC has created and benefited from expressive DSLs such as OpenMP directives, SPIRAL’s signal processing language, and specialized languages for stencil computations and domain decomposition. Moreover, staging helps to build efficient and expressive DSLs because it assures that the generated code is correct in the form of precise static guarantees.

Alas, the communication between PL researchers working on staging and HPC practitioners could be better. On one hand, HPC practitioners often do not know what PL research offers. For example, current staging technology not only makes sure that the generated code compiles without problems, but further eliminates frequent problems such as matrix dimension mismatch. Staged programming can detect and prevent these problems early during development, thus relieving users from scouring reams of obscure generated code to debug compiler errors, or waiting for expensive trial computations to produce dubious results. On the other hand, PL researchers often do not know how much HPC practitioners who write code generators value this or that theoretical advance or pragmatic benefit?in other words, how the HPC wish list is ranked by importance.

This workshop aims to solicit and discuss real-world applications of assured code generation in HPC that would drive PL research in meta-programming. Specifically, we would like to determine:

  • how viable assured (MetaOCaml-like) meta-programming is for real-world applications;
  • how strong the demand is for static assurances on the generated code: well-formedness, well-typedness, numeric stability, absence of buffer overflows or dimension mismatch errors, etc.;
  • how important portability is, whether to move to a different target language or a different hardware platform;
  • which difficulties are “just” engineering (e.g., maintaining a viable, mature meta-programming system), which difficulties are of finding a good syntax, and which difficulties are foundational (e.g., code generation with binders and effects).

In short, we ask how program generation can or should help HPC.

The workshop participants consist of three groups of people: PL theorists, HPC researchers, and PL-HPC intermediaries (that is, people who are working with HPC professionals, translating insights from PL theory to HPC practice). The workshop would benefit PL and staging theorists by informing them what HPC practice actually needs. HPC practitioners may also benefit, for example by learning new ways to understand or organize the code generators they are already writing and using.

To promote this mutual understanding, the workshop will have lots of time for discussion, emphasizing presentations that elicit questions rather than merely provide answers.