name: Fusion on: workflow_dispatch: # allows manual triggering push: branches: - master paths: [ '.github/workflows/fusion.yml', 'ggml/**', 'tests/fusion/**', 'tests/test-fusion.cpp', 'tests/test-llama-archs.cpp', 'src/models/**' ] pull_request: types: [opened, synchronize, reopened] paths: [ '.github/workflows/fusion.yml', 'ggml/**', 'tests/fusion/**', 'tests/test-fusion.cpp', 'tests/test-llama-archs.cpp', 'src/models/**' ] concurrency: group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }} cancel-in-progress: true env: GGML_NLOOP: 3 GGML_N_THREADS: 1 LLAMA_ARG_LOG_COLORS: 1 LLAMA_ARG_LOG_PREFIX: 1 LLAMA_ARG_LOG_TIMESTAMPS: 1 jobs: # TODO: add jobs for other backends as they adopt the fusion debug API metal: runs-on: [self-hosted, macOS, ARM64] steps: - name: Clone id: checkout uses: actions/checkout@v6 - name: Build id: cmake_build run: | cmake -B build \ -DCMAKE_BUILD_TYPE=Release \ -DLLAMA_FATAL_WARNINGS=ON \ -DLLAMA_OPENSSL=OFF \ -DGGML_SCHED_NO_REALLOC=ON \ -DGGML_BLAS=OFF \ -DGGML_METAL=ON time cmake --build build --config Release --target test-llama-archs -j $(sysctl -n hw.logicalcpu) time cmake --build build --config Release --target test-fusion -j $(sysctl -n hw.logicalcpu) - name: Generate models id: generate_models run: | rm -rf build-ci-models && mkdir -p build-ci-models ./build/bin/test-llama-archs -o build-ci-models - name: Test fusion id: test_fusion run: | ./build/bin/test-fusion --models build-ci-models --device MTL0 --check tests/fusion/MTL.csv