mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #2388] [CLOSED] metal: build supports_metal4() without the macOS 26 SDK #4020
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#4020
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/2388
Author: @nullspeech
Created: 10/14/2026
Status: ❌ Closed
Base:
main← Head:mtl4-enum-fallback📝 Commits (1)
8e308cdmetal: name the Metal4 GPU family for builds without the macOS 26 SDK📊 Changes
1 file changed (+4 additions, -1 deletions)
View changed files
📝
metal/src/mtl_rt.mm(+4 -1)📄 Description
What breaks
mtl_rt.mm'ssupports_metal4()namesMTLGPUFamilyMetal4, 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.
5002is 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.Measured (this machine)
M2 Max, 96 GB, macOS 15.8, engine at
main(296b59d2, 0.1.44.1), IQ3_S:gdn_parityprintsmax 512 threads per threadgroupand passes forGDN_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.metalandmm_bench.metalinclude<MetalPerformancePrimitives/...>unguarded, andContext::compile()answers a failed shader compile withstd::exit(3). A macOS 15 Mac therefore still has to runSTRATA_METAL_PROMPT=windowwithCOOP_K4=0. The natural follow-up is__has_includeon 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
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.