Weaving Synchronous Reactions into the Fabric of SSA-form Compilers - Inria - Institut national de recherche en sciences et technologies du numérique Accéder directement au contenu
Article Dans Une Revue (Data Paper) ACM Transactions on Architecture and Code Optimization Année : 2022

Weaving Synchronous Reactions into the Fabric of SSA-form Compilers

Résumé

We investigate the programming of reactive systems combining closed-loop control with performance-intensive components such as Machine Learning (ML). Reactive control systems are often safety-critical and associated with real-time execution requirements, a domain of predilection for synchronous programming languages. Extending the high levels of assurance found in reactive control systems to computationally intensive code remains an open issue. We tackle it by unifying concepts and algorithms from synchronous languages with abstractions commonly found in general-purpose and ML compilers. This unification across embedded and high-performance computing enables a high degree of reuse of compiler abstractions and code. We first recall commonalities between dataflow synchronous languages and the static single assignment (SSA) form of general-purpose/ML compilers. We highlight the key mechanisms of synchronous languages that SSA does not cover—denotational concepts such as synchronizing computations with an external time base, cyclic and reactive I/O, as well as the operational notions of relaxing control flow dominance and the modeling of absent values. We discover that initialization-related static analyses and code generation aspects can be fully decoupled from other aspects of synchronous semantics such as memory management and causality analysis, the latter being covered by existing dominance-based algorithms of SSA-form compilers. We show how the SSA form can be seamlessly extended to enable all SSA-based transformations and optimizations on reactive programs with synchronous concurrency. We derive a compilation flow suitable for both high-performance and reactive aspects of a control application, by embedding the Lustre dataflow synchronous language into the SSA-based MLIR/LLVM compiler infrastructure. This allows the modeling of signal processing and deep neural network inference in the (closed) loop of feedback-directed control systems. With only minor efforts leveraging the MLIR infrastructure, the generated code matches or outperforms state-of-the-art synchronous language compilers on computationally intensive ML applications.

Dates et versions

hal-03935275 , version 1 (11-01-2023)

Licence

Paternité

Identifiants

Citer

Hugo Pompougnac, Ulysse Beaugnon, Albert Cohen, Dumitru Potop Butucaru. Weaving Synchronous Reactions into the Fabric of SSA-form Compilers. ACM Transactions on Architecture and Code Optimization, 2022, 19 (2), pp.1-25. ⟨10.1145/3506706⟩. ⟨hal-03935275⟩
45 Consultations
0 Téléchargements

Altmetric

Partager

Gmail Facebook X LinkedIn More