SeRC OpCoReS Project The PEPPHER Project

ComPU ("PEPPHER") Composition Tool

PEPPHER Component Model Composition Tool Features Information Sources Technical Manual Contact

The PEPPHER Composition Tool ComPU is a research prototype developed by Lu Li, Usman Dastgeer and Christoph Kessler at Linköping University (Sweden), for the EU FP7 project PEPPHER (2010-2012). Its further development since 2013 is partly funded by SeRC, project OpCoReS (Optimized Composition and Runtime Support for e-Science), and (in 2013) by Vetenskapsrådet.

ComPU builds optimized C/C++ based applications for GPU-based systems from user-defined application-level building blocks (PEPPHER components) with multiple implementation variants, which are written and annotated using the PEPPHER component model.
The composition tool generates glue code that will, at run-time, automatically select for each call to a PEPPHER component among its available implementation variants the expected fastest one, based on a performance model.

Currently, the composition tool supports component implementations written in sequential C/C++, OpenMP, CUDA and OpenCL, and for execution it uses the PEPPHER runtime system (which is built upon the open-source StarPU runtime system). The default is dynamic composition, i.e., generating multi-variant tasks for StarPU which performs context-aware composition (implementation selection and resource allocation) at runtime. Besides dynamic composition, the composition tool also supports user-guided static composition and static composition by building off-line a performance model that is inspected at runtime for fast implementation selection.

We have also designed an adaptive sampling method for off-line performance modeling and implemented it in the PEPPHER composition tool.

The PEPPHER Component model

The PEPPHER component model is a comprehensive framework for annotating software components for heterogeneous multicore systems that are written in various programming models for CPUs and GPUs with rich metadata to expose their variation points and tuning options to an external software composition tool.
Instead of hardcoding such performance optimizations for a specific platform configuration in the application code, a composition tool will generate code for the application from its components and their implementation variants such that the composed code automatically adapts its runtime behavior (e.g., selection of implementation variants, scheduling, resource allocation, ...) for a given platform and for a given runtime context (which might comprise performance-relevant properties such as problem sizes or current load of processing units), in order to optimize program execution. This supports both code portability and performance portability.

PEPPHER interface and implementations

The PEPPHER component model is generic in its design; however, it is currently realized in C/C++ so we will here discuss it with respect to C/C++.

A PEPPHER component consists of an interface and one or more implementations of that interface. Both interface and implementations are complemented with extra information (called "meta-data") in the form of XML descriptors. In this sense the PEPPHER component model is non-intrusive, as it require very little direct modification in the user code.

PEPPHER component interface

In C/C++, a PEPPHER interface is represented by a C/C++ function declaration.
For example, the interface of a sorting component might look as follows:
void sort(float *arr, int size);
Besides the function declaration, an interface has an associated XML descriptor which provides extra information (i.e., metadata) about the interface. This includes information about: PEPPHER components are stateless, which means that they hold no internal state at runtime, do not access global variables, and all (possible) targets of read and write accesses are explicitly given by the input and output operands, as declared in the component interface.

PEPPHER component implementations

A PEPPHER component implementation implements the functionality promised by a PEPPHER interface while keeping the same calling interface (return-type, parameter-types).

For example, for the sorting interface, we might have the following implementations:

void qs_cpu_imp(float *arr, int size)
{
   ...
}
void ms_cpu_imp(float *arr, int size)
{
   ...
}
void qs_gpu_imp(float *arr, int size)
{
   ...
}
void bs_gpu_imp(float *arr, int size)
{
   ...
}
Like component interfaces, each PEPPHER component implementation has an associated XML descriptor describing this implementation's meta-data. The implementation descriptor specifies:

ComPU Composition Tool, Selected Features

For details, see the on-line documentation and publications below.

Information sources

Overview Poster

Online manual

Thesis

Research Papers

Source code

The prototype is not released publicly yet. If you are interested, please let us know via e-mail.

Applications

We have ported More details about the evaluation and experimental results can be found in information sources.

Ongoing work

The composition tool is being further developed; current work focuses on extending static composition using off-line tuning.


Contact: Lu Li, Usman Dastgeer, Prof. Christoph Kessler. For contact, please e-mail to "<firstname> DOT <lastname> AT liu DOT se".

Vetenskapsrådet The SeRC-OpCoReS Project The PEPPHER Project This work was funded by EU FP7 project PEPPHER during the project period, 2010-2012.
Its further development since 2013 is partly funded by SeRC-OpCoReS and (in 2013) by Vetenskapsrådet.