From 01c82d09351b93b8dda759b129d56ad35a0bf524 Mon Sep 17 00:00:00 2001 From: XNNPACK Team Date: Wed, 20 Nov 2024 15:28:04 -0800 Subject: [PATCH] Add a builder for aarch64 under gcc-13 in addition to clang-18 (helps address https://github.com/google/XNNPACK/issues/7489) PiperOrigin-RevId: 698542183 --- .github/workflows/build.yml | 53 ++++++++++++++++++++++++++++++++++++- 1 file changed, 52 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cf14678ec7d..001622c1954 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -416,7 +416,7 @@ jobs: with: path: "/home/runner/.cache/bazel" key: ${{ github.job }}-${{ github.sha }} - bazel-linux-aarch64: + bazel-linux-aarch64-clang-18: runs-on: arm-ubuntu-arm-22.04-4core timeout-minutes: 60 steps: @@ -468,3 +468,54 @@ jobs: with: path: "/home/runner/.cache/bazel" key: ${{ github.job }}-${{ github.sha }} + bazel-linux-aarch64-gcc13: + # This ensures we have solid test coverage for _Float16 + runs-on: arm-ubuntu-arm-22.04-4core + timeout-minutes: 60 + steps: + - uses: actions/checkout@v4 + - name: Update apt + run: sudo apt update + - name: Install gcc-13 + working-directory: ${{ github.workspace }} + run: | + sudo apt install gcc-13 g++-13 + - name: Restore bazel cache + uses: actions/cache/restore@v4 + with: + path: "/home/runner/.cache/bazel" + key: ${{ github.job }} + restore-keys: | + ${{ github.job }}- + - name: Build tests + env: + CC: gcc-13 + CXX: g++-13 + run: | + bazel build test:all + working-directory: ${{ github.workspace }} + - name: Run tests + if: ${{ inputs.run-tests }} + env: + CC: gcc-13 + CXX: g++-13 + run: | + # We only test the KleidiAI integration for now. + bazel test \ + --test_output=all \ + --test_filter=*QP8* \ + test:qp8_f32_qc4w_gemm_minmax_test \ + test:fully_connected_nc_test \ + test:fully_connected_test + working-directory: ${{ github.workspace }} + - name: Compress disk cache + # Bazel's `--disk-cache` currently grows without bounds, so we remove files + # that haven't been accessed in 7+ days manually. + if: ${{ inputs.update-caches }} + run: find $HOME/.cache/bazel -type f -atime +7 -delete + - name: Save bazel cache + if: ${{ inputs.update-caches }} + uses: actions/cache/save@v4 + with: + path: "/home/runner/.cache/bazel" + key: ${{ github.job }}-${{ github.sha }}