mirror of
https://github.com/deepseek-ai/DeepGEMM.git
synced 2026-11-05 00:47:26 +00:00
[PR #324] [MERGED] feat: add sm120 support for DeepGEMM #366
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#366
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/324
Author: @leavelet
Created: 5/1/2026
Status: ✅ Merged
Merged: 6/24/2026
Merged by: @RayWang96
Base:
nv_dev← Head:sm120📝 Commits (10+)
373f073Add SM120a (RTX PRO 6000) dense FP8 GEMM support6d8c50eAdd SM120a dense FP4 GEMM support and consolidate kernel to warp-spec only18553d2Add SM120a K-grouped contiguous FP8 GEMM and use custom MMA wrappers8726331Add SM120a Einsum (batched GEMM), M-grouped BF16, and HC prenorm TF32c8a545eAdd SM120a FP8 MQA logits (dense + paged) for attentionc346b33feat: bf16 mn gemmd0a56e3Add SM120a skip_head_mid, MN-major B for M-grouped, and FP8 stride_d fixc5d92cdOptimize MN-major B with ldmatrix.trans.x2, replacing 4 scalar loads05d2818Enable BLOCK_N=128 for MN-major B via multi-atom ldmatrix.trans9996cebAdd SM120a Einsum: BF16 bmk,bnk->mn kernel, FP8 bhd,hdr->bhr and bhd,bhr->hdr📊 Changes
38 files changed (+6934 additions, -161 deletions)
View changed files
📝
csrc/apis/attention.hpp(+20 -7)📝
csrc/apis/einsum.hpp(+65 -11)📝
csrc/apis/gemm.hpp(+156 -23)📝
csrc/apis/hyperconnection.hpp(+4 -1)📝
csrc/apis/layout.hpp(+20 -12)📝
csrc/jit/compiler.hpp(+11 -4)📝
csrc/jit/device_runtime.hpp(+17 -2)📝
csrc/jit_kernels/heuristics/config.hpp(+10 -1)📝
csrc/jit_kernels/heuristics/runtime.hpp(+23 -6)➕
csrc/jit_kernels/heuristics/sm120.hpp(+333 -0)📝
csrc/jit_kernels/impls/runtime_utils.hpp(+6 -4)➕
csrc/jit_kernels/impls/sm120_bf16_gemm.hpp(+494 -0)➕
csrc/jit_kernels/impls/sm120_bmk_bnk_mn.hpp(+130 -0)➕
csrc/jit_kernels/impls/sm120_fp8_fp4_gemm_1d1d.hpp(+682 -0)➕
csrc/jit_kernels/impls/sm120_tf32_hc_prenorm_gemm.hpp(+126 -0)📝
csrc/jit_kernels/impls/smxx_fp8_fp4_mqa_logits.hpp(+194 -8)📝
csrc/jit_kernels/impls/smxx_fp8_fp4_paged_mqa_logits.hpp(+213 -9)📝
csrc/jit_kernels/impls/smxx_layout.hpp(+3 -1)📝
csrc/utils/layout.hpp(+3 -3)📝
csrc/utils/math.hpp(+28 -0)...and 18 more files
📄 Description
This PR adds first-class
sm_120support to DeepGEMM, maintained on thenv_devbranch by the NVIDIA DevTech APAC team. It brings the full DeepGEMM kernel surface — dense, grouped/MoE, einsum, hyper-connection, and MQA-logits — to the sm120 and sm121 devices like RTX Pro 6000 and DGX Spark.co-authored with @lucifer1004.
Feature surface
Dense GEMM (
sm120_fp8_fp4_gemm_1d1d,sm120_bf16_gemm)mxf4nvf4, gran_k=32)mxf8f6f4 .e4m3.e2m1) and FP4_A × FP8_B(
.e2m1.e4m3) — both directionsGrouped GEMM / MoE
Batched GEMM / Einsum (
sm120_bmk_bnk_mn)bhr,hdr->bhd) and MN-major B (bhd,hdr->bhr)bmk,bnk->mn); FP8 / BF16; small-M AB-swapHC Prenorm (
sm120_tf32_hc_prenorm_gemm)**MQA Logits ** (
sm120_fp8_mqa_logits,sm120_fp4_mqa_logits+ paged)paged (next_n / kPadOddN support)
Performance (RTX PRO 6000 Blackwell, single GPU,
tests/test_*.py)Roofline used: FP8 ≈ 814 TFLOPS, FP4 ≈ 1628 TFLOPS (2× FP8), BF16 ≈ 445 TFLOPS. GB/s is effective bandwidth (cache-inclusive for small/cached shapes).
Dense GEMM
Grouped GEMM (MoE)
Einsum
Peak 742 TFLOPS (
b=8192,h=8,r=4096,d=1024); up to 2893 GB/s (small-batch, cache-bound); Split-S path scales down for small problems.HC Prenorm
m=8192, n=24, k=28672, splits=16: 29 TFLOPS / 1248 GB/s (bandwidth-bound).MQA Logits
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.