mirror of
https://github.com/deepseek-ai/DeepGEMM.git
synced 2026-11-05 00:47:26 +00:00
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#371
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/328
Author: @Barry-Delaney
Created: 5/7/2026
Status: ✅ Merged
Merged: 5/8/2026
Merged by: @RayWang96
Base:
nv_dev← Head:user/jinshik/nv_dev_316📝 Commits (2)
891d57bAdd various optimizations and Mega MoE benchmarks (#316)5201957Merge upstream commit891d57b(#316: Add various optimizations and Mega MoE benchmarks) into nv_dev📊 Changes
21 files changed (+1302 additions, -381 deletions)
View changed files
📝
README.md(+29 -29)📝
csrc/apis/attention.hpp(+54 -21)📝
csrc/apis/mega.hpp(+37 -18)📝
csrc/jit_kernels/heuristics/mega_moe.hpp(+52 -23)📝
csrc/jit_kernels/impls/sm100_fp8_fp4_mega_moe.hpp(+11 -1)📝
csrc/jit_kernels/impls/smxx_fp8_fp4_paged_mqa_logits.hpp(+41 -21)📝
deep_gemm/__init__.py(+1 -1)📝
deep_gemm/include/deep_gemm/comm/barrier.cuh(+9 -0)📝
deep_gemm/include/deep_gemm/impls/sm100_fp4_mqa_logits.cuh(+2 -1)📝
deep_gemm/include/deep_gemm/impls/sm100_fp4_paged_mqa_logits.cuh(+72 -58)📝
deep_gemm/include/deep_gemm/impls/sm100_fp8_fp4_mega_moe.cuh(+45 -29)📝
deep_gemm/include/deep_gemm/impls/sm100_fp8_paged_mqa_logits.cuh(+69 -44)📝
deep_gemm/include/deep_gemm/impls/sm90_fp8_paged_mqa_logits.cuh(+8 -5)📝
deep_gemm/include/deep_gemm/layout/mega_moe.cuh(+15 -10)📝
deep_gemm/include/deep_gemm/ptx/ld_st.cuh(+6 -2)📝
deep_gemm/include/deep_gemm/scheduler/paged_mqa_logits.cuh(+155 -27)📝
deep_gemm/mega/__init__.py(+4 -4)➕
scripts/quick_plot_pm.py(+448 -0)➕
scripts/run_ncu_mega_moe.sh(+89 -0)📝
tests/test_attention.py(+58 -21)...and 1 more files
📄 Description
Summary
Cherry-picks upstream
891d57b(deepseek-ai PR #316: "Add various optimizations and Mega MoE benchmarks") ontonv_dev(currently atc491439, the merge of PR #314).Conflicts resolved against the NV-side commits from PR #314 (
f6d98f2,12cb7c0,a97b74d):deep_gemm/include/deep_gemm/scheduler/paged_mqa_logits.cuh— keep NV's host-passednum_next_n_atomsruntime parameter, plus 891d57b'skIsVarlentemplate + binary-search SM work distribution + varlen path.deep_gemm/include/deep_gemm/impls/sm90_fp8_paged_mqa_logits.cuh— keep NV'skNumKVMulticasttemplate + cluster multicast logic; add 891d57b'skIsVarlentemplate parameter withstatic_assert(!kIsVarlen)(SM90 doesn't support varlen).csrc/jit_kernels/impls/smxx_fp8_fp4_paged_mqa_logits.hpp— unified Args struct (num_next_n_atoms+is_varlen+indices); SM90 instantiation passesis_varlen=falseexplicitly; SM100 TMA-box rule uses 891d57b's(is_varlen or next_n >= 2) ? 2 : 1.csrc/apis/attention.hpp— host computesnum_next_n_atomsto match the post-#316 SM100 kernel (kNextNAtom = (is_varlen or next_n >= 2) ? 2 : 1,kNumNextNAtoms = ceil_div(next_n, kNextNAtom)); SM90 multicast hard-codesnum_next_n_atoms = 1. Without this fixnext_n=5over-schedules by 5/3 and triggers IMA.tests/test_attention.py— keep NV'sblock_kv ∈ {32, 64}andnext_n=4for SM90 multicast; add 891d57b's outeris_varlenloop (varlen is SM100-only).Test plan
Validated on B300 SXM6 (sm103,
arch_major == 10, 8-GPU) and H200 NVL (sm90,arch_major == 9, 1-GPU).🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.