Enable backtrack mapping strategy #163
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: build | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| env: | |
| # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | |
| BUILD_TYPE: Release | |
| jobs: | |
| build: | |
| # The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac. | |
| # You can convert this to a matrix build if you need cross-platform coverage. | |
| # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix | |
| runs-on: ubuntu-22.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.12.8"] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| # install ninja | |
| - name: install ninja for LLVM build | |
| run: sudo apt-get install ninja-build | |
| # install ccache | |
| - name: install ccache & lld | |
| run: | | |
| sudo apt-get install ccache | |
| sudo apt-get install lld | |
| # setup LLVM | |
| - name: install a specific version of LLVM | |
| working-directory: ${{github.workspace}} | |
| run: | | |
| git clone https://github.com/llvm/llvm-project.git | |
| cd llvm-project | |
| git checkout 6146a88 | |
| mkdir build && cd build | |
| cmake -G Ninja ../llvm \ | |
| -DLLVM_ENABLE_PROJECTS="mlir" \ | |
| -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 | |
| # setup mlir-cgra | |
| - name: setup dataflow tool-chain | |
| working-directory: ${{github.workspace}} | |
| run: | | |
| mkdir build && cd build | |
| cmake -G Ninja .. \ | |
| -DLLVM_DIR=${{github.workspace}}/llvm-project/build/lib/cmake/llvm \ | |
| -DMLIR_DIR=${{github.workspace}}/llvm-project/build/lib/cmake/mlir \ | |
| -DMLIR_SOURCE_DIR=${{github.workspace}}/llvm-project/mlir \ | |
| -DMLIR_BINARY_DIR=${{github.workspace}}/llvm-project/build \ | |
| -DCMAKE_CXX_FLAGS="-std=c++17" | |
| ninja | |
| # # install clang-12/opt-12 | |
| # - name: install LLVM and Clang for scripts/experiment | |
| # uses: egor-tensin/setup-clang@v1 | |
| # with: | |
| # version: 12 | |
| # platform: x64 | |
| # # add path | |
| # - name: add paths | |
| # working-directory: ${{github.workspace}} | |
| # run: | | |
| # echo "${{github.workspace}}/llvm-project/build/bin" >> $GITHUB_PATH | |
| # echo "${{github.workspace}}/build/bin" >> $GITHUB_PATH | |
| # # run demo baseline | |
| # - name: run demo baseline | |
| # working-directory: ${{github.workspace}} | |
| # run: | | |
| # cd ./experiments/demo/baseline | |
| # sh script.sh | |
| # ./simulate | |
| # run demo cgra | |
| - name: run test | |
| working-directory: ${{github.workspace}} | |
| run: | | |
| cd ${{github.workspace}}/test | |
| ${{github.workspace}}/llvm-project/build/bin/llvm-lit . -v | |