mirror of
https://github.com/deepseek-ai/DeepGEMM.git
synced 2026-11-05 00:47:26 +00:00
[PR #345] [CLOSED] Fix Mega MoE kernel shared memory calculation error #378
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#378
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/345
Author: @Oxygen56
Created: 5/31/2026
Status: ❌ Closed
Base:
main← Head:fix/issue-339📝 Commits (1)
36abc9cFix Mega MoE kernel shared memory calculation error📊 Changes
1 file changed (+1 additions, -1 deletions)
View changed files
📝
deep_gemm/include/deep_gemm/impls/sm100_fp8_fp4_mega_moe.cuh(+1 -1)📄 Description
Description
Fixes a bug in the Mega MoE kernel where
SMEM_BEFORE_BARRIER_SIZEwas missingSMEM_SFA_SIZE_PER_STAGEandSMEM_SFB_SIZE_PER_STAGEin its per-stage shared memory calculation.Root Cause
SMEM_BEFORE_BARRIER_SIZEonly accounted forSMEM_A_SIZE_PER_STAGEandSMEM_B_SIZE_PER_STAGEper stage, but the scale factor (SF) buffers (SMEM_SFA_SIZE_PER_STAGEandSMEM_SFB_SIZE_PER_STAGE) were omitted. This caused the shared memory allocation before the barrier to be too small, triggering assertion failures for larger hidden sizes (e.g., hidden=8192, num_tokens=1024).Fix
Add the missing SF size constants to the per-stage calculation:
Fixes #339
Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.