mirror of
https://github.com/deepseek-ai/DeepGEMM.git
synced 2026-11-05 00:47:26 +00:00
[GH-ISSUE #93] Handling k-Dimension Divisibility in Backward Matrix Multiplication for kv_a_proj_with_mqa (din=7168, dout=576) #53
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
deepseek-ai/DeepGEMM#53
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @HIT-cwh on GitHub (May 6, 2025).
Original GitHub issue: https://github.com/deepseek-ai/DeepGEMM/issues/93
In the attn part of dsv3, there is a linear module with a shape of
din = 7168anddout = 576. When calculating dx in the backward pass, the matrix multiplication involves shapes like(seq_len, 576) @ (576, 7168). However, DeepGEMM imposes a restriction on the k dimension, requiring it to be divisible by 128 (reference: DeepGEMM gemm.py#L192).I’d like to ask whether padding is necessary for the matrix multiplication to meet this requirement.
@LyricZhao commented on GitHub (May 7, 2025):
Our internal impl supports these shapes, will push later @zheanxu
@HIT-cwh commented on GitHub (May 7, 2025):
Thanks a lot!
@LyricZhao commented on GitHub (May 14, 2025):
See #95, will merge it today.