mirror of
https://github.com/deepseek-ai/DeepGEMM.git
synced 2026-11-05 00:47:26 +00:00
[PR #103] [MERGED] Grouped GEMM skip useless computation for unaligned Ms #249
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#249
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?
📋 Pull Request Information
Original PR: https://github.com/deepseek-ai/DeepGEMM/pull/103
Author: @yukuai26
Created: 5/20/2025
Status: ✅ Merged
Merged: 5/27/2025
Merged by: @LyricZhao
Base:
main← Head:remove-useless-computation📝 Commits (10+)
ccca476Grouped GEMM skip useless computation for unaligned Msdb1f0b5Update readme.mddc89674small typoe7e38edRename variables2c5ab83Restore previous indentc4e31d1Format1169f83Refactor testsa5373e4AddSkipComputationtypes81f906eBug fixed81de208Format📊 Changes
5 files changed (+106 additions, -93 deletions)
View changed files
📝
README.md(+1 -1)📝
deep_gemm/include/deep_gemm/fp8_gemm.cuh(+44 -39)📝
deep_gemm/include/deep_gemm/scheduler.cuh(+14 -3)📝
deep_gemm/jit/compiler.py(+1 -1)📝
tests/test_core.py(+46 -49)📄 Description
Skip useless computation on M and reconstruct test_m_grouped_gemm_contiguous and test_m_grouped_gemm_masked'.
In test_m_grouped_gemm_contiguous, there is a speedup of 0-15 TFLOPS (Due to the larger expected_m_per_group, the speedup effect is not very significant).
In test_m_grouped_gemm_masked, there is a speedup of 10-20 TFLOPS.
For GEMM, incorporating this optimization may affect the efficiency of certain shapes. I tested with m = 4160 and observed some speedup, but when m = 4096, there is a 10-20 TFLOPS reduction in efficiency.
This scenario can be specifically optimized by adding a template parameter to check whether m is a multiple of block_m. However, since GEMM is not the current optimization focus, I have not implemented this enhancement yet.Instead, we have directly disabled this optimization and are currently not making changes to GEMM's efficiency.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.