Skip to content

NAX requires setting MACOSX_DEPLOYMENT_TARGET=26.2 - #3622

Merged
zcbenz merged 1 commit into
mainfrom
macos-ver
Jun 13, 2026
Merged

zcbenz merged 1 commit into
mainfrom
macos-ver

Conversation

@zcbenz

@zcbenz zcbenz commented Jun 4, 2026

Copy link
Copy Markdown
Member

Close #3586.

The neural accelerator requires macOS 26.2 and with Xcode 26.5 we have to explicitly pass -mmacosx-version-min=26.2 to metal toolchain to compile NAX kernels correctly.

This PR does 2 things:

  • Target 26.2 instead of 26.0 in CI.
  • Target the host macOS version when MACOSX_DEPLOYMENT_TARGET is not set.

Note that strictly we should provide 2 distributions separately for 26.0 and 26.2 since the binaries would be different, but setuptools hard-codes plat name asmacosx_26_0 for wheels built for 26.x and I'm afraid the package managers also do the same, so users would be downloading binaries built for 26.2 on 26.0.

@scyyh11

scyyh11 commented Jun 5, 2026 •

Copy link
Copy Markdown
Contributor

This matches what I found too. One extra detail that may be useful: the 26.2 workaround seems to line up with an ABI gate in the SDK 26.5 MPP headers.

With -mmacosx-version-min < 26.2, the cooperative tensor path lowers through the destination-tensor shim for all operands. With >= 26.2, it uses the indexed operand intrinsics. Comparing the same NAX kernel from the 0.31.2 wheel and my local SDK 26.5 build showed that intrinsic-family swap as the meaningful AIR difference.

I also tried a minimal accessor-only kernel. It is correct at min 26.2 and wrong at 26.0, so the shim path itself appears broken; using accessors alone probably would not save <26.2 builds.

Also checked: MLX's current hardcoded NAX layout matches the >=26.2 indexed layout.

@bri-prism bri-prism left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on M5 Pro relative error dropped to under 2e-5

@angeloskath angeloskath left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙏

This branch was previously deployed

1 inactive deployment
dry-run — cf1f112f Deployed Jun 4, 2026 by zcbenz via Upload Metal release to PyPI #94
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Xcode 26.5 / metalfe-32023.883 mis-compiles NAX GEMM kernel

4 participants