build: bump pinned MLX to 0.32.0 - #201
Conversation
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).
|
@codex review |
There was a problem hiding this comment.
💡 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".
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`.
|
@codex review |
There was a problem hiding this comment.
💡 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".
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.
|
@codex review |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Summary
Bumps emily's pinned native MLX from 0.31.2 → 0.32.0 (
@mlx_versioninmix.exs; the:mlx_srcgit dep follows the tag, andmix.lockis 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):
qmv_widesmall-batch quantized matvec + qmv global-scale (#3764, #3723) — accelerates the fusedmx::quantized_matmulpath landed in perf: fuse quantized_dense onto mx::quantized_matmul kernel #200 (Add a fused quantized_matmul Axon layer (graduate QMM from the notebook) #197).mx::fast::scaled_dot_product_attention.The one genuinely-new exposable core API is
linalg::det/slogdet(#3416); deferred —determinantisn't an Nx backend callback (would need a bespoke helper), it's a cold path, andslogdethas no Nx equivalent.Testing
Fresh MLX 0.32.0 source build clean.
mix precommitgreen. Full comprehensive run on the new version:vit_full/whisper_full/distilbert_full/fast_kernels_full/training_full): 18 tests — 0 failures