Repository navigation
[#20365][fix] Use the fused DSpark RMSNorm/RoPE kernels on SM107 - #20366
Conversation
The RMSNorm/RoPE support gate reused the SM100/SM103 table of the DSV4 DSpark attention kernel, so the drafter always took the eager path on SM107. Give the SIMT RMSNorm/RoPE kernels their own architecture set that includes SM107 and leave the attention gate unchanged. Signed-off-by: Zihua Wu <13583761+lucifer1004@users.noreply.github.com>
|
Test report (branch diff applied on a build from an earlier main, SM107, single node):
|
Signed-off-by: Zihua Wu <13583761+lucifer1004@users.noreply.github.com>
|
Thanks for the review. Merged current main (0372799), which has not touched either file in this PR, so the diff is unchanged. Starting CI. |
|
/bot run |
|
PR_Github #78864 [ run ] triggered by Bot. Commit: |
|
PR_Github #78864 [ run ] completed with state
|
|
CI #78864 failed outside this PR:
Rerunning. |
|
/bot run |
|
PR_Github #78918 [ run ] triggered by Bot. Commit: |
|
PR_Github #78918 [ run ] completed with state
|
|
CI #78918 failed outside this PR: |
|
/bot run |
|
PR_Github #78964 [ run ] triggered by Bot. Commit: |
|
PR_Github #78964 [ run ] completed with state |
|
@NVIDIA/trt-llm-runtime-devs could one of you take a look when you have a moment? CI is green and dc3671 has approved; the remaining requirement is a code-owner review for |
|
Automatically added "ci: full pre-merge approved" because this PR has satisfied the required GitHub review approvals. Unresolved review conversations and other required checks remain independent merge requirements. |
Description
Fixes #20365.
is_fused_dspark_rmsnorm_rope_supported()gated on_get_dspark_arch_str(), the SM100/SM103 table of the DSV4 DSpark attention kernel, so on SM107 the MLA-backboned DSpark drafter always fell back to the eager RMSNorm/RoPE chain, although the ops' own error messages list SM107.The RMSNorm/RoPE kernels are plain SIMT CuTe kernels, so this PR gives them their own architecture set,
_DSPARK_RMSNORM_ROPE_SM_VERSIONS = {100, 103, 107}, checked by_is_dspark_rmsnorm_rope_sm_supported()._get_dspark_arch_str()and every DSV4 DSpark attention gate are unchanged, so the tcgen05 attention kernel stays SM100/SM103-only; its attention-preparation ops (*_cache_write,*_draft_block) are only reached when the attention gate also passes.Test Coverage
tests/unittest/_torch/speculative/test_dspark_cute_dsl_rmsnorm_rope.py: the module now also runs on SM107, and the newtest_fused_dspark_rmsnorm_rope_supported_architectureschecks the architecture set and that_get_dspark_arch_str(107)staysNone. The file is inl0_b200.yml, so the new test runs there; there is no SM107 test list to add it to.PR Checklist
Dev Engineer Review
The RMSNorm/RoPE support gate now uses a separate SM100/SM103/SM107 set. This enables the fused SIMT CuTe kernels on SM107 without widening the DSV4 attention gate, which remains SM100/SM103-only. The change preserves the distinction between the RMSNorm/RoPE kernels and the tcgen05 attention kernel.
The updated test file has not been run on SM107, and SM100/SM103 behavior was not re-run. GPU validation remains a follow-up.
QA Engineer Review
The test module adds
test_fused_dspark_rmsnorm_rope_supported_architectures. It checks support for SM100/SM103/SM107, rejection of SM90/SM101/SM110/SM120, the default architecture check, and that the DSV4 architecture helper returnsNonefor SM107. Existing tests cover invalid inputs, output against a reference, CUDA graph replay, compilation caching, andnorm_dimbehavior.The test module is listed in
tests/integration/test_lists/test-db/l0_b200.yml. Coverage verdict: needs follow-up because the updated tests have not been run on SM107, and SM100/SM103 behavior was not re-run.Per-File QA Perspective
tensorrt_llm/_torch/custom_ops/dspark_rmsnorm_rope_custom_op.py: The fused RMSNorm/RoPE support check now accepts SM107 when tensor constraints pass. Verify fused dispatch on SM107 and confirm DSV4 attention remains unavailable there.tests/unittest/_torch/speculative/test_dspark_cute_dsl_rmsnorm_rope.py: Adds architecture-gate coverage and retains tests for input validation, numerical behavior, graph replay, caching, and norm dimensions. The module is listed in the CI test listtests/integration/test_lists/test-db/l0_b200.yml; SM107 execution remains unverified.