Skip to content

mlx v0.32.4 - #508

Merged
davidkoski merged 8 commits into
mainfrom
mlx-0.32.4
Oct 26, 2026
Merged

davidkoski merged 8 commits into
mainfrom
mlx-0.32.4

Conversation

@davidkoski

Copy link
Copy Markdown
Member

Proposed changes

mlx v0.32.4

New API

  • MLXFast.gatedDeltaUpdate
  • Memory.bufferSize
  • matrixTransposed
  • uniqued

Changed API

  • gatherQuantizedMM -- adds globalScale: MLXArray? = nil, biases now has a nil default

Checklist

Put an x in the boxes that apply.

  • I have read the CONTRIBUTING document
  • I have run pre-commit run --all-files to format my code / installed pre-commit prior to committing changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the necessary documentation (if needed)

Comment thread Source/MLX/Memory.swift
///
/// - Parameter arrays: arrays to count
/// - Returns: size in bytes
public static func bufferSize(_ arrays: some Collection<MLXArray>) -> Int {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@aleroot I think you were looking for this in #468

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.

Ah, yes! I have just closed #131 as I have seen it has been superseded by #140, which includes mlx_get_array_buffer_size.
This is part of the feature I was talking about earlier in #427
Thanks !

Comment thread Source/MLX/Ops.swift
/// If it is larger, the output is padded with `fillValue`.
/// - stream: stream or device to evaluate on
/// - Returns: sorted unique elements
public func uniqued(

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@louen your unique makes it to mlx-swift -- check out this function and the one below, let me know if you have thoughts on how it is ported!

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

Good!

@davidkoski davidkoski mentioned this pull request Oct 22, 2026
7 tasks done
@davidkoski
davidkoski added this pull request to stack #511 October 22, 2026 21:52
@ronaldmannak

Copy link
Copy Markdown
Contributor

@davidkoski is there any chance mlx-c can get updated with new distributed mlx code that's in mlx 0.32.4 as well?
ml-explore/mlx-c#139

@davidkoski

Copy link
Copy Markdown
Member Author

@davidkoski is there any chance mlx-c can get updated with new distributed mlx code that's in mlx 0.32.4 as well? ml-explore/mlx-c#139

I will talk to Ronan -- if it doesn't make it this time we can get it in a patch.

New API

- MLXFast.gatedDeltaUpdate
- Memory.bufferSize
- matrixTransposed
- uniqued

Changed API

- gatherQuantizedMM -- adds globalScale: MLXArray? = nil, biases now has a nil default
@davidkoski

Copy link
Copy Markdown
Member Author

@ronaldmannak the mlx-c distributed change is included here. Just waiting for CI now

@davidkoski
davidkoski merged commit dbce77f into main Oct 26, 2026
7 checks passed
@davidkoski
davidkoski deleted the mlx-0.32.4 branch October 26, 2026 18:31
tsnAnh pushed a commit to TitoniumLab/mlx-swift that referenced this pull request Nov 7, 2026
Brings in upstream mlx-swift up to 392aa34 (9 commits past the 43c90af
merge base), including the mlx v0.32.4 vendor update (ml-explore#508), optimizer
state, CUDA build changes, crossEntropy/nllLoss, C++ warning fixes,
concurrent safetensors loading (ml-explore#462), and update(parameters:) (ml-explore#510).

Conflict resolution:
- Source/Cmlx/mlx and Source/Cmlx/mlx-c: re-vendored from upstream
  (mlx 36969c09, mlx-c a26f2d58) with the carried fork patches re-applied,
  including the unsigned floor_divide shortcut in mlx/ops.cpp.
- Source/Cmlx/mlx-generated: regenerated with tools/update-mlx.sh;
  moe_stream.metal (fork-only) copied from fork main; sdpa_vector.h keeps
  the TurboQuant changes.
- Source/Cmlx/include-framework: regenerated with
  tools/update-mlx-xcodeproj.sh; fork headers (mlx-fast.h,
  mlx-threadpool.h, mlx-c-fast.h, mlx-io-load.h) retained.
- Package.swift: fork version kept with upstream's cross_entropy.cpp and
  gated_delta_update.cpp sources and shorten-64-to-32 warning suppression;
  CUDA stubbing retained.
- xcode/MLX.xcodeproj: upstream project plus moe_stream.metal.
- Tests/MLXTests/FP8Tests.swift: upstream version taken; the fork's
  NaN-aware variant papered over pre-v0.32.4 decoding and is superseded.
- Source/MLX/Transforms+Compile.swift: fork's scoped default device patch
  kept.
- .github/*, .gitmodules, MAINTENANCE.md, fmt/test/*: fork-only, kept.

Not compiled or tested locally; CI is the gate.

Co-Authored-By: Claude Haiku 5.5 <[email protected]>
davidkoski pushed a commit that referenced this pull request Nov 9, 2026
The noMetalCmlxExcludes entry was spelled "mxl/mlx/backend/metal/cross_entropy.cpp",
  so the file was not excluded on Linux and the SwiftPM build failed with:

    mlx/backend/metal/device.h:5:10: fatal error: 'Metal/Metal.hpp' file not found

  The typo was introduced in #508 and first shipped in 0.33.0
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.

4 participants