Build and Test: gdd printer for cinm.gemm #170
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 and test cinnamon | |
| run-name: 'Build and Test: ${{ github.event.head_commit.message }}' | |
| on: | |
| workflow_dispatch: | |
| push: | |
| pull_request: | |
| types: [opened, reopened] | |
| jobs: | |
| main: | |
| name: Build and test | |
| runs-on: ubuntu-24.04 | |
| env: | |
| CC: clang | |
| CXX: clang++ | |
| LDFLAGS: -fuse-ld=mold | |
| CMAKE_GENERATOR: Ninja | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v3 | |
| - name: Install build dependencies | |
| run: | |
| sudo apt-get install clang ninja-build mold libvulkan-dev python3.12-dev | |
| - name: Restore runtime cache | |
| id: runtimes-cache-restore | |
| uses: actions/cache/restore@v3 | |
| with: | |
| path: | | |
| .venv | |
| third-party/upmem | |
| key: cinnamon-runtimes-${{ runner.os }} | |
| - name: Restore llvm cache | |
| id: llvm-cache-restore | |
| uses: actions/cache/restore@v3 | |
| with: | |
| path: third-party/llvm | |
| key: cinnamon-llvm-${{ runner.os }} | |
| - name: Restore torch-mlir cache | |
| id: torch-mlir-cache-restore | |
| uses: actions/cache/restore@v3 | |
| with: | |
| path: third-party/torch-mlir | |
| key: cinnamon-torch-mlir-${{ runner.os }} | |
| - name: Setup venv | |
| run: .github/workflows/setup-venv.sh -reconfigure -verbose | |
| - name: Build LLVM | |
| run: | | |
| source .venv/bin/activate | |
| .github/workflows/build-llvm.sh -reconfigure -verbose | |
| - name: Save llvm cache | |
| uses: actions/cache/save@v3 | |
| if: always() | |
| with: | |
| path: third-party/llvm | |
| key: ${{ steps.llvm-cache-restore.outputs.cache-primary-key }} | |
| - name: Build Torch-MLIR | |
| run: | | |
| source .venv/bin/activate | |
| .github/workflows/build-torch.sh -reconfigure -verbose | |
| - name: Save torch-mlir cache | |
| uses: actions/cache/save@v3 | |
| if: always() | |
| with: | |
| path: third-party/torch-mlir | |
| key: ${{ steps.torch-mlir-cache-restore.outputs.cache-primary-key }} | |
| # Cannot checkout Upmem SDK anymore. We don't build this in CI anymore. | |
| # - name: Checkout upmem | |
| # run: | | |
| # source .venv/bin/activate | |
| # .github/workflows/build-upmem.sh -reconfigure -verbose | |
| - name: Build CINM | |
| run: | | |
| source .venv/bin/activate | |
| export CINNAMON_CMAKE_OPTIONS='-DCMAKE_GENERATOR=Ninja' | |
| .github/workflows/build-cinnamon.sh -reconfigure -verbose -no-upmem | |
| - name: Test CINM | |
| run: | | |
| source .venv/bin/activate | |
| ninja -Cbuild check-cinm-mlir | |
| - name: Save runtime cache | |
| uses: actions/cache/save@v3 | |
| if: always() | |
| with: | |
| path: | | |
| .venv | |
| third-party/upmem | |
| key: ${{ steps.runtimes-cache-restore.outputs.cache-primary-key }} |