mirror of
https://github.com/deepseek-ai/DeepGEMM.git
synced 2026-11-05 00:47:26 +00:00
[GH-ISSUE #236] Feature Request: Support sm_120 ( 5090 and blackwell 6000 pro ) #134
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#134
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?
Originally created by @createthis on GitHub (Dec 1, 2025).
Original GitHub issue: https://github.com/deepseek-ai/DeepGEMM/issues/236
I can run the following successfully with my blackwell 6000 pro:
This works too:
However, when I try to run a custom kernel benchmarking script:
bench_fp8_paged_mqa_logits.py
... first it fails with
Unsupported architecture, then if I addarch_major == 12it fails with this:
Please support
sm120. I'd love to add support myself, but I'm no kernel wizard.@createthis commented on GitHub (Dec 2, 2025):
Looks like one big difference is that the sm100 kernel expects 168004 ( 168k ) smem_size and sm120 only has 49152 ( 49k ) available.
@createthis commented on GitHub (Dec 2, 2025):
I was able to get the shared memory usage down to 46k: https://github.com/createthis/DeepGEMM/pull/1
But now it fails with
Illegal barrier arrive operation.@lavdnone2 commented on GitHub (Dec 3, 2025):
thanks man
I think they just don't have RTX PRO 6000
but next gen cards will all be SM120+ is seems
@createthis commented on GitHub (Dec 4, 2025):
I bought two cuda programming books, for what it’s worth. My background is in web dev and linux, so I have no illusions that I can fix this quickly or easily, but I’m going to try to at least learn as I go.
@lavdnone2 commented on GitHub (Dec 4, 2025):
have no time now, but can give you access to full Kimi-K2 - it knows cuda and writes best code so far; or minimax-m2 - somewhat cleaner
@createthis commented on GitHub (Dec 4, 2025):
This repo is strange. It looks like the sparse kernels are only sm90 and sm100, just like DeepGEMM. There is a dense kernel for sm120... but... we need sparse kernels. Odd. Also, since this is FlashMLA, I don't think this repo even has an FP8 lightning indexer kernel. This is intended to cover other parts of the DSA system.
@LyricZhao commented on GitHub (Dec 5, 2025):
Sorry, as we don't have SM120 devices, we don't have plans or people to support this. From my perspective, adding a new architecture support is hard for us to maintain, e.g. the GEMM heuristics are hard to cover all archs. So we encourage the OSS community makes a fork and supports it. The main repo is always using the computation center GPUs.
@cyysky commented on GitHub (Dec 8, 2025):
https://github.com/NVIDIA/TensorRT-LLM/tree/main/cpp/tensorrt_llm/kernels/cutlass_kernels/fp8_blockscale_gemm/6kd_blockwise_gemm
not sure if this help?
@IISuperluminaLII commented on GitHub (Dec 12, 2025):
actually it has 99kb, which is not much still. Writing an agnostic kernel that is tile/quantization/fallback aware based on sm version should be "doable". It will take weeks to months, but should be doable. Will there be much gained from it performance wise, probably not
without TMEM, you will need to move all TMEM ops to SMEM only
CUTLASS currently just fallsback to sm_80 tcgen03 alloc
without UMMA its hard to convert native TMEM ops. you WILL need to use sm_80 fallback
tcgen05 F8/F6/F4 (narrow precision) YES (sm_120 tcgen05 with quantization overhead)
tcgen05 BF16/F16 via UMMA NO (sm_80 fallback, but with bf16 and fp16 accel)
@grimulkan commented on GitHub (Dec 12, 2025):
Even an implementation that falls back to sm89 style instructions where it needs to will be extremely useful IMO. Right now a lot doesn't work in sm120, including fp8 cases that work under sm89.
@createthis commented on GitHub (Dec 13, 2025):
Yeah... is that documented anywhere? I've seen that number too at a different time.
@grimulkan I'm pretty sure fp8 works under sm120a.
I considered briefly trying to write a tcgen05 emulation library, but that's probably just silly.
@grimulkan commented on GitHub (Dec 13, 2025):
Dense, yes. Does it work for grouped/moe/sparse gemms? If so, can you suggest where I can find the implementation? Right now in vllm or trtllm that's a missing piece I think.
@createthis commented on GitHub (Dec 13, 2025):
I just mean as an instruction. I’m pretty sure sm_120a supports fp8. I’m not sure what dense or sparse has to do with whether or not the sm_120a target supports fp8.
@grimulkan commented on GitHub (Dec 13, 2025):
@createthis Oh yes, it does. I meant whether actual kernels exist for various operations in fp8 that work on sm120 GPUs to do inference on a model like Deepseek v3.1 or v3.2 in fp8, like the block-scaled gemms for the MoE section. Right now, those engines error out claiming there are missing kernels (for fp8 precision). I guess I must have said something confusing, because I thought this was your interest too! Sorry.
EDIT: Looking at it, cutlass does have some examples, but I'm referring to something like example 92 for sm120:
https://github.com/NVIDIA/cutlass/tree/main/examples/92_blackwell_moe_gemm/
Sorry if it wasn't clear.
@IISuperluminaLII commented on GitHub (Dec 15, 2025):
Not necessarily, I think writing a base tcgen0x version and then referencing that for any new arch that uses antiquated/deprecated calls for new gen cards which should work in theory. 🤔
@Tonoken3 commented on GitHub (Apr 24, 2026):
Adding a concrete data point from today's DeepSeek-V4-Flash release (2026-04-24):
SM120 is completely blocked on V4-family models due to the mHC (Manifold-Constrained Hyper-Connections) layer calling
tf32_hc_prenorm_gemm, which only has SM90 and SM100 implementations in the current DeepGEMM tree.Hardware
vllm/vllm-openai:deepseekv4-cu130(vllm 0.1.dev15830)Exact failure
The pre-mHC path works fine (NCCL with
NCCL_P2P_DISABLE=1, FP8 weight loading,V4 quantization config, MoE backend dispatch, attention backend). 149 GB of
FP8 weights load cleanly, then the assertion fires when mHC initializes.
Kernel availability
Looking at
deep_gemm/include/deep_gemm/impls/:sm100_tf32_hc_prenorm_gemm.cuh— uses TMEM,tcgen05.mma, cluster multicast → SM100 onlysm90_tf32_hc_prenorm_gemm.cuh— uses WGMMA → SM90 onlysm120_*variant existsWhy existing SM80-level MMA path should work
SM120 natively supports warp-level
mma.sync.aligned.m16n8k32(SM80-era) plusTMA (SM90-era). A naive port using:
...would be functionally correct for the
tf32_hc_prenorm_gemmprimitive(one GEMM + one squared-sum). Not optimal for throughput, but unblocks the
entire V4 family on workstation Blackwell GPUs.
Workarounds tried (none worked)
Python-level
_tf32_hc_prenorm_gemm_imploverride with a PyTorch fallback→ Installed but assertion still fires (separate C++ call path)
torch.cuda.get_device_capabilityspoof to (10, 0)→ Bypasses assertion, then fails with:
CUDA driver error: no kernel image is available for execution on the device(SM100 cubin cannot execute on SM120)
All documented env vars (
VLLM_USE_DEEP_GEMM=0, etc.)→ Only affects the general FP8 GEMM path, not mHC.
Ask
A minimal SM120 implementation of
tf32_hc_prenorm_gemm(even a slow one)would unblock the entire RTX 5090 / RTX PRO 6000 user base on V4-Flash / V4-Pro.
Happy to help test any proposed fix.
Full technical report:
https://github.com/lna-lab/blackwell-geforce-nvfp4-gemm/blob/main/DEEPSEEK_V4_SM120_REPORT.md
— TonoKen3 / Lna-Lab
@Tonoken3 commented on GitHub (Apr 24, 2026):
One additional data point from the official vLLM blog on V4:
If mHC is indeed a "simpler model change that's easy to adapt," then an SM120 port of
tf32_hc_prenorm_gemmshould be within reach. The currentsm100_tf32_hc_prenorm_gemm.cuhhard-codes TMEM/UMMA features that SM120 doesn't have, andsm90_tf32_hc_prenorm_gemm.cuhrequires WGMMA — but the underlying math (one GEMM + one squared-sum) doesn't require either. A warp-levelmma.syncversion (SM80-style, which SM120 supports) should suffice.Would the DeepGEMM team consider:
.cuhthat prioritizes correctness over peak throughput?Either would unblock every RTX 5090 / RTX PRO 6000 user on V4-family models.
— TonoKen3 / Lna-Lab
@ergodic-flow commented on GitHub (Apr 24, 2026):
I'm no CUDA wizard but I will take a look and see if I can hack up a barely working version 💪 .
EDIT: not yet correct but runs! https://github.com/deepseek-ai/DeepGEMM/compare/main...ergodic-flow:DeepGEMM:feature/sm120-support-v0?expand=1
@ergodic-flow commented on GitHub (Apr 25, 2026):
ok after working on this for quite some hours, it's probably not a simple CUDA translation, though much of it is a "boilerplate" change. I also discovered https://github.com/ShlokVFX/Mini-Attention/ which has similar code which could be adapted. I am going to go read some docs on SM120, as there are a lot of differences between SM90 and SM100.
@tonyliu312 commented on GitHub (Apr 28, 2026):
Cross-link from a different angle that may help triage this:
jasl/DeepGEMMfork branchds4-sm120already lands a native SM 12.0/12.1 implementation oftf32_hc_prenorm_gemm(the V4 mHC kernel that hitshyperconnection.hpp:56 Unsupported architectureon stock DG). Hardware-verified on dual DGX Spark (GB10, SM 12.1) — direct probe gaveerr_d=0.06(bf16 normal) andrel_err_sqsum=7.3e-7against PyTorch reference. The fork is the kernel half of vllm-project/vllm#40991; that PR has been validated end-to-end on dual-GB10 (V4-Flash, TP=2, fp8) so the kernel is in active production use, not just compiles.Question for the room: is jasl planning to upstream the SM12x kernel as a DeepGEMM PR, or is the plan to keep it fork-only? If upstream is the goal, happy to help with regression validation on GB10 SM 12.1 silicon, cross-arch review (sm_90/100/120), and the porting work to bring the fork commit cleanly onto current
main. Don't want to duplicate effort if jasl has it queued.The
ergodic-flowWIP fork mentioned earlier in this issue ("runs but not yet correct") would also benefit from the jasl reference being upstreamed, since the math is independently verified.Cc @jasl in case there's an intent signal you can share.
@jasl commented on GitHub (Apr 28, 2026):
We're trying to contact DeepSeek
@ergodic-flow commented on GitHub (Apr 28, 2026):
@tonyliu312 my intent with the change I made, was to introduce a small change that is reviewable by the maintainers, rather than get it all working end to end. Personally, I think it needs some work to get it "production quality" but it does run and pass the tests. I think anyone is welcome to use the working fork of VLLM, and I am actually gonna try it out today. I also think we should wait for feedback from maintainers and see what they say about the changes. Forks can always remain forks, but upstreaming changes has to make it past review.
@ergodic-flow commented on GitHub (Apr 28, 2026):
ah and it seems: https://github.com/deepseek-ai/DeepGEMM/issues/236#issuecomment-3615905328
I don't know if they still feel this way but:
@jasl commented on GitHub (Apr 28, 2026):
I'm doing plan b: implement essential kernels on the vLLM side.
@scr00ge-00 commented on GitHub (Apr 29, 2026):
Hitting this on NVIDIA DGX Spark (GB10, sm_121) with vLLM nightly 0.20.1rc1.dev16+g7a1eb8ac2 (FROM
vllm/vllm-openai:nightly-aarch64) trying to serve DeepSeek-V4-Flash.Stack:
vllm/third_party/deep_gemmFailure path:
csrc/apis/hyperconnection.hpp:56:arch_major == 9(Hopper) andarch_major == 10(datacenter Blackwell). GB10 returns 12 →DG_HOST_UNREACHABLE("Unsupported architecture").Tested workarounds (all fail at the same dispatch):
DG_JIT_USE_NVRTC=0+DG_JIT_NVCC_COMPILER=/usr/local/cuda/bin/nvcc+VLLM_USE_FLASHINFER_MOE_FP8=1+VLLM_MARLIN_USE_ATOMIC_ADD=1/usr/local/cuda/include/cuda → cccl/cuda(CUDA 13 header layout)--max-model-len 16384(per other GB10 forum reports)--enforce-eager,--kv-cache-dtype fp8The dispatch fires before any kernel call so JIT compiler choice and
TORCH_CUDA_ARCH_LISTchanges can't bypass it. Looks like sm_120/121 needs new kernel source (e.g.,sm120_tf32_hc_prenorm_gemmusing mma.sync rather than tcgen05/WGMMA), not a build flag fix.Use case: multi-agent inference cluster (reasoning + tool calls). Currently routing V4 Flash needs through OpenRouter as fallback while waiting on a kernel.
Happy to test patches when something lands. +1 to anyone willing to write the sm_120 variant.
@lucifer1004 commented on GitHub (Sep 16, 2026):
SM120 support is proposed in #447 (target:
nv_dev): it integrates native SM120 kernels on top of the current main APIs / DeepJIT runtime — dense and grouped BF16/FP8/FP4 (incl. mixed FP8×FP4) GEMM, BF16/FP8 einsum, HC prenorm, and dense/paged/sparse (DSv4.1-style) FP8 + MXFP4 MQA logits.Validation on sm_120a: 741 SM120 tests, with memcheck and racecheck subsets clean. Spot-verified on GB10 (sm_121a) as well. The SM120 device headers are maintained as a single source of truth in lucifer1004/DeepGEMM-sm120 and vendored byte-for-byte into the fork, so fixes propagate.
Note the PR targets
nv_dev, notmain; SM120 MegaMoE / Mega Gate / Mega mHC are not included.