Repository navigation
chore(deps): bump the MLX pin and declare a base commit for each overlay - #2298
Merged
Merged
Conversation
Declare a single machine-readable `// Modified from upstream MLX <sha> <path>` header line across all 32 overlay files under `src/lib/mlx-cpp/patches/` and `src/lib/mlx-cpp/patches-cuda/`, established by diffing against each overlay's copy or rebase point in `ml-explore/mlx`. Bump `GIT_TAG` in `src/lib/mlx-cpp/CMakeLists.txt` from `81ba1c6a0e50a9268b931579c2d4f1158b9aab5a` to `59d600b5e64c238427d0f8d897ab7c682ef4d3d2` (14 upstream commits) and 3-way merge the overlays touched across that range (`patches/mlx/backend/cuda/device/qmm_naive.cuh`, `patches/mlx/backend/cuda/quantized/qmm/qmv.cu`, `patches/mlx/backend/cuda/quantized/quantized.cpp`, `patches/mlx/backend/metal/quantized.cpp`, `patches-cuda/fast.cpp`, `patches-cuda/ops.cpp`), plus the three `patches/mlx/backend/cuda/reduce/` overlays (`all_reduce.cu`, `col_reduce.cu`, `row_reduce.cu`) that were still at `v0.31.1` (`ce45c525`), so the overlay drift check reports 0 upstream commits and 0 `NO BASE` lines across all 32 files. Retarget `src/lib/mlx-cpp/patches-rocm/` onto `59d600b5e64c238427d0f8d897ab7c682ef4d3d2` via `scripts/mlxcelverse/rocm_overlay.py retarget`, add the `fast::GatedDeltaUpdate` fallback and `NO_GPU_MULTI` stub in `mlx/backend/rocm/primitives.cpp`, update `LOCAL_FIXES.md` and `CORE_RESIDUAL.diff`, and document the CUDA/Metal/CPU overlay base-declaration and 3-way merge procedure in `CONTRIBUTING.md`. Closes #1932
Member
Author
Implementation Review SummaryIntent
Findings Addressed
Remaining Items
Verification
|
Member
Author
Security & Performance Review SummaryFindings: 0 Critical, 0 High, 0 Medium, 0 Low. Security Analysis
Performance Analysis
Contract Gates Passed
|
Member
Author
PR Finalization CompleteSummary
All checks passing. Ready for merge. |
This was referenced Oct 13, 2026
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.
Summary
Bumps the pinned upstream
ml-explore/mlxcommit insrc/lib/mlx-cpp/CMakeLists.txtfrom81ba1c6a0e50a9268b931579c2d4f1158b9aab5ato59d600b5e64c238427d0f8d897ab7c682ef4d3d2(14 upstream commits) and establishes a single machine-readable// Modified from upstream MLX <sha> <upstream/relative/path>base declaration across all 32 overlay files undersrc/lib/mlx-cpp/patches/andsrc/lib/mlx-cpp/patches-cuda/.Changes
ml-explore/mlxhistory (resolvingv0.31.1toce45c525, fixingqmm_sm80.cuwherePatched by mlxcel.precededModified from upstream MLX, and recording the copy/rebase SHAs for the remaining files).59d600b5e):patches/mlx/backend/cuda/device/qmm_naive.cuh,patches/mlx/backend/cuda/quantized/qmm/qmv.cu,patches/mlx/backend/cuda/quantized/quantized.cpp,patches/mlx/backend/metal/quantized.cpp) and the twopatches-cuda/overlays (fast.cpp,ops.cpp) touched between81ba1c6aand59d600b5e, preserving every documented mlxcel delta.dfe17bafb(Fix fp quantized matmul corruption when the quantized dim is not a multiple of 32 ml-explore/mlx#3912, fixing fp-quantized matmul corruption when the quantized dim is not a multiple of 32 inmlx/backend/metal/kernels/fp_quantized.handmlx/backend/metal/kernels/quantized.h) is intact: neither header is overlaid insrc/lib/mlx-cpp/patches/mlx/backend/metal/kernels/, andpatches/mlx/backend/metal/quantized.cppis 3-way merged onto59d600b5e(incorporating3eb822cacandd9add9d11) with only the threeMLXCEL_QMV_WIDEhunks differing from59d600b5e:mlx/backend/metal/quantized.cpp.patches/mlx/backend/cuda/reduce/{all_reduce,col_reduce,row_reduce}.cufromce45c525(v0.31.1) onto59d600b5e(folding in upstream66f58032dconst_castremoval and790be8aa864-bitall_reduceplanning for large inputs) so the drift check reports 0 upstream commits across all 32 overlays.GIT_TAGinsrc/lib/mlx-cpp/CMakeLists.txtto59d600b5e64c238427d0f8d897ab7c682ef4d3d2.src/lib/mlx-cpp/patches-rocm/onto59d600b5e64c238427d0f8d897ab7c682ef4d3d2viascripts/mlxcelverse/rocm_overlay.py retarget, added thefast::GatedDeltaUpdatefallback andNO_GPU_MULTIstub inmlx/backend/rocm/primitives.cpp(documented inLOCAL_FIXES.mditem 6), and regeneratedCORE_RESIDUAL.diff.CONTRIBUTING.md): Added theReconciling CUDA, Metal, and CPU source overlayssubsection underBumping the MLX upstream pindocumenting the base-declaration format, the drift-check loop, and thegit merge-file3-way merge procedure.ROCm overlay
UPSTREAMfork_commit):759159089fc9b17b3e0f1053abebff538f341fa5(unchanged)UPSTREAMretargeted_to_mlx_pin):81ba1c6a0e50a9268b931579c2d4f1053abebff5->59d600b5e64c238427d0f8d897ab7c682ef4d3d2rocm_overlay.py retarget:mlx/fast.cpp,mlx/fast.h,mlx/fast_primitives.h,mlx/ops.cppLOCAL_FIXES.mditem 6:fast::GatedDeltaUpdate::use_fallbackandNO_GPU_MULTI(GatedDeltaUpdate)inmlx/backend/rocm/primitives.cppVerification
bash scripts/ci/mlx_pinned_commit.shprints59d600b5e64c238427d0f8d897ab7c682ef4d3d2andcargo test -p mlxcel-mlx-pinpasses (27/27 tests).src/lib/mlx-cpp/patches/andsrc/lib/mlx-cpp/patches-cuda/against59d600b5e64c238427d0f8d897ab7c682ef4d3d2produces 0NO BASElines and 0DRIFTlines.make verify-versions verify-kernel-dtype-keys verify-kernel-port-dispatch verify-llama-compat verify-rocm-overlay verify-python-tooling verify-fmtpasses.Qwen3-0.6B-4bit, greedy--temp 0, 32 tokens) on this AMD Ryzen AI MAX+ 395 (gfx1151) Linux host:bash scripts/rocm_gpu_guard.sh -- bash scripts/ci/rocm_smoke.sh): 32 tokens generated at251.24 tok/s, matching the pre-bump greedy output token-for-token (Okay, the user wants me to write a one-sentence about the ocean. Let me start by brainstorming some key elements of the ocean. The).MLXCEL_DEVICE=cpu): identical 32-token greedy output.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) and the GB10 CUDA hardware suite were not run locally because this validation host is a Linux AMDgfx1151ROCm machine without Metal or NVIDIA CUDA hardware (CI runs the GB10 CUDA gate).Closes #1932