Skip to content

[GroupGemm] Fix output dimension of M*G kernel - #1045

Merged
kwen2501 merged 1 commit into
mainfrom
kernel_fix
Apr 3, 2025
Merged

kwen2501 merged 1 commit into
mainfrom
kernel_fix

Conversation

@kwen2501

@kwen2501 kwen2501 commented Apr 3, 2025 •

Copy link
Copy Markdown
Contributor

Previously the output dimension is n*G, but we want only n.
Also added alignment requirement for the grouped input, i.e. each element in m_sizes must be divisible by the alignment size.
The impl today has alignment of 64, which is a bit big. We should drive it down. (TODO @lessw2020 )

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Apr 3, 2025
@kwen2501
kwen2501 force-pushed the lessw2020/mg_group_gemm branch from 8bf3124 to 6390a9e Compare April 3, 2025 00:58
@kwen2501
kwen2501 requested a review from lessw2020 April 3, 2025 02:17

@lessw2020 lessw2020 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is really nice work!

@kwen2501
kwen2501 changed the base branch from lessw2020/mg_group_gemm to main April 3, 2025 06:28
@kwen2501
kwen2501 changed the base branch from main to lessw2020/mg_group_gemm April 3, 2025 06:28
@kwen2501
kwen2501 changed the base branch from lessw2020/mg_group_gemm to main April 3, 2025 17:06
@kwen2501
kwen2501 merged commit 52d2b14 into main Apr 3, 2025
xrsrke pushed a commit to NousResearch/torchtitan that referenced this pull request Feb 13, 2026
Previously the output dimension is `n*G`, but we want only `n`.
Also added alignment requirement for the grouped input, i.e. each
element in `m_sizes` must be divisible by the alignment size.
The impl today has alignment of 64, which is a bit big. We should drive
it down. (TODO @lessw2020 )
xrsrke pushed a commit to NousResearch/torchtitan that referenced this pull request Feb 25, 2026
Previously the output dimension is `n*G`, but we want only `n`.
Also added alignment requirement for the grouped input, i.e. each
element in `m_sizes` must be divisible by the alignment size.
The impl today has alignment of 64, which is a bit big. We should drive
it down. (TODO @lessw2020 )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants