Repository navigation
chore: Upgrade to MLX 0.32.4 - #149
Open
georgeguimaraes wants to merge 1 commit into
Open
georgeguimaraes wants to merge 1 commit into
georgeguimaraes wants to merge 1 commit into
Conversation
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.
georgeguimaraes
force-pushed
the
chore/mlx-0.32.4
branch
from
October 18, 2026 21:46
e334df9 to
2b60f11
Compare
georgeguimaraes
marked this pull request as draft
October 18, 2026 21:46
georgeguimaraes
marked this pull request as ready for review
October 18, 2026 22:04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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=0on 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:
allocator::mallocreturns an owningallocator::Data, andarraytakes it with a new constructor.from_blobuses it.gather_qmmhas a newglobal_scaleargument ([CUDA] Add global scale support to gather_qmm ml-explore/mlx#4507), andfast::scaled_dot_product_attentionhas a newforce_fusedargument (Add force_fused option to scaled_dot_product_attention ml-explore/mlx#4185). EMLX and the emlx_axon plugins pass the defaults.compile_erasetakes the cache.compiled_fnadds its graph to the cache of the worker thread that calls it, soExprrecords each such cache, and~Exprerases its entry from each one.I built MLX 0.32.4 from source with
LIBMLX_BUILD=trueand 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.