Repository navigation
Bump CUTLASS to v4.8.1 and use native sm_107a JIT codegen - #113
Conversation
The pinned CUTLASS lists no SM107 in arch/config.h, arch/reg_reconfig.h or arch/grid_dependency_control.h, so 10.7 devices JIT for the sm_100f family target. Patch those headers in the wheel staging step, and pick sm_107a at runtime when the shipped reg_reconfig.h knows 1070. Source checkouts with unpatched headers keep sm_100f. Co-Authored-By: Claude Opus 5.5 <[email protected]>
CUTLASS v4.8.0+ supports SM107 natively (arch/config.h SM107A/F, reg_reconfig.h, grid_dependency_control.h), so drop the header patch. Its SM107 support needs nvcc 13.4+, so gate the sm_107a JIT target on the nvcc version instead of on the shipped headers. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Update: on a CC 10.7 device with this branch's wheel (CUTLASS 4.8.1), 🤖 Generated with Claude Code |
|
Correction to the description: the " 🤖 Generated with Claude Code |
Motivation
init_jitpins every 10.x device except 10.1 to thesm_100ffamily target. On CC 10.7, nativesm_107acodegen is slightly faster for the kernels DeepSeek-V4.1 uses (mqa_logits, thefp8_fp4GEMM,tf32_hc_prenorm), measured with per-kernel serving profiles. Numbers are available on request.The pinned CUTLASS (
f3fde58, 4.2.1) has no SM107 support. JIT-ing forsm_107aagainst it compiles but silently drops the SM100 MMA/TMA enables,setmaxnregand PDL. For example,sm100_paged_mqa_logitslost everyUSETMAXREGand ran far slower. CUTLASS v4.8.0+ supports SM107 natively.Modifications
2c85f49). For the C++ headers, v4.8.0 and v4.8.1 differ only inversion.h. The bump also changes the JIT cache key (cutlass-<version>), so existing caches recompile once.csrc/runtime/jit.hpp: on 10.7, uses107awhen nvcc is 13.4+ (CUTLASS's SM107 support needs it); otherwise keeps100f. Other architectures are unchanged.Tests
On a CC 10.7 device, with a wheel built by
build_sgl_deep_gemm.shfrom this branch:sm_107awith no override.tests/test_hyperconnection.pypasses, with no spills.test_fp8_fp4.pyandtest_attention.pyare running; I'll update here.The same
jit.hppchange plus the CUTLASS bump on top ofv0.2.3also builds. That is the variant sglang consumes today.Not yet tested: SM100 / SM103 hardware with the CUTLASS bump.
Related: sgl-project/FlashMLA#20 makes the same CUTLASS bump for FlashMLA.
🤖 Generated with Claude Code