mirror of
https://github.com/deepseek-ai/DeepGEMM.git
synced 2026-11-05 00:47:26 +00:00
[GH-ISSUE #150] Potential bug in get_num_blocks calculation for specific grouped GEMM types #87
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#87
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 @jing-4369 on GitHub (Aug 2, 2025).
Original GitHub issue: https://github.com/deepseek-ai/DeepGEMM/issues/150
Bug Description
在 csrc/jit_kernels/heuristics/common.hpp 的 get_best_config 函数中,计算总线程块数量的逻辑 get_num_blocks 似乎没有正确处理所有grouped GEMM 类型。
get_num_blocks 的实现为:
ceil_div(m, block_m) * ceil_div(n, block_n) * num_groups;
Problem
这种不一致的处理方式可能导致在 MGroupedContiguous 场景下启动过多的线程块,造成资源浪费。
不知道我的理解是否正确,期待您的解答!
@LyricZhao commented on GitHub (Aug 4, 2025):
你说的对,我们最近会修掉这个问题;这个倒不会多启动 block 数量,只是选出来的 block size 可能会不太好。谢谢指出!