Skip to content

qaco/mlir-lus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The mlir-lus compiler was designed and developed by Hugo Pompougnac (me) and Dumitru Potop-Butucaru (my PhD supervisor). It provides two MLIR dialects -- lus and sync -- for specifying and compiling synchronous programs. The lus dialect, in particular, implements the synchronous dataflow kernel of Lustre.

See also:

Intall the MLIR tool chain

Dependencies

Main IREE repo

cd mlir-lus
git submodule update --init
cd iree
git submodule update --init

Install mlir-opt

cd iree/third_party/llvm-project
mkdir build
cd build
cmake -DLLVM_ENABLE_PROJECTS=mlir -DLLVM_BUILD_EXAMPLES=ON \
  -DCMAKE_INSTALL_PREFIX=~/llvm-lus -DCMAKE_BUILD_TYPE=Release \
  -DLLVM_ENABLE_ASSERTIONS=ON -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ \
  -DCMAKE_ASM_COMPILER=clang -DCMAKE_SHARED_LINKER_FLAGS="-fno-omit-frame-pointer" \
  -DCMAKE_EXE_LINKER_FLAGS="-fno-omit-frame-pointer" ../llvm

make -j4
make install

Install tf-opt

cd iree/third_party/tensorflow
bazelisk build //tensorflow/compiler/mlir:tf-opt

Install iree

cd iree
cmake -GNinja -B ../iree-build/ -S . \
    -DCMAKE_BUILD_TYPE=RelWithDebInfo \
    -DIREE_ENABLE_ASSERTIONS=ON \
    -DCMAKE_C_COMPILER=clang \
    -DCMAKE_CXX_COMPILER=clang++ \
    -DIREE_ENABLE_LLD=ON
cd ../iree-build
ninja

Install mlir-lus

cd mlir-lus
make -j4

Try the compiler: src/mlirlus tests/ok-lstm.mlir --all-fbys-on-base-clock --fbys-centralization --explicit-signals --recompute-order --explicit-clocks --scf-clocks --node-to-reactive-func --sync-to-std

Get compiler options: mlirlus --help

Read examples: see the directory tests

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors