Repository navigation
Conversation
The pinned cutlass has no SM107 entries in its arch lists, so a sm_107a build compiles but loses the SM100 MMA/TMA paths, setmaxnreg register reconfiguration and PDL. Patch the three headers (arch/config.h, arch/reg_reconfig.h, arch/grid_dependency_control.h) and add the sm_107a gencode when nvcc supports compute_107. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Collaborator
Author
|
Related: #45884 (sglang |
This was referenced Oct 22, 2026
CUTLASS v4.8.0+ supports SM107 natively (arch/config.h SM107A/F, reg_reconfig.h, grid_dependency_control.h, struct Sm107) and already carries the SM103 defines, so drop both header patches. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Collaborator
Author
|
Status update: this PR is on hold, and its current branch does not build.
Plan: once FlashMLA#20 lands in a released |
zcnrex
marked this pull request as ready for review
October 22, 2026 21:06
zcnrex
requested review from
BBuf,
FlamingoPg,
HaiShaw,
ispobock,
merrymercy and
yizhang2077
as code owners
October 22, 2026 21:06
Collaborator
Author
|
Closing: this is superseded.
|
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.
Motivation
On CC 10.7 devices,
flashmla_opsruns thesm_100ffamily binary. Nativesm_107acodegen is faster for the FlashMLA kernels DeepSeek-V4.1 uses (fusedcore_attndecode/prefill), measured with per-kernel profiles of a serving run. Numbers are available on request.The pinned CUTLASS (147f567) lists no SM107, so an
sm_107abuild compiles but silently loses features. This happens in three headers:arch/config.h: the SM100A/F MMA and TMA enablesarch/reg_reconfig.h:CUDA_CTA_RECONFIG_ACTIVATED, sowarpgroup_reg_alloc/dealloc(setmaxnreg) become no-ops and the warp-specialized kernels spillarch/grid_dependency_control.h:CUTLASS_GDC_ENABLED(PDL)Modifications
cmake/flashmla.cmake: whennvcc --list-gpu-archreportscompute_107, add-gencode=arch=compute_107a,code=sm_107aand patch the fetched CUTLASS headers. This is the same approach as the existing SM103config.hpatch.cmake/patch_cutlass_sm107.py: an idempotent patch of the three headers. Each anchor must match exactly once.Builds with an nvcc that lacks
compute_107are unchanged.Accuracy Tests
On a CC 10.7 device, with
flashmla_opsbuilt from this branch's cmake:sm_100,sm_103aandsm_107acode.sm_107aSASS has the same 254USETMAXREGas thesm_100fbuild, andcore_attnno longer spills.tests/test_flashmla.pyandtests/test_flashmla_mega.py: 28 passed.A model-level accuracy eval is still to do (draft).
Speed Tests and Profiling
Per-kernel A/B against the
sm_100fbinary on the same device, ABBA-ordered serving profiles: fusedcore_attndecode and prefill are faster. The other FlashMLA kernels are neutral. The end-to-end difference at bs32 128K/1K is within run-to-run noise.Checklist
Related: the same CUTLASS patch for the DeepGEMM and FlashMLA forks (links below).
🤖 Generated with Claude Code
CI States
Latest PR Test (Base): ❌ Run #39844141095
Latest PR Test (Extra): ❌ Run #39844140984
Latest PR Test (AMD ROCm 10): ❌ Run #39844140982