Skip to content

Commit ca5dbc8

Browse files
committed
ci(release): build on macos-26 + Xcode 26.x for MLX M5 NAX SDK
The MLX Neural-Accelerator (NAX) GEMM path that delivers the M5 Pro/Max prefill speedup is gated by `is_nax_available()`, which expands to `__builtin_available(macOS 26.2, *)`. Compiling that guard requires an SDK that knows macOS 26.2 (Xcode 26.x). macos-14/15 default to Xcode 16.x and don't reliably carry Xcode 26 (disk-constrained), so they fail with "macOS 26.2 is not a valid availability version". Switch to the macos-26 runner (GA, arm64-native, Xcode 26.x default) and pin latest-stable Xcode so libmlx/metallib build with the NAX kernels. The kernels bake into the metallib host-independently, so the resulting aarch64 binary activates the M5 path at runtime on M5 hardware.
1 parent 0bfca1e commit ca5dbc8

1 file changed

Lines changed: 21 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,16 @@ permissions:
3131
jobs:
3232
build:
3333
name: build ${{ matrix.target }}
34-
runs-on: macos-14
34+
# macos-26 (not macos-14): the MLX Neural-Accelerator (NAX) GEMM path —
35+
# the M5 Pro/Max prefill speedup — is gated at runtime by
36+
# `is_nax_available()`, which expands to `__builtin_available(macOS 26.2)`.
37+
# Compiling that guard needs an SDK that *knows* macOS 26.2, i.e. Xcode 26.x.
38+
# macos-14/macos-15 default to Xcode 16.x and don't reliably carry Xcode 26
39+
# (disk-space constrained), so they fail with "macOS 26.2 is not a valid
40+
# availability version". macos-26 (GA, arm64-native) ships Xcode 26.x by
41+
# default. The kernels are baked into the metallib host-independently, so an
42+
# arm64 runner builds a binary that activates the M5 path at runtime on M5.
43+
runs-on: macos-26
3544
strategy:
3645
fail-fast: false
3746
matrix:
@@ -50,6 +59,17 @@ jobs:
5059
# root, so the checkout depth must be full (not shallow).
5160
fetch-depth: 0
5261

62+
# ── Pin newest stable Xcode (macOS 26.2 SDK for the NAX availability guard) ──
63+
# macos-26 already defaults to Xcode 26.x, but GitHub rotates that default
64+
# (26.0.1 → 26.2 → 26.3 …) and trims old point releases for disk space.
65+
# `latest-stable` deterministically selects the newest installed 26.x so
66+
# MLX's `__builtin_available(macOS 26.2, *)` guard always finds a ≥26.2 SDK
67+
# and libmlx/metallib build with the NAX kernels.
68+
- name: Select latest stable Xcode
69+
uses: maxim-lobanov/setup-xcode@v1
70+
with:
71+
xcode-version: latest-stable
72+
5373
# ── Toolchains ────────────────────────────────────────────────
5474
- name: Install Rust toolchain (with matrix target)
5575
uses: dtolnay/rust-toolchain@stable

0 commit comments

Comments
 (0)