Skip to content

[MLX] Raise default macOS deployment target to 26.2 for NAX - #24803

Merged
Gasoonjia merged 1 commit into
mainfrom
gasoonjia/mlx-enable-nax-default
Nov 9, 2026
Merged

Gasoonjia merged 1 commit into
mainfrom
gasoonjia/mlx-enable-nax-default

Conversation

@Gasoonjia

Copy link
Copy Markdown
Contributor

Summary

Raise CMAKE_OSX_DEPLOYMENT_TARGET from 14.0 to 26.2 in the shared mlx configure preset, inherited by mlx-release and mlx-debug.

MLX compiles its NAX kernels only when Metal 4, macOS SDK 26.2+, and a deployment target of at least 26.2 are available. The current preset forces a 14.0 target, so MLX defines MLX_METAL_NO_NAX even when building on an M5 with a supported SDK. The deployment target is already forwarded to MLX's ExternalProject; updating this default allows its NAX kernels to be compiled and selected on supported GPUs at runtime.

The default MLX preset build will now require macOS 26.2 or newer. Builds targeting older macOS releases can explicitly override the deployment target, for example cmake --preset mlx-release -DCMAKE_OSX_DEPLOYMENT_TARGET=14.0; MLX will then build without NAX support.

Test plan

Validated the presets with CMake 3.31.10 and checked the patch for whitespace errors:

cmake --list-presets
git diff --check

Confirmed that the only preset change is the shared MLX deployment target, and that both release and debug presets inherit it.

Before preparing this PR, built and ran the Muse Glimmer batching worker on an M5 Max with deployment target 26.2. That build used ExecuTorch revision c0c4172cf7d280f67eebbe727c000a9cbd67131a (#24467) and MLX revision 1f8e74e3f12f31365464a6867c6579f0e9b29d85, which is also the MLX revision pinned by this PR's base. Verified that the linked MLX library's compile flags omit MLX_METAL_NO_NAX; a probe linked against the same static library reported nax_available=true on applegpu_g17s. A full build of this PR's latest-main checkout has not been run.

The prior serving checks used the same PTEs and original client, four runs per model/workload, the mean of runs 2-4, and at least 60 seconds of cooldown between groups. For approximately 2048-token uncached prefill:

Method NAX off (tokens/s) NAX on (tokens/s) on/off
k-quant 246.93 696.60 2.82x
NVFP4 weight-only 237.70 773.37 3.25x
Int8-Int4 per-channel 1222.70 1135.87 0.93x

These are serving measurements, including activation quantization and other model operations. They span separate sessions; the table is evidence for the previously tested build configuration, rather than a fresh benchmark of this PR. Int8-Int4 was rerun with the same NAX-enabled worker binary as k-quant and NVFP4.

Authored with OpenAI Codex.

@pytorch-bot

pytorch-bot Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/24803

Note: Links to docs will display an error until the docs builds have been completed.

❌ 2 New Failures

As of commit 4e7def2 with merge base 4411b8d (image):

NEW FAILURES - The following jobs have failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 9, 2026
@Gasoonjia Gasoonjia added the release notes: build Changes related to build, including dependency upgrades, build flags, optimizations, etc. label Nov 9, 2026
@Gasoonjia
Gasoonjia merged commit 69d9244 into main Nov 9, 2026
233 of 244 checks passed
@Gasoonjia
Gasoonjia deleted the gasoonjia/mlx-enable-nax-default branch November 9, 2026 23:51
@shoumikhin

Copy link
Copy Markdown
Contributor

heads up, mlx jobs on main went red after this landed. 9 of 31 in mlx.yml fail on both full runs since (test-mlx, test-mlx-stories110m, the llm-offgraph rows, voxtral, parakeet, supertonic). the macos-15 runners can't build mlx's metal library with the new deployment target:

Failed to load MLX program: [metal::Device] Unable to build metal library from source
error: invalid value 'metal4.0' in '-std=metal4.0'

the last full run before this was 30 of 31 green. probably needs macos 26 runners for mlx.yml, or ci passing CMAKE_OSX_DEPLOYMENT_TARGET=14.0, else a revert

This branch was previously deployed

1 inactive deployment
cadence — 4e7def23 Deployed Nov 9, 2026 by Gasoonjia via hifi-op-test / hifi4 #37412
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. release notes: build Changes related to build, including dependency upgrades, build flags, optimizations, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants