Skip to content

build: bump pinned MLX to 0.32.0 - #201

Merged
ausimian merged 4 commits into
mainfrom
chore/bump-mlx-0.32.0
Jul 8, 2026
Merged

build: bump pinned MLX to 0.32.0#201
ausimian merged 4 commits into
mainfrom
chore/bump-mlx-0.32.0

Conversation

@ausimian

@ausimian ausimian commented Jul 8, 2026

Copy link
Copy Markdown
Owner

Summary

Bumps emily's pinned native MLX from 0.31.2 → 0.32.0 (@mlx_version in mix.exs; the :mlx_src git dep follows the tag, and mix.lock is updated). No API changes.

I reviewed the full v0.31.2…v0.32.0 changelog before adopting. For emily it's a maintenance/bugfix release — the bulk is CUDA / Windows / CI / docs / mlx.nn / Python array-API work that doesn't touch emily's Metal-only Nx backend. No new user-facing feature is a must-expose.

Two transparent perf wins come for free (kernels emily already calls, zero code change):

The one genuinely-new exposable core API is linalg::det/slogdet (#3416); deferreddeterminant isn't an Nx backend callback (would need a bespoke helper), it's a cold path, and slogdet has no Nx equivalent.

Testing

Fresh MLX 0.32.0 source build clean. mix precommit green. Full comprehensive run on the new version:

  • Default suite: 737 tests, 40 doctests, 79 properties — 0 failures
  • Conformance (eager / native / fuse lanes vs PyTorch reference slices): 52 tests — 0 failures → no numerical drift from the new kernels
  • Full checkpoint tiers + MNIST canary (vit_full / whisper_full / distilbert_full / fast_kernels_full / training_full): 18 tests — 0 failures

Maintenance bump of the native MLX pin from 0.31.2. No API changes.
Transparently picks up two upstream perf improvements to kernels emily
already uses: qmv_wide small-batch quantized matvec (accelerates the
fused quantized path) and fused SDPA coverage for asymmetric Q/V head
dims.

Full suite green on the new version: default (737 tests, 40 doctests,
79 properties), conformance (eager/native/fuse vs PyTorch references),
and the full-checkpoint tiers (ViT/Whisper/DistilBERT/fast-kernels +
MNIST training canary).
@ausimian

ausimian commented Jul 8, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0c4a332538

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread mix.exs
MLX 0.32.0 sets `CMAKE_CXX_STANDARD 20` (REQUIRED), so libmlx.a is built
as C++20 and its public headers use C++20 features — e.g. a defaulted
`operator==` on `CompileOptions` in mlx/backend/common/metal_kernel.h,
reachable via <mlx/fast.h>. The NIF includes those headers and statically
links those objects, so build it at the same language level to stay
ABI/ODR-consistent with the library.

Raises both `-std=c++17` sites in the Makefile (the NIF objects and the
standalone native bench binary) to `-std=c++20`.
@ausimian

ausimian commented Jul 8, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fcff5d1a7a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Makefile
ausimian added 2 commits July 8, 2026 10:58
MLX 0.32.0's JIT Metal power kernel computes integer-valued results via
exp/log, so 3**2 comes back as 8.99999809 rather than a bit-exact 9.0.
The test asserted exact equality; switch it to assert_close (default f32
tolerance 1e-4), matching how the other transcendental ops in this file
are checked. Surfaced by CI on the jit/macOS-26 variant — the aot path
is bit-exact, so it passed there and locally.
The object rule depended only on c_src sources/headers and $(NIF_SO)
only on the objects, so neither an MLX version bump (a freshly built
libmlx.a under a new MLX_LIB_DIR) nor a compile/link flag change here
forced a rebuild. An existing checkout could copy the new mlx.metallib
while keeping a NIF still statically linked against the old MLX, running
a mismatched binary until a manual clean. Add libmlx.a and the Makefile
as prerequisites of the objects, the linked NIF, and the native bench.
@ausimian

ausimian commented Jul 8, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: 9ff15db85d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ausimian
ausimian merged commit e434f89 into main Jul 8, 2026
3 checks passed
@ausimian
ausimian deleted the chore/bump-mlx-0.32.0 branch July 8, 2026 10:08
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.

1 participant