Pull requests / #2388
#2388 metal: build supports_metal4() without the macOS 26 SDK
open · @nullspeech · 0 コメント · GitHub で見る
本文
## What breaks `mtl_rt.mm`'s `supports_metal4()` names `MTLGPUFamilyMetal4`, which is declared only in the macOS 26 SDK headers. On a Mac still on macOS 15 the only SDK you can get is 15.x, so the Metal engine does not compile at all — and there is no prebuilt Mac engine in the release assets, so this is the first wall a macOS 15 user hits, before anything runtime-related. ## Fix Declare the same numeric family and cast it at the single call site. `5002` is what the repo's own vendored metal-cpp already uses (`third_party/metal-cpp/Metal/MTLDevice.hpp:193`: `GPUFamilyMetal4 = 5002`), and the `@available(macOS 26.0, *)` gate is untouched, so a 26-SDK build emits the identical call and cannot change behaviour there. ``` metal/src/mtl_rt.mm | 5 ++++- ``` ## Measured (this machine) M2 Max, 96 GB, macOS 15.8, engine at `main` (296b59d2, 0.1.44.1), IQ3_S: - engine compiles and starts, serves 131072-context requests; - prompt read 58-59 tok/s, decode 31-40 tok/s, MTP drafts ~85% accepted; - `gdn_parity` prints `max 512 threads per threadgroup` and passes for `GDN_NTOK 1..8` (that's the #2323 fix, verified here). ## Scope, so nobody reads too much into it This only unblocks the **C++ build**. It does not make MPP runtime available on macOS 15: `dense_mm.metal`, `moe_mm.metal`, `qsa_prompt.metal`, `prompt.metal` and `mm_bench.metal` include `<MetalPerformancePrimitives/...>` unguarded, and `Context::compile()` answers a failed shader compile with `std::exit(3)`. A macOS 15 Mac therefore still has to run `STRATA_METAL_PROMPT=window` with `COOP_K4=0`. The natural follow-up is `__has_include` on that header plus a GPU-family probe, so window mode becomes the engine's own choice rather than something the user has to know about — happy to write that up if you want it here rather than in #2323. Context: https://github.com/Niko1221/Strata/issues/2323#issuecomment-6158924728
関連リンク
インストール・モデル・リリースへの站内リンク。