Giter VIP home page Giter VIP logo

mlir-lus-public's Introduction

Reactive programming in MLIR

While compilation frameworks such as MLIR concentrate the existing know-how in HPC compilation for virtually every execution platform, they lack a key ingredient needed in the high-performance embedded systems of the future: the ability to represent reactive control and real-time aspects of a system. They do not provide first-class representation and reasoning for systems with a cyclic execution model, synchronization with external time references (logical or physical), synchronization with other systems, tasks and I/O with multiple periods and execution modes. In practice, this poses problems when representing TensorFlow control in the tf_executor dialect, when providing streaming implementations for ML applications, when integrating ML components with signal processing pipelines...

We propose two extensions of MLIR dedicated to reactive programming. Following MLIR convention, these extensions come under the form of so-called dialects:

  • lus is a high-level reactive programming dialect based on Lustre. Specification of application control at lus dialect level comes with formal correctness checking ensuring the absence of infinite or undefined behaviors. In turn, this ensures that embedded implementation is possible in bounded memory space and in bounded execution time. The lus dialect follows a dataflow programming paradigm allowing the natural specification of ML specifications with complex control and integration with signal processing pipelines.
  • sync is a low-level reactive programming dialect. It directly extends the Static Single Assignment (SSA) form which stands at the core of MLIR with reactive primitives allowing synchronization with other functions and with external time references, I/O with multiple periods and execution modes.

Both dialects freely combine with the data processing operations already present in MLIR (in dialects such as tensorflow or linalg), thus allowing joint specification of all aspects of an embedded system - high-performance data processing and interaction with the environment.

Our current effort is focused in two directions:

  • Promoting the lus dialect for the specification of high-performance embedded applications featuring ML and signal processing under complex reactive control.
  • Improving code generation.

In developing our dialects and their compilation process, we follow the maximal reuse approach encouraged by MLIR (even when this approach comes with a steeper learning curve).

Further reading: H. Pompougnac, U. Beaugnon, A. Cohen, D. Potop - From SSA to Synchronous Concurrency and Back

Getting started

The repository comprises 3 main folders:

  • mlir-lus contains the implementation of the lus and sync dialects, and of the command-line mlirlus* tool allowing compilation of specifications based on these dialects.
  • mlir-prime is a tool that exposes existing MLIR code transformations that are not exposed by the command-line transformation tools of MLIR.
  • usecases showcases the use of our new dialects on a few signal processing and ML applications.

Licensing

This software is released under the GNU General Public License, version 2.0 or later, as detailed in the LICENSE file.

Contact information

The authors of mlirlus are Hugo Pompougnac and Dumitru Potop.

mlir-lus-public's People

Contributors

qaco avatar dpotop avatar

Stargazers

 avatar Erich Ocean avatar

Watchers

Albert Cohen avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.