Skip to content

chore(mlx): bump upstream MLX pin to 0.32.1 #703

Closed

Description

@inureyes

Context

The MLX C++ pin currently needs to be moved to the latest upstream ml-explore/mlx main commit. The current checkout found the repository pin state inconsistent: src/lib/mlx-cpp/CMakeLists.txt and src/lib/mlxcel-core/build.rs pointed at e9463bbfc1a7cd9e0e6b96aaa3068a316e234a63, while .github/workflows/release.yml still pointed at a6ec7123dac814417147e21d4aeed694924ddd4d.

As of 2026-07-09, upstream MLX main is 57c66cac7cb3e5b1eb350488a61f1506b40d39f8 (Patch bump to 0.32.1, ml-explore/mlx#3816). The range from the current runtime pin to latest includes correctness and build-facing changes such as ml-explore/mlx#3804 (Fix fp quantized matvec for output dim < 8), ml-explore/mlx#3728 (Add math mode option for custom Metal kernels), and ml-explore/mlx#3720 (Fix compiled kernel correctness for negative-strided inputs).

Goal

Update the in-tree MLX pin to the latest upstream commit and verify that mlxcel still builds and that the local fused Metal/Turbo correctness paths remain valid.

Acceptance criteria

  • src/lib/mlx-cpp/CMakeLists.txt, src/lib/mlxcel-core/build.rs, and .github/workflows/release.yml all use the same MLX commit.
  • The selected upstream commit and relevant upstream changes are summarized in docs or the PR body.
  • cargo build --release --bin mlxcel-bench-decode succeeds on Apple Silicon.
  • The AGENTS.md-required fused Metal kernel correctness tests are run after the pin bump:
    • sparse_v_kernel_threshold_zero_matches_graph
    • delegated_fused_kernel_matches_reference_over_200_steps
    • delegated_steel_envelope_matches_cold_only_fused_over_200_steps
  • Any build break from MLX API changes is fixed in mlxcel's bridge or patches.

Out of scope

Changing native NVFP4 Metal/non-CUDA defaults or recovering the native NVFP4 prefill gap is tracked separately after this pin lands.

Implementation notes

Updated all three pin locations to 57c66cac7cb3e5b1eb350488a61f1506b40d39f8. The MLX bump required one local patch-overlay fix: upstream compiled_collapse_contiguous_dims now returns negative_strides, so src/lib/mlx-cpp/patches/mlx/backend/metal/compiled.cpp now matches the latest CPU/CUDA compiled path binding and forces the large-index path for negative strides.

Validation completed on Apple Silicon:

  • cargo build --release --bin mlxcel-bench-decode
  • cargo test --release -p mlxcel-core sparse_v_kernel_threshold_zero_matches_graph
  • cargo test --release -p mlxcel-core delegated_fused_kernel_matches_reference_over_200_steps
  • cargo test --release -p mlxcel-core delegated_steel_envelope_matches_cold_only_fused_over_200_steps

Activity

  1. added
    type:choreMaintenance tasks (build, CI, etc.)
    area:coremlxcel-core: MLX FFI, primitives, KV cache, layers
    and removed on Jul 9, 2026
  2. self-assigned this
    on Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:coremlxcel-core: MLX FFI, primitives, KV cache, layerspriority:mediumMedium prioritystatus:doneCompletedtype:choreMaintenance tasks (build, CI, etc.)

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions