From DSML to OpenMP: a multi-criteria automatic optimization
AMPERE's main objective is to transform the system model description of Cyber-Physical Systems (CPS) based on model-driven languages into the parallel programming models supported in the underlying parallel architectures.
The initial works towards bridging the gap between model-driven engineering and parallel programming models were performed during 2020, and summarized in a former press release. Those works decided the compatibility between AMALTHEA (an AUTOSAR compatible modelling framework) and OpenMP (the de-facto standard for shared-memory parallelism). Specifically, they concluded that the fine-grained parallelism exposed among different runnables within an AMALTHEA task can be represented with OpenMP tasks. Moreover, the relationship between the different runnables in terms of data accesses, can be modeled using task dependencies in OpenMP.
Previous analysis paved the way for the BSC team in 2021 to extend the AMALTHEA model with support for parallelism in two main directions: (1) specify which runnables are suitable to be executed in parallel with other runnables of the same real-time task, as well as the data relationships between the runnables, and (2) specify different implementations for a given runnable (not necessarily related to a particular architecture, as AMALTHEA already supports this with its hardware model). These extensions are perfectly aligned with the goals of the project towards providing a system design ecosystem optimised for cyber-physical systems and capable of efficiently exploiting advanced parallel heterogeneous platforms. This is so because the extensions allow to decouple the functionalities from their implementations, while supporting the automatic parallelization of the system targeting multiple architectures. In other words, a unique model represents functionalities that are automatically optimized for multiple processor architectures.
The automatic transformation of the model into OpenMP parallel code further allows the use of high-performance computing techniques in order to check the correctness of the model in terms of data races, or even deadlocks. This is a crucial aspect in the CPS targeted by the AMPERE project, as such safety-critical systems require the use of formal verification methods to ensure the correct-by-construction paradigm expected in model-driven engineering techniques.
The current framework is being tested with different test suites from the automotive domain, including DAPHNE and different WATERS challenges, as well as benchmarks from the HPC domain like BOTS. Preliminary results are promising in terms of programability, performance, portability and correctness.
The work of the project partners will now focus on the joint consideration of the performance, energy, time-criticality and fault tolerance requirements of the supported applications, to guide the automatic transformation process, providing an effective multi-criteria optimization of the generated system.
Stay tuned to discover what comes next!