Add SM120 support - #738
Open
Snowfall99 wants to merge 1 commit into
Open
Snowfall99 wants to merge 1 commit into
Snowfall99 wants to merge 1 commit into
Conversation
Adds an SM120 path so MPK runs on consumer/workstation Blackwell: - runtime_header.h: explicit MPK_TARGET_CC == 120 rung (99KB smem) ahead of the >= 90 check in both shared-memory ladders (SM120 only has ~99KB usable per block vs datacenter Hopper/Blackwell's ~207-220KB; the old over-request into the >=90 bucket caused scheduler hangs). - hopper/utils.cuh: wg_sync emits portable bar.sync PTX for SM120 instead of the brkpt trap. - persistent_kernel.py: rmsnorm_layer bounds the Hopper kernel to 90 <= cc < 120; linear_layer/linear_with_residual_layer route SM120 to the ampere task set (no TMA/WGMMA). Verified on real RTX Pro 6000 (cc120) hardware. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Author
|
@xinhaoc Would you mind reviewing this when you have a chance? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an SM120 path so MPK runs on consumer/workstation Blackwell (e.g. RTX Pro 6000, cc120). Previously MPK had no SM120 support:
linear_layer/linear_with_residual_layerhitassert False, "Unsupported compute capability: 120".>= 90(Hopper/datacenter-Blackwell) bucket and requested ~207–220KB of dynamic smem, but SM120 only has ~99KB usable per block. This over-request is the root cause of the persistent-kernel scheduler hangs seen on this hardware.Changes
runtime_header.h: add an explicitMPK_TARGET_CC == 120rung (99KB) ahead of the>= 90check in both shared-memory ladders.hopper/utils.cuh:wg_syncnow emits portablebar.syncPTX for SM120 instead of falling through to thebrkpttrap.persistent_kernel.py:rmsnorm_layerbounds the Hopper kernel dispatch to90 <= cc < 120(previously anycc >= 90incorrectly picked the Hopper-specific TMA/WGMMA kernel);linear_layer/linear_with_residual_layerroute SM120 to the ampere task set (no TMA/WGMMA required there).All SM120 gates use exact
== 120rather than>= 120, so a future higher compute capability still falls through to the loudassert False/ correct datacenter rung instead of silently reusing the SM120-specific path.Test results
Verified on real RTX Pro 6000 (Blackwell Workstation, cc120) hardware. Both tests previously failed/hung on this GPU. Compiled with
-DMPK_TARGET_CC=120; the megakernel now requestssmem size: 98304(96KB, under the ~99KB limit — the fix that resolves the hang).test_diamond_fork_join_testmode.pytest_qwen3_mlp_testmode.py(three stages, bf16 tolerance)Out of scope
No ampere/generic fallback kernel exists to route these to (would need new kernel work): MoE layers, FP8 group GEMM, split-KV attention — all Hopper/datacenter-Blackwell-only today.