Skip to content

[Metal:Feature] Full W2/W3 decode GEMV + conv1x1 support for Metal ba… - #4714

Merged
v0jiuqi merged 1 commit into
masterfrom
sync/20260805-0925
Aug 5, 2026
Merged

[Metal:Feature] Full W2/W3 decode GEMV + conv1x1 support for Metal ba…#4714
v0jiuqi merged 1 commit into
masterfrom
sync/20260805-0925

Conversation

@v0jiuqi

@v0jiuqi v0jiuqi commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

…ckend

  • Deferred dequant + pre-scaling for W2/W3 g8 GEMV
  • Extend 2sg decode GEMV + fusions to W_QUANT_2/3
  • Extend g16 lm_head GEMV to W_QUANT_2/3
  • W_QUANT_2/3 in MetalSharedGather (tied lm_head)
  • Complete W2/W3 conv1x1 support
  • Vectorize W2 dequant loads, ushort W3 GEMV tiles, size-gate fused W3 GEMM
  • Fix W2/3 conv1x1 misrouting on non-simdgroup-matrix GPUs
  • Fix W_QUANT_2/3 decode GEMV shadowed by W4 macro alias
  • Fix 2/3-bit weight disk embedding decode

Link: https://code.alibaba-inc.com/AliNN/AliNNPrivate/codereview/28994941
GitOrigin-RevId: 9eb095621ebe5f22bdb6cabb3f0e8578ce27c972

Description

Module

Type

  • Feature
  • Bugfix
  • Perf
  • Refact
  • Style
  • Doc
  • Test
  • Chore

Checklist

  • Commit message follows [Module:Type] Description format
  • Code compiles without errors
  • Tested on relevant platform(s)
  • No unrelated format or style changes included

…ckend

- Deferred dequant + pre-scaling for W2/W3 g8 GEMV
- Extend 2sg decode GEMV + fusions to W_QUANT_2/3
- Extend g16 lm_head GEMV to W_QUANT_2/3
- W_QUANT_2/3 in MetalSharedGather (tied lm_head)
- Complete W2/W3 conv1x1 support
- Vectorize W2 dequant loads, ushort W3 GEMV tiles, size-gate fused W3 GEMM
- Fix W2/3 conv1x1 misrouting on non-simdgroup-matrix GPUs
- Fix W_QUANT_2/3 decode GEMV shadowed by W4 macro alias
- Fix 2/3-bit weight disk embedding decode

Link: https://code.alibaba-inc.com/AliNN/AliNNPrivate/codereview/28994941
GitOrigin-RevId: 9eb095621ebe5f22bdb6cabb3f0e8578ce27c972
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@v0jiuqi
v0jiuqi merged commit b34a797 into master Aug 5, 2026
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants