perf(metal): extend mlxcel_affine_qmm_t_rows to 4-row verify blocks on gen 13/14
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
- 20/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Ambito
- backend, machine-learning, performance
Direzione di ricerca
Read TECHNICAL_REPORTS/3400-qmv-wide-force-diagnostic-20261124.en.md, then dispatch_qmm_t in src/lib/mlxcelverse/overlays/metal/mlx/backend/metal/quantized.cpp:2349 and the use_mlxcel_qmm_rows gate at :622. Run the exactness probe in src/models/speculative_exactness.rs:311 with MLXCEL_QMV_WIDE=1, then benchmark interleaved verify ms and decode tok/s per docs/benchmarks.md. Done means byte-identical 4-row products reach mlxcel_affine_qmm_t_rows, faster verify, and updated src/lib/mlxcelverse/overlays/metal/README.md and src/lib/mlxcelverse/CMakeLists.txt if kept.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
On Apple GPU generations 13 and 14 a block-4 MTP verify runs one qmv per row. In dispatch_qmm_t (src/lib/mlxcelverse/overlays/metal/mlx/backend/metal/quantized.cpp:2349), qmv_mma is disabled on Ultra parts, use_mlxcel_qmm_rows (:622) admits only M >= 5 && M <= 8, and affine qmv_wide is gen 15+. On an M1 Ultra with mlx-community/gemma-4-12b-it-4bit (revision 73bcf09) and mlx-community/gemma-4-12B-it-assistant-bf16, block 4, temperature 0, a verify round costs about 68 ms, about three classic steps (classic decode is about 43 tok/s). MTP reaches 50 tok/s on an enumeration prompt (acceptance 0.997) but 33 tok/s on prose (acceptance 0.52), slower than classic. See TECHNICAL_REPORTS/3400-qmv-wide-force-diagnostic-20261124.en.md.
Proposal
Lower the row floor of use_mlxcel_qmm_rows to 4 (try 2 and 3 if cheap), then measure. The comment at :622 records that the kernel beats qmv at 4 rows only for gate_up and from 6 rows for smaller projections, so a per-shape gate is an acceptable outcome.
Exactness risk: the overlay header says mlxcel_affine_qmm_t_rows reduces in a different order than qmv and shares the MLXCEL_QMV_WIDE switch for that reason. With the variable unset, a failing probe makes retry_without_qmv_wide (src/models/speculative_exactness.rs:311) pin the process narrow. That turns the rows kernel off, so the probe passes on per-row qmv with no speedup, and the 5-to-8-row batched decode kernel is lost for the process. If the probe fails, do not keep the range change alone. Either make the 4-row path order-preserving relative to qmv (see #1289), or close this issue with the numbers.
Acceptance Criteria
- The exactness probe passes with
MLXCEL_QMV_WIDE=1(this skips the retry, so the new branch must itself be byte-identical), and the 4-row products are shown to reachmlxcel_affine_qmm_t_rows. - Verify ms per round and decode tok/s for unset vs changed, on enumeration and prose prompts, from interleaved runs.
- A teacher-forced logit trace per
docs/benchmarks.md("Judging a change that moves the numbers"), including the reverted arm. - The change is kept only if the verify round gets faster.
- A kept change is documented in the overlay header,
src/lib/mlxcelverse/overlays/metal/README.md, and the overlay note insrc/lib/mlxcelverse/CMakeLists.txt.
Refs #3398, #3400.
- Lingua principale
- Rust
- Stelle
- 505
- Fork
- 81
- Merge medio
- 14h 2m
- PR unite (30g)
- 448
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:high status:ready type:security
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
priority:medium status:ready type:security
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
I maintainer di solito rispondono entro 1 giorno
-
area:models modeltype:text priority:medium status:in-progress type:bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 57/100
I maintainer di solito rispondono entro 1 giorno
-
area:models priority:low status:ready type:test
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
I maintainer di solito rispondono entro 1 giorno
-
area:models modeltype:omni priority:medium status:ready type:bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di lablup/mlxcel
Issue simili
-
psmux-resurrect: restoring a session with a numeric name puts its windows into the wrong session (`new-window -t 4` is read as window 4)Forse già presa @ealwanlee l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
psmux/psmux-plugins#47 ·
-
Link Checker ReportApertaautomated issue report
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 76/100
ratatui/awesome-ratatui#598 ·
I maintainer di solito rispondono entro 1 giorno
-
release
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
github/gh-aw-mcpg#17603 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
C-Bug S-Needs-Triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
bevyengine/bevy#26718 ·
I maintainer di solito rispondono entro 2 giorni