perf(metal): extend mlxcel_affine_qmm_t_rows to 4-row verify blocks on gen 13/14
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 20/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- backend, machine-learning, performance
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Rust
- Star
- 505
- Fork
- 81
- Merge trung bình
- 14 giờ 2 phút
- Pull request đã merge (30 ngày)
- 448
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của lablup/mlxcel
-
area:core priority:high status:ready type:security
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
priority:medium status:ready type:security
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area:models modeltype:text priority:medium status:in-progress type:bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 57/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area:models priority:low status:ready type:test
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area:models modeltype:omni priority:medium status:ready type:bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của lablup/mlxcel
Issue tương tự
-
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)Có thể đã có người làm @ealwanlee đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
psmux/psmux-plugins#47 ·
-
Link Checker ReportĐang mởautomated issue report
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 76/100
ratatui/awesome-ratatui#598 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
release
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
github/gh-aw-mcpg#17603 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
C-Bug S-Needs-Triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
bevyengine/bevy#26718 ·
Maintainer thường phản hồi trong vòng 2 ngày