You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Phase M1: record 4-bit matmul baseline + A/B design decision
Benchmarked today's unfused gemv_4bit/gemm_4bit (native dequant of B ->
F.linear) on this machine to ground the NEXT_MATMUL_PLAN.md design fork with
real numbers instead of intuition.
Findings (MPS_STATUS.md §10):
- gemv (M=1) is 80-90% dequant-bound; the GEMM is ~10%. Option A (MPSMatMul on
materialized B_dq) can only touch that 10% -> fusion (Option B) is the win.
- gemm has a fixed ~0.75ms dequant floor; the GEMM overtakes it near M~512.
Large-M gemm -> Option A (don't hand-beat Apple's tuned GEMM).
- The existing dequant kernel runs at ~54 GB/s vs ~400 GB/s achievable, so the
M2 target is memory bandwidth, not "fusion" per se: a fused gemv that reads
packed B no faster than today wins nothing.
Decision: Option B (fused) for gemv_4bit = Phase M2; Option A
(MPSMatrixMultiplication) for large-M gemm_4bit = Phase M3. Matches the plan's
recommended split, now evidence-backed.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments