chore(rocm): mlxcelverse ROCm fork sync script, MLX pin-bump procedure, and upstreaming local fixes
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- git, shell
- Ambito
- build-system, documentation, tooling
Direzione di ricerca
Inizia da scripts/mlxcelverse/sync_from_fork.sh e check_api_drift.sh, poi leggi CONTRIBUTING.md:127-153 e il rapporto tecnico a cui fa riferimento. Esamina lo stato esistente di patches-rocm/ e il commit del fork prima di progettare i controlli di sincronizzazione e di deriva. Il lavoro è completato quando gli script riproducono l’overlay, segnalano le interruzioni note, la procedura di aggiornamento di ROCm è documentata e LOCAL_FIXES.md registra la proposta upstream.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Part of #1801. Phase 3. Depends on #1802 (closed, landed in PR #1818).
Status (2026-09-29, origin/main d8d34e2b)
- Exists:
src/lib/mlx-cpp/patches-rocm/UPSTREAMandLOCAL_FIXES.md(PR #1818, kept current by every overlay change since), a short pin-bump procedure insrc/lib/mlx-cpp/patches-rocm/README.md:18-24(PR #1818) and a ROCm paragraph inCONTRIBUTING.md:150(PR #1819). - Does not exist:
scripts/mlxcelverse/(neither the sync script nor the drift check), any upstream PR againstNripeshN/mlx, and any upstream link inLOCAL_FIXES.md. Nothing underscripts/,Makefileordocs/automates the fork sync;docs/installation.mdanddocs/architecture.mdonly describe the overlay. - The overlay's recorded source is still
NripeshN/mlx@rocm-supportcommit75915908dfe5028335d318b10340313744fd3a8d, fork merge base39886de4, retargeted to the MLX pin81ba1c6a, which is still the current pin (UPSTREAM;scripts/ci/mlx_pinned_commit.sh).
Context
The ROCm part of mlxcelverse has two moving upstreams:
ml-explore/mlx, which mlxcel bumps regularly. Each bump can change the 15 core overlay files and the APIs the106backend files compile against (108 ond8d34e2b:hadamard.hipandfft.hipwere added locally;patches-rocm/README.md:9still says 106). The retarget in #1801 needed six fixes after 360 upstream commits (a host-onlyisnantemplate hiding device overloads, a changed return tuple, constructor argument changes, a newforce_fusedparameter, new primitives needingNO_GPUstubs, andEvent::error). Becauselibmlxis static in mlxcel, a missingeval_gpushows up at link time.NripeshN/mlx@rocm-support, where ROCm kernels improve quickly (dozens of commits in July 2026 alone: WMMA flash attention, MoE, allocator).
Whole-file overlays carry a known review risk: the existing bump check (the overlay's +/- line counts against the new upstream base must equal those against the old base) does not catch an overlay that was already wrong before the bump. A Metal overlay once carried only half of an upstream fix for months until a reviewer compared it line by line.
Local fixes made while vendoring should flow back to the fork so the overlay does not drift from its source.
Inventory: overlay changes since PR #1818
git log origin/main -- src/lib/mlx-cpp/patches-rocm/ shows five commits after the vendoring commit bec64748 (PR #1818). All of them touch only mlx/backend/rocm/ (plus LOCAL_FIXES.md), none of the 15 core files, and each is recorded in LOCAL_FIXES.md as "Applies to the fork; to be proposed there". These, with items 8 to 11 that arrived with PR #1818 itself, are the upstreaming backlog and the fix list the sync script must re-apply.
b3a2226ePR #1822: f16 activations routed to the warp-sharedgather_qmmkernel (quantized/qmm.hip;LOCAL_FIXES.mditem 12).20cf77cePR #1823: f32 activations no longer skip every launch in the tiled qmv path (quantized/qmm.hip; item 13).39c597b0PR #1824:Scatterpassesupd_post_idx_sizeasint64_t, andadd_kernel_nodestatically checks argument sizes (indexing.hip,device.h; item 14).9ead2b7dPR #1856:SearchSortedandHadamardimplemented, narrowGather/Scatterindex dtypes widened to int32 (sort.hip, newhadamard.hip,indexing.hip,primitives.cpp,CMakeLists.txt; items 15 to 17; closed #1853).4641dc7aPR #1861:FFTimplemented through hipFFT with an 8-entry plan cache (newfft.hip,primitives.cpp,CMakeLists.txt; item 18). The cap works around a hipFFT hang whose root cause is unknown, tracked in #1876; say so in the upstream proposal.
Items 1 to 7 of LOCAL_FIXES.md are retarget-only and follow the fork when it merges newer MLX.
Scope
Tooling and written procedure so that both kinds of update are routine, plus sending the local fixes upstream.
Implementation plan
scripts/mlxcelverse/sync_from_fork.sh <fork-commit>: fetch the fork, copymlx/backend/rocm/intopatches-rocm/, re-apply the local fix list, and for each of the 15 core files produce the fork's diff against its own merge base so it can be 3-way merged (git merge-file) into the current overlay. Updatepatches-rocm/UPSTREAM. Not started. The local fix list now coversLOCAL_FIXES.mditems 2 to 18, including two files the fork does not have (hadamard.hip,fft.hip), which the script must carry rather than delete.scripts/mlxcelverse/check_api_drift.sh: build the ROCm tree at a candidate pin and list undefinedmlx::coresymbols and compile errors, so a bump PR sees the ROCm breakage immediately. Not started.- Extend the MLX pin-bump procedure in
CONTRIBUTING.md(lines 127-153nowCONTRIBUTING.md:127-150) and the technical report template referenced there with a ROCm section: 3-way merge each core overlay, compare each overlay line by line with upstream (not only line counts), re-run the ROCm op checks and the smoke from #1811, and record the drift fixes in the PR body. Partly done:CONTRIBUTING.md:150(PR #1819) andpatches-rocm/README.md:18-22(PR #1818) cover the 3-way merge, the line-by-line comparison, the ROCm build and link,NO_GPUstubs and recording fixes inLOCAL_FIXES.mdandUPSTREAM. Still missing: runningmake verify-rocm(which includes the #1811 smoke,Makefile:804), recording drift fixes in the PR body, and the report section. The pin-bump section onorigin/mainreferences no report template; the precedent to extend isTECHNICAL_REPORTS/1772-mlx-pin-mxfp8-round-up-20260911.en.mdsection 3 (lines 61-82). - Keep a
patches-rocm/LOCAL_FIXES.mdlisting every change relative to the fork commit, with the reason and an upstream link once sent. Done for the listing (PR #1818, 18 items as of PR #1861); no upstream links yet because nothing has been sent. - Open PRs against
NripeshN/mlx(rocm-support) for the fixes that apply to the fork itself: the E8M0uint8_tscale dispatch for mxfp4/mxfp8 qmv, and any kernel fixes from #1804 and #1808. Retarget-only fixes (theisnanqualification, API drift) go upstream when the fork itself merges newer MLX. Not started: no PR from this project exists onNripeshN/mlx. The candidate set is nowLOCAL_FIXES.mditems 8 and 10 to 18 (item 9 only after a root cause), per the inventory above.
Acceptance criteria
- Running the sync script against the current fork commit reproduces the committed
patches-rocm/byte for byte. - The drift check lists the six known breaks when run against the fork's original merge base plus current upstream.
-
CONTRIBUTING.mddocuments the ROCm part of a pin bump. (CONTRIBUTING.md:150, PR #1819, pointing topatches-rocm/README.md:18-22; themake verify-rocmstep and PR-body record from plan item 3 are still to add.) -
LOCAL_FIXES.mdexists; the scale-dispatch fix is proposed upstream with a link recorded. (The file exists, PR #1818; the upstream proposal and link do not.)
References
CONTRIBUTING.md:127-150,TECHNICAL_REPORTS/1772-mlx-pin-mxfp8-round-up-20260911.en.md(lines 61-82)src/lib/mlx-cpp/patches-rocm/UPSTREAM,src/lib/mlx-cpp/patches-rocm/LOCAL_FIXES.md,src/lib/mlx-cpp/patches-rocm/README.md- Fork: https://github.com/NripeshN/mlx/tree/rocm-support
Refresh log
2026-09-29
- Recorded what exists:
UPSTREAM(fork commit75915908, pin81ba1c6a),LOCAL_FIXES.mdand the overlay README procedure from PR #1818, and theCONTRIBUTING.md:150paragraph from PR #1819; checked off theCONTRIBUTING.mdcriterion and marked plan items 3 and 4 partly or fully done. - Recorded what does not: no
scripts/mlxcelverse/sync or drift script, no upstream PR, no upstream link. - Added the inventory of the five overlay commits since PR #1818 (PRs #1822, #1823, #1824, #1856, #1861), all backend-only, which enlarges both the sync script's fix list and the upstreaming set.
- Corrected
CONTRIBUTING.md:127-153to:127-150, the report section to lines 61-82, and the backend file count (108, not 106); noted that the pin-bump section references no report template.
- Lingua principale
- Rust
- Stelle
- 471
- Fork
- 55
- Merge medio
- 9h 36m
- PR unite (30g)
- 289
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di lablup/mlxcel
-
area:core priority:low status:ready type:chore
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
I maintainer di solito rispondono entro 1 giorno
-
priority:low status:ready type:docs
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
I maintainer di solito rispondono entro 1 giorno
-
docs(webpage): add a webpage/site README covering the pnpm/uv/zensical build and deploy contractApertapriority:low status:ready type:docs
Difficoltà 1/5 1-3 ore Idoneità per principianti 86/100
I maintainer di solito rispondono entro 1 giorno
-
priority:low status:ready type:docs
Difficoltà 2/5 1-3 ore Idoneità per principianti 92/100
I maintainer di solito rispondono entro 1 giorno
-
priority:medium status:ready type:docs
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di lablup/mlxcel
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
stellar/stellar-cli#2773 ·
I maintainer di solito rispondono entro 2 giorni
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
voidzero-dev/oxc-angular-compiler#511 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 86/100
yantrikos/yantrik-os#539 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
documentation station:mac ui-dashboard
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
rolter-ai/rolter#2490 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno