perf(metal): extend mlxcel_affine_qmm_t_rows to 4-row verify blocks on gen 13/14
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 20/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Área
- backend, machine-learning, performance
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Rust
- Estrellas
- 505
- Forks
- 81
- Merge medio
- 14 h 2 min
- PR fusionados (30 d)
- 448
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de lablup/mlxcel
-
area:core priority:high status:ready type:security
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
priority:medium status:ready type:security
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
Los mantenedores suelen responder en 1 día
-
area:models modeltype:text priority:medium status:in-progress type:bug
Dificultad 4/5 3-5 días Aptitud para principiantes 57/100
Los mantenedores suelen responder en 1 día
-
area:models priority:low status:ready type:test
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
Los mantenedores suelen responder en 1 día
-
area:models modeltype:omni priority:medium status:ready type:bug
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
Los mantenedores suelen responder en 1 día
Todos los issues de lablup/mlxcel
Issues similares
-
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)Posiblemente ocupada @ealwanlee la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
psmux/psmux-plugins#47 ·
-
Link Checker ReportAbiertoautomated issue report
Dificultad 1/5 Menos de una hora Aptitud para principiantes 76/100
ratatui/awesome-ratatui#598 ·
Los mantenedores suelen responder en 1 día
-
release
Dificultad 1/5 Menos de una hora Aptitud para principiantes 75/100
github/gh-aw-mcpg#17603 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
C-Bug S-Needs-Triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
bevyengine/bevy#26718 ·
Los mantenedores suelen responder en 2 días