okami.mom/strata

git clone https://git.nkp.pet/okami.mom/strata

Niko1221Merge f-own-1b (033cfdd8c) into f-own-int: nothing downloads llama.cppb2de2641f

main
1.7 KiB44 linesraw
1name: Metal build
2
3# Compile and link the Metal engine on a macOS runner (no GPU needed: the kernels are compiled at run time).  The shared host files
4# (src/core/verify.cpp, src/prefill, src/program/generate.cpp) call kernel entry points that exist only for CUDA / HIP until Metal gets a
5# stub or an implementation; a missing one is a link error here, not on a user's Mac (owner round 9, G6).
6
7on:
8  pull_request:
9    paths:
10      - 'src/**'
11      - 'include/**'
12      - 'metal/**'
13      - 'third_party/**'
14      - 'CMakeLists.txt'
15      - '.github/workflows/metal-build.yml'
16  workflow_dispatch:
17
18permissions:
19  contents: read
20
21jobs:
22  metal-link:
23    # the macOS 26 SDK: metal/src/mtl_rt.mm names MTLGPUFamilyMetal4 (and MTLCompileOptions.mathMode, macOS 15) behind @available,
24    # which is a run-time check; the names must still be in the SDK the engine is compiled against
25    runs-on: macos-26
26    timeout-minutes: 45
27    env:
28      # metal/setup_mac.py's metal-cpp pin (ggml is the vendored third_party/strata-ggml)
29      METAL_CPP_URL: https://developer.apple.com/metal/cpp/files/metal-cpp_26.zip
30      METAL_CPP_SHA256: 4df3c078b9aadcb516212e9cb03004cbc5ce9a3e9c068fa3144d021db585a3a4
31    steps:
32      - uses: actions/checkout@v4
33      - name: Tools
34        run: brew install ninja
35      - name: metal-cpp
36        run: |
37          curl -fsSL "$METAL_CPP_URL" -o metal-cpp.zip
38          echo "$METAL_CPP_SHA256  metal-cpp.zip" | shasum -a 256 -c -
39          unzip -q metal-cpp.zip -d _mcpp
40      - name: Configure
41        run: |
42          cmake -S metal -B build-metal -G Ninja -DCMAKE_BUILD_TYPE=Release \
43            -DMETAL_CPP_DIR="$PWD/_mcpp/metal-cpp"      - name: Build and link the engine
44        run: cmake --build build-metal --target strata