Repository navigation
[None][fix] Map SM107 to the sm_100f NVRTC target in the trtllm-gen FMHA kernel loader - #18758
Conversation
…iled out The trtllm-gen FMHA target is built without the Rubin feature define, so tg::CudaArch::Sm107a and the gated `case 107` compile out and an SM107 device falls through to `default` (assert in debug, silently Sm100a in release). Kernels that take the NVRTC path are then compiled for sm_100a, which does not load on a 10.7 device. Return the family arch instead: the precompiled Sm107a cubins are unaffected (selection goes through mSM and isSMCompatible), and NVRTC emits sm_100f SASS that SM107 can run. No-op for every other arch: the new case sits in the #else of the existing feature-define block and only matches smVersion == 107. Signed-off-by: Faraz Khoubsirat <58580514+farazkh80@users.noreply.github.com>
37f75dd to
e89e73f
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review. WalkthroughThe FMHA kernel architecture mapping now provides an SM107 mapping for builds without ChangesSM107 architecture mapping
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to Non-Rubin SM107 systems now compile FMHA NVRTC kernels for the compatible sm_100f target while Rubin builds continue using sm_107a, avoiding incompatible kernel targeting without changing other architectures. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
/bot run |
|
PR_Github #71858 [ run ] triggered by Bot. Commit: |
|
PR_Github #71858 [ run ] completed with state
|
|
/bot run |
|
PR_Github #72776 [ run ] triggered by Bot. Commit: |
|
PR_Github #72776 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #72803 [ run ] triggered by Bot. Commit: |
|
PR_Github #72803 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #72950 [ run ] triggered by Bot. Commit: |
|
PR_Github #72950 [ run ] completed with state |
Description
Follow-up to #18518, found while running DeepSeek-V4 end to end on a 4-GPU SM107 machine on top of
main+ #18518.The trtllm-gen FMHA target is built without the Rubin feature define, so
tg::CudaArch::Sm107aand the gatedcase 107inintToCudaArchcompile out and an SM107 device falls todefault(assert in debug, silentlySm100ain release). Any FMHA config that takes the NVRTC path is then compiled forsm_100a, which does not load on a 10.7 device. Return the family arch (Sm100f) instead. Precompiled Sm107a cubins are unaffected (selection goes throughmSM/isSMCompatible);cudaArchToIntalready mapsSm100f → 100and has no callers.Scope
cpp/tensorrt_llm/kernels/trtllmGenKernels/fmha/fmhaKernels.h(+3).case 107sits in the#elseof the existing feature-define block and only matchessmVersion == 107; the other cases are untouched.Test coverage
Run on 4× SM107 (DeepSeek-V4-Flash, TP4/EP4, attention-DP,
MoeConfig(backend="TRTLLM"),KvCacheConfig(dtype="fp8"), CUDA graphs),main+ #18518 + this commit: quickstart passes with the trtllm-gen FMHA JIT warmup running on all ranks; GSM8K (1319, 5-shot) 95.38 vs the 95.11 (8× B200) / 95.38 (4× B300) references inreferences/gsm8k.yaml. Blackwell behavior unchanged by construction; existing FMHA tests cover the unchanged paths.Note for SM107 users: with the current
nvidia-cutlass-dslpin (4.6.2) the DeepSeek-V4 CuTe DSL kernel selection still fails on SM107 (KeyError: 'sm_107a'); that resolves with the planned pin bump to a cutlass-dsl that knowssm_107a(4.8.0.dev0 does) and is intentionally not worked around here.PR Checklist
[None][fix] ...🤖 Generated with Claude Code
Dev Engineer Review
Sm100ffor NVRTC builds withoutTLLM_RUBIN_FEATURES.Sm107amapping for Rubin-feature builds and precompiled cubin selection.Verdict: sufficient
QA Engineer Review
No test changes.