Skip to content

coredac/dataflow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,117 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Neura -- a dataflow dialect.

Build LLVM & Neura

  • Clone llvm-project.

  • Clone this repo.

  • Build LLVM:

    • Check out to commit 6146a88 (Our project is based on this version of LLVM).
    • Build:
 $ mkdir build && cd build
 # May need install ccache and lld.
 $ cmake -G Ninja ../llvm \
     -DLLVM_ENABLE_PROJECTS="mlir;clang" \
     -DLLVM_BUILD_EXAMPLES=OFF \
     -DLLVM_TARGETS_TO_BUILD="Native" \
     -DCMAKE_BUILD_TYPE=Release \
     -DLLVM_ENABLE_ASSERTIONS=ON \
     -DCMAKE_C_COMPILER=clang \
     -DCMAKE_CXX_COMPILER=clang++ \
     -DCMAKE_CXX_STANDARD=17 \
     -DCMAKE_CXX_FLAGS="-std=c++17 -frtti" \
     -DLLVM_ENABLE_LLD=ON \
     -DMLIR_INSTALL_AGGREGATE_OBJECTS=ON \
     -DLLVM_ENABLE_RTTI=ON \
     -DCMAKE_C_COMPILER_LAUNCHER=ccache \
     -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
 $ cmake --build . --target check-mlir
 $ cmake --build . --target check-clang
  • Build Neura:
    • Step into this repo, note that this repo is outside of llvm-project.
    • Build:
 $ mkdir build && cd build
 # Replace the path "/workspace" accordingly.
 $ cmake -G Ninja .. \
     -DLLVM_DIR=/workspace/llvm-project/build/lib/cmake/llvm \
     -DMLIR_DIR=/workspace/llvm-project/build/lib/cmake/mlir \
     -DMLIR_SOURCE_DIR=/workspace/llvm-project/mlir \
     -DMLIR_BINARY_DIR=/workspace/llvm-project/build \
     -DCMAKE_CXX_FLAGS="-std=c++17"
 $ ninja
  • Test:
 $ cd ../test
 # a test with detailed middle output
 $ ../build/tools/mlir-neura-opt/mlir-neura-opt --debug test.mlir

 # Or test with lit:
 $ /workspace/llvm-project/build/bin/llvm-lit test.mlir -v

Sync test/e2e outputs into Zeonica_Testbench (submodule)

This repo vendors sarchlab/Zeonica_Testbench as a git submodule at test/benchmark/Zeonica_Testbench.

After running e2e compilation/tests, you can sync the generated artifacts into the testbench repo:

$ ./tools/sync_e2e_outputs_to_zeonica_testbench.sh

Mapping (per kernel K):

  • test/e2e/K/tmp-generated-dfg.{dot,yaml} -> test/benchmark/Zeonica_Testbench/kernel/K/K-dfg.{dot,yaml}
  • test/e2e/K/tmp-generated-instructions.{asm,yaml} -> test/benchmark/Zeonica_Testbench/kernel/K/K-instructions.{asm,yaml}

Contributing

Please refer to the Contributing Guide for code style, formatting, and contribution workflow.

About

No description, website, or topics provided.

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages