Skip to content

Fix nax condition for iphone - #3083

Merged
awni merged 2 commits into
mainfrom
fix_nax_condition_iphone
Jan 29, 2026
Merged

Fix nax condition for iphone#3083
awni merged 2 commits into
mainfrom
fix_nax_condition_iphone

Conversation

@awni

@awni awni commented Jan 29, 2026

Copy link
Copy Markdown
Member

As title. Will eventually close ml-explore/mlx-swift-examples#462

CC @davidkoski

@awni

awni commented Jan 29, 2026

Copy link
Copy Markdown
Member Author

Also bumped fmt version to fix the build on the latest macOS.

@awni
awni requested review from angeloskath and jagrit06 January 29, 2026 20:26

@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.

👍

@davidkoski davidkoski 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 iPhone 16 Pro and it now behaves as expected

@davidkoski davidkoski 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 iPhone 16 Pro and it now behaves as expected

@awni
awni merged commit cc6e4ee into main Jan 29, 2026
16 checks passed
@awni
awni deleted the fix_nax_condition_iphone branch January 29, 2026 21:30
@philipwhiuk

Copy link
Copy Markdown

FYI @objectivecosta

@objectivecosta

Copy link
Copy Markdown

Oh wow, I wish I had seen this before!

benjaminsoo added a commit to benjaminsoo/mlx-swift that referenced this pull request Mar 2, 2026
iPhone 16 (A18, gen 17) was incorrectly detected as having Neural
Accelerator support, causing garbage output. Require gen >= 18 for
phone ('p') architectures.

Vendored mlx and mlx-c submodules as regular files to include the fix.
whothisbeme added a commit to whothisbeme/kokoro-ios that referenced this pull request Mar 8, 2026
mlx-swift 0.30.2 produces static/corrupted audio on iPhone 16 Pro
due to two NAX (Neural Accelerator) bugs:

1. Incorrect NAX hardware detection on A18 chip (ml-explore/mlx#3083)
   - A18 (gen 17) was wrongly detected as having NAX support (gen 18+)
   - Caused silently wrong numerical output instead of a crash

2. NAX overflow in ConvTransposed1d (ml-explore/mlx#3092)
   - Incorrect output for large tensors (time dim > ~8000)
   - Directly affects Kokoro's vocoder transposed convolutions

Both fixes are included in mlx-swift 0.30.6. Using `from:` instead
of `exact:` allows downstream consumers to resolve compatible versions.

Relates to: mlalma/KokoroTestApp#7, ml-explore/mlx-swift#344
dakshaymehta added a commit to dakshaymehta/kokoro-ios that referenced this pull request Apr 10, 2026
mlx-swift 0.30.2 has two NAX bugs that cause static/corrupted audio:
- Incorrect NAX hardware detection (ml-explore/mlx#3083)
- NAX overflow in ConvTransposed1d (ml-explore/mlx#3092)

Both fixed in mlx-swift 0.30.6. Also changes pin style from exact
to from to allow downstream consumers to resolve compatible versions.

Ref: mlalma#29
jzdziarski pushed a commit to jzdziarski/mlx that referenced this pull request Jul 26, 2026
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.

[BUG] MLXChatExample and LLMEval provide gibberish outputs on iPhone 16 Pro (iOS 26.2 and iOS 26.2.1)

5 participants