[CI][AIE] Enable CI for AIE (XDNA1) #1206
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
| # Copyright Allo authors. All Rights Reserved. | |
| # SPDX-License-Identifier: Apache-2.0 | |
| name: "Allo Test" | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| # This job runs on Linux | |
| runs-on: ace2 | |
| container: | |
| image: chhzh123/allo:latest | |
| steps: | |
| # https://github.com/actions/checkout/issues/363#issuecomment-1915075699 | |
| - name: Install git in container | |
| run: | | |
| apt-get -y install git | |
| git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.ref }} | |
| fetch-depth: 0 | |
| - name: Build Allo | |
| shell: bash | |
| run: | | |
| source activate allo | |
| export LLVM_BUILD_DIR=/root/llvm-project/build | |
| python3 -m pip install -v -e . | |
| - name: Formatting Check | |
| shell: bash | |
| run: | | |
| source activate allo | |
| bash scripts/lint/task_lint.sh | |
| - name: Unit tests | |
| shell: bash | |
| run: | | |
| source activate allo | |
| export PATH=/root/llvm-project/build/bin:${PATH} | |
| export LLVM_BUILD_DIR=/root/llvm-project/build | |
| python3 -m pytest --ignore=tests/dataflow tests -v | |
| export OMP_NUM_THREADS=128 | |
| python3 -m pytest --ignore=tests/dataflow/aie tests/dataflow -v | |
| unset OMP_NUM_THREADS | |
| - name: Accelerators | |
| shell: bash | |
| run: | | |
| source activate allo | |
| export PATH=/root/llvm-project/build/bin:${PATH} | |
| export LLVM_BUILD_DIR=/root/llvm-project/build | |
| export OMP_NUM_THREADS=128 | |
| python3 examples/feather/gemm.py | |
| python3 examples/feather/convolution.py | |
| unset OMP_NUM_THREADS | |
| - name: Tutorial | |
| shell: bash | |
| run: | | |
| source activate allo | |
| export LLVM_BUILD_DIR=/root/llvm-project/build | |
| python3 -m pytest tutorials -v | |
| - name: Benchmark | |
| shell: bash | |
| run: | | |
| source activate allo | |
| export LLVM_BUILD_DIR=/root/llvm-project/build | |
| python3 -m pytest examples/polybench -v | |
| - name: MachSuite | |
| shell: bash | |
| run: | | |
| source activate allo | |
| export LLVM_BUILD_DIR=/root/llvm-project/build | |
| python3 -m pytest examples/machsuite -v | |
| - name: PyTorch | |
| shell: bash | |
| run: | | |
| source activate allo | |
| export LLVM_BUILD_DIR=/root/llvm-project/build | |
| python3 -m pip install torch==2.5.1 | |
| python3 examples/torch/toy.py | |
| python3 examples/torch/mlp.py |