mirror of
https://github.com/deepseek-ai/DeepGEMM.git
synced 2026-11-05 00:47:26 +00:00
[PR #348] feat: support mxfp4 × mxfp4 gemm on sm100 #382
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#382
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/348
Author: @z52527
Created: 6/1/2026
Status: 🔄 Open
Base:
nv_dev← Head:fea-fp4-synced📝 Commits (10+)
7d27b8aFP4: port MXF4 kernel + wrappers onto main's refactored APIs7c2d685FP4: progress port towards runtime — IMA fixed, smem cap, multicast clamp6539975FP4: layout override to fea-fp4 tested config + test int8 packing24eb9c2FP4: tests/test_fp4.py — use FP32 output (kernel's only working epilogue path)ae98142FP4: tests/test_fp4.py — full suite passes on synced branch (10/10)dfdc5aeFP4: port fea-fp4's full get_best_fp4_config heuristic — perf parity31aef98FP4: rewrite tests/test_fp4.py to mirror test_fp8_fp4.py style8d841f6FP4: align .cuh comments with sm100_fp8_fp4_gemm_1d1d.cuh styleae4e77dFP4: address codex review (PDL sync, strict FP32 D, prune unused fields)959e308FP4: remove .item() host sync in m-grouped contiguous swap_ab gating📊 Changes
4 files changed (+1386 additions, -9 deletions)
View changed files
📝
csrc/apis/gemm.hpp(+55 -9)➕
csrc/jit_kernels/impls/sm100_fp4_gemm_1d1d.hpp(+462 -0)➕
deep_gemm/include/deep_gemm/impls/sm100_fp4_gemm_1d1d.cuh(+735 -0)➕
tests/test_fp4.py(+134 -0)📄 Description
Adds an FP4×FP4 (MXF4) GEMM path on SM100/B200 using
SM100_MMA_MXF4_SSdirectly, separate from main's unified MXF8F6F4 kernel. Dispatched from the existing fp8_fp4 APIs (dense / m-grouped contiguous / m-grouped masked) when both operands are FP4. Tested withtests/test_fp4.pyon B200 (28/28 pass). Bench: median ~1.07× vscublasTest 13.3direct, 10/13 shapes ≥ cuBLAS.Dense GEMM perf (B200, CUDA 12.9, vs cublasTest 13.3 direct binary)
TODO
DG_HOST_ASSERTs for aliasing / K-major /k % 8but no test coverage (repo-wide gap, not FP4-only)m / num_groupsas a host estimate accurate for dense, but misses swap_ab on-1-padded sparse layouts (padding inflates the estimate aboveblock_m). Avoids a device sync onm_indices; revisit if sparse MoE perf is a bottleneck.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.