Skip to content

update: advance MLX pin and reconcile backend ownership - #2304

Open
inureyes wants to merge 5 commits into
mainfrom
update/issue-2303-mlx-pin
Open

inureyes wants to merge 5 commits into
mainfrom
update/issue-2303-mlx-pin

Conversation

@inureyes

@inureyes inureyes commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Summary

Advance MLX from 59d600b5 to captured upstream main 243bdf09 (111 commits, 312 files). Reconcile whole-file overlays to retain mlxcel's numerical behavior and runtime controls without overwriting upstream fixes.

  • Rebase 11 CPU/CUDA/Metal overlays, retain 17 unchanged upstream-backed files and two helpers, and retire two overlays covered by upstream #4514 and #4554. Preserve CUDA chunking, gathered GEMM, dtype controls, and the [nightly-verify] main is red #1599 Metal B * M correction; use upstream #4594 for Xcode 27.
  • Retarget ROCm while preserving fork 75915908. Adapt move-only allocation ownership, borrowed-storage donation safety, compiled callbacks, SDPA sinks, gated-delta fallback, floor division, and odd inverse FFT. Add actual-header host ownership regressions; these do not prove HIP completion ordering.
  • Fix the new CUDA RHS route's device argument and add aligned MXFP4/MXFP8 reference coverage. Retain reviewed macOS filesystem test portability fixes from fix(metal): size gather_qmm_rhs by the broadcast x rows #2138.

Validation

  • Pin/parser (27), overlay tooling (29), ownership, provenance, contract gates, Python tooling (123), and formatting pass.
  • CUDA compilation and 94 focused numerical executions pass. After the final overlay retirement, 45 numerical executions and two forced RHS runs pass; fresh PTX proves f16/bf16 × MXFP4/MXFP8 route execution.
  • Metal CI on final production source 3aeccc2b: fmt/Clippy pass; 12,285 tests pass, 390 ignored; 51 FFmpeg video tests pass.
  • Actual GB10 Kimi 48B-A3B 4-bit inference passes three focused tests, five exact short/long controls, and a coherent 58-token explanation. This uses combined source 53473340 = production 3aeccc2b + independent fix: restore Kimi Linear CUDA inference #2296 mask fix 1fec677b; that model fix is not included here. CLI SHA-256: b52d70388e0420582c4f60f3341d570c2afd736685b37e2c0c6e50ed9eaf5fae.

ROCm compilation/runtime and M5-specific execution remain unavailable. Ordinary PR CI is tracked separately; queued checks are not passes. The requested whole-batch CUDA/Clippy and fresh main Metal integration gate remains deferred until the expanded follow-ups are ready. This PR does not independently close #1599, #2158, or #1986. English/Korean technical reports record provenance and remaining limits.

Closes #2303

Advance MLX to 243bdf09c0cccbb85ca6a686dab3cc0102cf1f7e, rebase changed CPU/CUDA/Metal overlays against pristine upstream sources, retire the CUDA teardown overlay superseded by upstream #4514, and retain the gathered-row correctness fix while using upstream's Xcode 27 workaround.

Retarget the ROCm core overlay and adapt move-only allocation ownership, custom releases and primitive APIs without changing the fork revision. Add host allocation lifetime contracts and preserve reviewed macOS filesystem test portability fixes for candidate CI. Document every retained overlay and hardware validation boundaries.

Validation: 27 MLX pin/parser tests, version/dtype/dispatch/llama contracts, 123 Python tooling tests and formatting pass. Native CUDA compilation and candidate Metal execution are coordinated separately; ROCm GPU validation requires an AMD host.

Refs #2303
@inureyes inureyes added status:review Under review type:dependency Dependency updates priority:medium Medium priority area:core mlxcel-core: MLX FFI, primitives, KV cache, layers labels Oct 14, 2026
The rebased upstream gathered GEMM route called make_cta_tiler with two arguments, while the retained mlxcel selector needs the active CUDA device for its Blackwell tile cap. Pass encoder.device() as the existing quantized GEMM route does, preserving the row count, quantization group size and runtime tile overrides. The missing argument caused the first candidate CUDA build to fail and the later CuTe layout errors were cascading diagnostics.

Validation: inspected both selector call sites and checked the diff. Native CUDA compilation is being rerun on the corrected source.

Refs #2303
Add 384-wide sorted-prefill reference cases for MXFP4 and MXFP8 with float16 and bfloat16 activations. The existing 320-wide cases fail the new CUDA gathered RHS kernel's output-alignment admission, so they cannot validate its JIT path or the Blackwell 128-row tile policy. Keep those tail cases and reuse the existing expanded routing fixture, host reference and tolerances.

Correct the CUDA ops overlay's stale provenance comment. Formatting and diff checks pass; candidate hardware execution follows in the coordinated validation run.

Refs #2303
Upstream #4554 adds cp_async_wait<0>() and a CTA barrier immediately before the quantized GEMM epilogue overwrites the shared-memory A/B buffers. The former local #910 pair precedes only a register-fragment conversion, so upstream now supplies the same async-copy completion and cross-thread ordering for both ordinary and gathered RHS kernels.

Retire the whole device header overlay after verifying that removing its provenance and local barrier hunk reproduces pristine 243bdf09 byte for byte. Record the proof and updated overlay inventory; retain the existing JIT module revision boundary.

Validation: pristine-object equality assertion and diff check pass. The coordinated CUDA run will restore the retired cached header from the pinned Git object before rebuilding.

Refs #2303
Record final CUDA route, combined-tree Kimi inference, and production-source Metal validation for PR #2304. Preserve source and binary provenance, independent #2296 attribution, and unavailable ROCm/M5 and deferred integration coverage.
@inureyes
inureyes marked this pull request as ready for review October 14, 2026 01:04
@inureyes inureyes added status:done Completed and removed status:review Under review labels Oct 14, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:core mlxcel-core: MLX FFI, primitives, KV cache, layers priority:medium Medium priority status:done Completed type:dependency Dependency updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

update: Advance MLX pin to 243bdf09 and reconcile backend overlays [nightly-verify] main is red

1 participant