Skip to content

chore: Upgrade to MLX 0.32.4 - #149

Open
georgeguimaraes wants to merge 1 commit into
elixir-nx:mainfrom
georgeguimaraes:chore/mlx-0.32.4
Open

georgeguimaraes wants to merge 1 commit into
elixir-nx:mainfrom
georgeguimaraes:chore/mlx-0.32.4

Conversation

@georgeguimaraes

@georgeguimaraes georgeguimaraes commented Oct 18, 2026 •

Copy link
Copy Markdown
Member

MLX 0.32.4 adds MLX_CONV_WINOGRAD=0 (ml-explore/mlx#4639). It turns off Winograd for conv2d on Metal.

Metal uses Winograd for 3x3 kernels when C and O are multiples of 32, C + O >= 256 and N * H * W >= 4096, and its results are not exact. For integer-valued f32 inputs, a 128 to 128 channel conv on 64x64 is off by up to 15 on the GPU, while the CPU result is exact. With MLX_CONV_WINOGRAD=0 on this branch, the GPU result is equal to the CPU result. The choice depends on N * H * W, so the results also change with the batch size (ml-explore/mlx#4595). I found this with quantized convolutions, where the int32 sums must be exact.

The 0.32 patch releases also changed some C++ APIs, so this is more than the version number:

I built MLX 0.32.4 from source with LIBMLX_BUILD=true and ran the emlx and emlx_axon tests. They give the same results as main on 0.32.0.

The emlx_axon plugins now need MLX 0.32.4, so emlx_axon from Hex needs an EMLX release with this change.

@cocoa-xu, cocoa-xu/mlx-build has no v0.32.4 release yet. Can you run the auto-update workflow there? CI downloads the libmlx archives from that release, so this PR stays a draft until the release exists.

@polvalente
polvalente marked this pull request as ready for review October 18, 2026 21:36
MLX 0.32.4 adds MLX_CONV_WINOGRAD=0, which turns off the inexact Winograd conv2d on Metal.

The 0.32 patch releases also changed some C++ APIs:

- allocator::malloc returns an owning allocator::Data, and the array takes it with a new constructor. from_blob uses it.

- gather_qmm has a new global_scale argument, and fast::scaled_dot_product_attention has a new force_fused argument. EMLX and the emlx_axon plugins pass the defaults.

- The compile cache is per thread. Expr records each cache that holds its compiled function, and its destructor erases the entry from each one.
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