mirror of
https://github.com/deepseek-ai/DeepGEMM.git
synced 2026-11-05 00:47:26 +00:00
[PR #371] Add W8A8 (FP8xFP8) Mega MoE support #395
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#395
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/371
Author: @xuzhiyuan1
Created: 7/3/2026
Status: 🔄 Open
Base:
main← Head:w8a8-megamoe📝 Commits (2)
f53e0b2Add W8A8 (FP8xFP8) Mega MoE support7bc58b9Support unaligned intermediate hidden sizes📊 Changes
7 files changed (+1785 additions, -11 deletions)
View changed files
📝
csrc/apis/mega.hpp(+104 -2)➕
csrc/jit_kernels/impls/sm100_fp8_fp8_mega_moe.hpp(+234 -0)📝
deep_gemm/__init__.py(+1 -0)📝
deep_gemm/include/deep_gemm/impls/sm100_fp8_fp4_mega_moe.cuh(+2 -2)➕
deep_gemm/include/deep_gemm/impls/sm100_fp8_fp8_mega_moe.cuh(+1397 -0)📝
deep_gemm/mega/__init__.py(+24 -0)📝
tests/test_mega_moe.py(+23 -7)📄 Description
Motivation
Add W8A8 (FP8 activations x FP8 weights) support to Mega MoE, and relax the requirement that hidden / intermediate hidden sizes must be multiples of 512.
Changes
sm100_fp8_fp8_mega_moe.cuh) along with its JIT wrapper and host/Python API (fp8_fp8_mega_moe); extendtests/test_mega_moe.pywith--mma-type fp8xfp8;"fp8xfp4"(happy to introduce a dedicatedMmaKind::MXFP8FP8if preferred);Why relaxing the 512 alignment is safe
layout::Dataasserts its byte count is 16B-aligned (the minimum TMA transfer alignment). The activation SF takeshidden / 32(L1 input) orintermediate_hidden / 32(L2 input) bytes per token, so both sizes end up being required to be multiples of 32 x 16 = 512;require_tma_alignment=falseat the 3 accounting sites, with no behavioral change for shapes that are already 512-aligned.Testing
Both configurations produce bitwise-identical outputs against the non-overlapped baseline.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.