Repository navigation
chore(mlx): bump pin to 9a795735 and rebase the four drifted overlays - #1198
Merged
Merged
Conversation
168 commits on from 2c46b953. Upstream touched only four of the 21 overlay targets in that range, so the reconciliation is four three-way merges and nothing else: matmul.cpp, jit_module.cpp, reduce/init_reduce.cu, and ops.cpp through 23 commits. The two Metal overlays are byte-identical across the range. Three merged cleanly. matmul.cpp conflicted once, where #3929 added out.size() == 0 to GatherMM::eval_gpu's empty-input guard on the same lines our overlay renames a_pre/b_pre to a/b; the resolution takes upstream's condition under our names. Each merged overlay's delta against the new base is the same +/- count it had against the old one, so upstream landed and ours survived. quantized/ is untouched upstream here and qmm/qmm.h is byte-identical, so the call sites that overlay's comment asks to re-verify needed no change. The comment now records that instead of the previous bump's reasoning. Validated on Apple M5 Max, Metal only. The three fused Metal kernel launchers re-validate at RMS 1.7263e-4 and 1.5259e-4 against a 5e-3 contract. Isolated failure sets are identical at both pins over three runs each, 13 in mlxcel and 4 in mlxcel-core, all pre-existing M5 reduced-precision failures that pass under MLX_ENABLE_TF32=0. The four merged overlays are CUDA-only and were not compiled here.
This was referenced Aug 17, 2026
be-free-snowboy
pushed a commit
to freestylejs/snowbrain-mlxcel
that referenced
this pull request
Oct 27, 2026
…lablup#1198) 168 commits on from 2c46b953. Upstream touched only four of the 21 overlay targets in that range, so the reconciliation is four three-way merges and nothing else: matmul.cpp, jit_module.cpp, reduce/init_reduce.cu, and ops.cpp through 23 commits. The two Metal overlays are byte-identical across the range. Three merged cleanly. matmul.cpp conflicted once, where #3929 added out.size() == 0 to GatherMM::eval_gpu's empty-input guard on the same lines our overlay renames a_pre/b_pre to a/b; the resolution takes upstream's condition under our names. Each merged overlay's delta against the new base is the same +/- count it had against the old one, so upstream landed and ours survived. quantized/ is untouched upstream here and qmm/qmm.h is byte-identical, so the call sites that overlay's comment asks to re-verify needed no change. The comment now records that instead of the previous bump's reasoning. Validated on Apple M5 Max, Metal only. The three fused Metal kernel launchers re-validate at RMS 1.7263e-4 and 1.5259e-4 against a 5e-3 contract. Isolated failure sets are identical at both pins over three runs each, 13 in mlxcel and 4 in mlxcel-core, all pre-existing M5 reduced-precision failures that pass under MLX_ENABLE_TF32=0. The four merged overlays are CUDA-only and were not compiled here.
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
Moves the pinned MLX C++ commit from
2c46b953(2026-08-05) to9a795735(2026-08-17), 168 commits.The pin has one source of truth, the
GIT_TAGinsrc/lib/mlx-cpp/CMakeLists.txt(#1047), and both parsers accept the new value (scripts/ci/mlx_pinned_commit_test.shandcargo test -p mlxcel-mlx-pinboth pass). The synthetic SHAs in those parser fixtures are deliberately left alone: they exercise parser shape, not the live pin, and churning them would imply a coupling that does not exist.Overlay reconciliation
This tree carries 21 whole-file overlays. Upstream touched four of those targets in this range, so those four are the entire job:
mlx/ops.cpp(patches-cuda)mlx/backend/cuda/jit_module.cppmlx/backend/cuda/reduce/init_reduce.cumlx/backend/cuda/matmul.cppThe two Metal overlays (
compiled.cpp,kernels/utils.h) are byte-identical upstream across the range and are untouched here.The one conflict is in
GatherMM::eval_gpu. Upstream#3929widened the empty-input guard toout.size() == 0 || a_pre.size() == 0 || b_pre.size() == 0, on the same lines where our overlay had renameda_pre/b_pretoa/b. Those names bind toinputs[0]andinputs[1]in our version, exactly what upstream callsa_pre/b_pre, so the resolution takes upstream's added condition under our names.The check that this went right: each merged overlay's delta measured against the new base is the same
+/-count it had against the old base. Upstream's changes came in and ours stayed. An overlay that silently reverts an upstream change is how #830 / #831 happened, which is what that check exists to catch.mlx/backend/cuda/quantized/is untouched upstream in this range andquantized/qmm/qmm.his byte-identical, so the dispatch call sites thequantized.cppoverlay's header comment asks to re-verify on every bump needed no adjustment. That comment now records this range's finding instead of restating the previous bump's.API changes that do not reach this tree
#4207removed theastype(array, Dtype, std::optional<bool> copy, StreamOrDevice)overload. Every call site inmlxcel-coreandmlx-cpp/turbouses the two- or three-argument form, which is unchanged.#4184added a requiredendpointparameter tolinspace's primary overload and kept a defaulted inline one. Our single call site resolves to the latter.Validation
Apple M5 Max, 40 GPU cores, 128 GB, macOS 26.6.1, Xcode 26.5. Metal only.
cargo build --release --features metal,accelerate: clean, 5m52s. The_deps/.mlx-build-commitmarker advances to the new SHA.CLAUDE.mdrequires re-validating after every bump, all pass well inside their RMS < 5e-3 contract:sparse_v_kernel_threshold_zero_matches_graph;delegated_fused_kernel_matches_reference_over_200_stepsat 1.7263e-4;delegated_steel_envelope_matches_cold_only_fused_over_200_stepsat 1.5259e-4.cargo fmt --checkclean,cargo clippy --all-targets --features metal,accelerate -- -D warningsclean.-p mlxcel --libfails the same 13 tests,-p mlxcel-core --libreports 1472 passed / 4 failed. All 17 pass underMLX_ENABLE_TF32=0and are the pre-existing M5 reduced-precision class of fix(core): f32 matmul and single-query SDPA lose ~fp16 precision on M5, breaking four numeric tests #1065.Two artifacts turned up while building that baseline and are worth naming so nobody re-derives them as findings. A whole-workspace
cargo testrun on the old pin took aSIGSEGV198 tests into themlxcel-corebinary, which truncated it and made #1065's four tests look like new failures; five isolated runs of that binary on the old pin are 1472/4 every time. Andmodels::phixtral::tests::the_prefill_is_causal_without_being_handed_a_maskpasses under whole-workspace parallelism and fails in isolation on both pins. Whole-workspace runs on this hardware are not a stable comparison basis; the per-target runs above are.Not validated here
The four merged overlays are CUDA-only and were neither compiled nor run on this machine. Per
CONTRIBUTING.mdthe CUDA backend has no CI test gate at all (release.ymlbuilds under--features cudabut runs nothing), somake verify-test-cudaon NVIDIA hardware, single-threaded, is the only gate they will get.mlx/ops.cppis the one to look at first: it took 437 lines of upstream churn around a 46/11 delta, which is the largest merge in this bump.Note for #1186 / #1187
use_qmv_wideis unchanged at the new pin (mode != "affine" || d.get_architecture_gen() >= 15), and so is theM >= 2dispatch that consumes it, so the temperature-0 block-vs-chain break atT = 2on generation 15+ survives this bump. The op-parity sweep confirms it: every quantized column still breaks atT = 2on this host. Upstream main carries no knob to bypass that path, so #1187 cannot be closed by pinning forward.get_qmv_batch_limitdid change (#3791): generation 17 at a non-darchitecture size now returns 33 / 25 / 13 by operand size, where the old code fell through to adefaultbranch returning 14 / 10 / 6. That moves the second cliff, which #1186 currently documents at 10 for an M5 Max. The equal/diverges sweep cannot observe the move becauseuse_qmv_widealready breaks atT = 2here and hides the batch-limit region; it is visible only as a magnitude step in differing-byte counts. Measuring that needs a test change, so it is deliberately left out of this PR and filed as follow-up on #1186.