mirror of
https://github.com/deepseek-ai/DeepGEMM.git
synced 2026-11-05 00:47:26 +00:00
[PR #458] [CLOSED] Merge main (Public Release 26/09) into nv_dev, with sparse MQA-logits integration fixes #465
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#465
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/458
Author: @lfr-0531
Created: 9/23/2026
Status: ❌ Closed
Base:
nv_dev← Head:pr/nv-dev-merge-main-2609📝 Commits (6)
66081d4Public Release 26/09 (#432)78b6900Fix Mega MoE task info slot release ordering (#441)0274ad7Merge upstream main (Public Release 26/09 #432, #441) into nv_dev1364fedReuse a warmed sparse MQA logits workspace during graph capture7a85767Return a typed map from get_bf16_mega_gate_configd0a7e77Accept 16-byte aligned KV pages in the paged sparse MQA logits📊 Changes
141 files changed (+13002 additions, -6247 deletions)
View changed files
📝
.gitmodules(+3 -3)📝
CMakeLists.txt(+4 -2)📝
README.md(+20 -22)📝
csrc/apis/attention.hpp(+262 -45)📝
csrc/apis/config.hpp(+17 -21)📝
csrc/apis/einsum.hpp(+88 -43)📝
csrc/apis/gemm.hpp(+242 -67)📝
csrc/apis/hyperconnection.hpp(+1 -7)📝
csrc/apis/layout.hpp(+6 -15)➕
csrc/apis/mega_gate.hpp(+238 -0)➕
csrc/apis/mega_mhc.hpp(+287 -0)📝
csrc/apis/mega_moe.hpp(+13 -16)📝
csrc/apis/sm90_mega.hpp(+5 -9)📝
csrc/indexing/main.cu(+1 -0)➖
csrc/jit/cache.hpp(+0 -31)➖
csrc/jit/compiler.hpp(+0 -369)➖
csrc/jit/device_runtime.hpp(+0 -153)➖
csrc/jit/handle.hpp(+0 -222)➖
csrc/jit/include_parser.hpp(+0 -80)➖
csrc/jit/kernel_runtime.hpp(+0 -165)...and 80 more files
📄 Description
Summary
Bring
nv_devonto the DeepJIT-based runtime of the 26/09 public release (main78b6900= #432 + #441) while keeping everynv_devfeature, plus three follow-up fixes found while integrating the sparse MQA-logits kernels into TensorRT-LLM.Merge of
main(26/09) intonv_devPolicy of the merge:
main's structure is the base and everynv_devfeature is re-applied on top of it.Now on this branch from
main:csrc/jit/*andfmt(jit->compile/jit->launch, C++20,std::format); CUDA >= 12.9fp8_fp4_sparse_mqa_logits,fp8_fp4_paged_sparse_mqa_logitsand their metadata builders)MegaMoESignalsworkspace, L2 readiness mask, GEMM alpha / deterministic paths, scheduled MQA metadatanv_devfeatures re-applied on the new runtime:MmaKind::NVFP4kept next to upstream'sMmaKind::MXF4; bit-based buffer layout; legacyl2_full_countsignal for the count protocol)smxx_clean_logitskept for the kernels that do not fuse cleaning (SM120 and FP16-weights paths)DG_JIT_BARRIER_TIMEOUT_SECONDSFollow-up fixes
get_sparse_mqa_logits_workspace: frameworks capture CUDA graphs on a dedicated side stream but replay on the launching stream, so the first sparse-logits call on the capture stream used to trip the pre-capture assertion. While capturing, reuse a workspace already warmed up on the device.get_bf16_mega_gate_config: returnstd::map<std::string, int>instead ofpy::dictso generated Python stubs aredict[str, int](strict type checkers reject a baredict); the Python-side result is unchanged.cp.asyncchunks, so page-footer caches that are not padded to 512 bytes (for example 64 x (64 + 4) = 4352-byte pages) can be read in place.Validation
GB300 (NGC PyTorch 26.08, CUDA 13.4), standalone test suites:
test_attention(contiguous MQA logits full, paged sampled cases, sparse MQA logits 161/161 bitwise vs dense),test_fp8_fp4,test_bf16,test_einsum,test_layout,test_hyperconnection,test_mega_moe(4 ranks),test_nvfp4_mega_moe,test_mega_moe_situ. SM90 and SM120 paths compile but were not run.test_mega_gate/test_mega_mhcneedtilelang, which was not available in that environment.The branch is consumed by TensorRT-LLM's DeepSeek-V4.1 bring-up (CSA2 indexer using the sparse MQA-logits kernels for the candidate-consuming layers), where the DeepGEMM-side changes above were exercised end to end (unit suite, GSM8K, long-context throughput on GB300).
Note on DeepJIT
third-party/deep_jitstays at upstream e5bdee2. Itsutils/exception.hppincludes<elfutils/libdwfl.h>for declarations only (libdw isdlopened at runtime), so build hosts need the elfutils development headers; making that include optional (__has_includewith a symbol-only backtrace fallback) is proposed separately to DeepJIT.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.