Skip to content

[None][perf] Enable FlashInfer GDN chunked prefill on SM107 - #21210

Merged
aswinvisva merged 1 commit into
NVIDIA:mainfrom
aswinvisva:avisva/sm107-gdn-flashinfer
Nov 2, 2026
Merged

aswinvisva merged 1 commit into
NVIDIA:mainfrom
aswinvisva:avisva/sm107-gdn-flashinfer

Conversation

@aswinvisva

@aswinvisva aswinvisva commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

Dev Engineer Review

  • The prefill architecture allow-list adds SM107. The decode architecture predicate remains unchanged, so SM107 remains unsupported for FlashInfer decode.
  • The prefill selector still requires TLLM_USE_FLASHINFER_GDN_PREFILL=1 and a supported architecture. Setting it to 0 continues to disable FlashInfer prefill.
  • The change is limited to prefill gating, related test expectations, and CI test selection.
  • The author reports successful CI pipelines, with reduced coverage because the L40S stage was paused. The reported H200 test run does not verify execution on SM107. An SM107 run remains a follow-up.

QA Engineer Review

  • Modified tests/unittest/_torch/modules/mamba/test_flashinfer_chunk_gdn.py. The architecture predicate tests now expect SM107 prefill support and decode exclusion. The routing-test architecture list remains unchanged.
  • Modified tests/integration/test_lists/test-db/l0_gr100.yml to add the GDN test. The test also appears in the l0_gb10.yml and l0_rtx_pro_6000.yml CI lists.
  • The tests cover architecture gating. The author reports 57/57 tests passed on H200; this does not confirm SM107 kernel execution. Coverage verdict: needs follow-up for an SM107 run.

Per-File QA Perspective

  • tensorrt_llm/_torch/modules/mamba/gdn_mixer.py: The prefill selector uses the architecture predicate and the TLLM_USE_FLASHINFER_GDN_PREFILL environment variable. Verify FlashInfer prefill selection and Triton fallback on SM107.
  • tensorrt_llm/_utils.py: The prefill architecture predicate adds SM107; the decode predicate remains separate and unchanged. Verify that SM107 is accepted for prefill and rejected for decode.
  • tests/unittest/_torch/modules/mamba/test_flashinfer_chunk_gdn.py: Architecture tests cover SM107 prefill support and decode exclusion, alongside existing routing tests. The file is listed in CI test-db lists, including l0_gr100.yml.
  • tests/integration/test_lists/test-db/l0_gr100.yml: Adds the GDN test to the GR100 CI list for SM107. This changes test selection, not runtime behavior.

Description

is_flashinfer_gdn_prefill_supported_arch() does not list SM107, so GDN chunked prefill on SM107 falls back to the vendored Triton FLA kernel, even though FlashInfer routes all compute-10.x devices to its SM100 CuTe DSL prefill kernels and the pinned CuTe DSL targets sm_107a natively. This PR adds SM107 to that allow-list for prefill only: the decode/MTP-verify gate (is_flashinfer_gdn_decode_supported_arch()) is unchanged, other architectures are unaffected, and TLLM_USE_FLASHINFER_GDN_PREFILL=0 still forces Triton. This moves SM107 prefill onto the same FlashInfer kernels that SM100/SM103 already use.

Test Coverage

test_is_flashinfer_gdn_prefill_supported_arch and test_is_flashinfer_gdn_decode_supported_arch now pin SM107 as prefill-enabled and decode-disabled (GPU-free). unittest/_torch/modules/mamba/test_flashinfer_chunk_gdn.py (FlashInfer-vs-Triton prefill parity, including indexed in-place state I/O) is added to the SM107 test list so it runs on SM107 hardware, and it passes 57/57 on H200. Main pins FlashInfer 0.6.18, which also sends low-parallelism prefill on compute-10.x devices to a new context-parallel kernel, so please run the SM107 post-merge stage before merging.

PR Checklist

Please review the following before submitting your PR:

  • PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.

  • PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.

  • Test cases are provided for new code paths (see test instructions)

  • If PR introduces API changes, an appropriate PR label is added - either api-compatible or api-breaking. For api-breaking, include BREAKING in the PR title.

  • Any new dependencies have been scanned for license and vulnerabilities

  • CODEOWNERS updated if ownership changes

  • Documentation updated as needed

  • Update tava architecture diagram if there is a significant design change in PR.

  • The reviewers assigned automatically/manually are appropriate for the PR.

  • Please check this after reviewing the above items as appropriate for this PR.

GitHub Bot Help

To see a list of available CI bot commands, please comment /bot help.

@aswinvisva

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #81249 [ run ] triggered by Bot. Commit: 8812713 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #81249 [ run ] completed with state SUCCESS. Commit: 8812713
/LLM/main/L0_MergeRequest_PR pipeline #66938 completed with status: 'SUCCESS'

CI Report

⚠️ Resource Maintenance — Test Coverage Reduced:

Resource maintenance in LLM/main/L0_Test-x86_64-Single-GPU #9113: L40S-PyTorch-2 is temporarily paused due to Kubernetes agent provisioning and node issues.
Affected stages:
L40S-PyTorch-2

Link to invocation

@aswinvisva
aswinvisva marked this pull request as ready for review October 29, 2026 19:56
@aswinvisva
aswinvisva requested review from a team as code owners October 29, 2026 19:56
@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 8812713 and 8aaaa17.

Files selected for processing: 2
  • tensorrt_llm/_utils.py
  • tests/integration/test_lists/test-db/l0_gr100.yml

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 9 remain after this review.

Walkthrough

The FlashInfer GDN prefill architecture predicate now recognizes SM107. Unit tests expect SM107 to be supported for prefill and unsupported for decode. The Mamba chunk-GDN test is added to the GR100 integration test list.

Changes

GDN prefill architecture support

Layer / File(s) Summary
SM107 prefill predicate and validation
tensorrt_llm/_utils.py, tensorrt_llm/_torch/modules/mamba/gdn_mixer.py, tests/unittest/_torch/modules/mamba/test_flashinfer_chunk_gdn.py, tests/integration/test_lists/test-db/l0_gr100.yml
The prefill architecture predicate and its supporting comment include SM107. Unit tests expect SM107 to be supported for prefill but not decode. The integration test list includes the Mamba chunk-GDN test.

Priority: Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Suggested reviewers: brnguyen2, bowenfu

Merge Risk: Minimal · up to 8aaaa

No actionable merge-blocking defect is established; an SM107 execution run would still improve confidence.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly identifies the performance change: enabling FlashInfer GDN chunked prefill on SM107. It follows the repository format with a valid ticket marker and type.
Description check Passed The description explains the issue, the prefill-only solution, unaffected decode behavior, test coverage, reported results, and merge considerations. The checklist is also completed.
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 3 files. (1 skipped: 1 unsupported.)

Finishing Touches: 💡 1
🧪 Generate unit tests (beta)
  • Create a new PR
🛠️ Fix failing CI checks: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@aswinvisva
aswinvisva force-pushed the avisva/sm107-gdn-flashinfer branch from 8812713 to 8aaaa17 Compare October 30, 2026 17:07
@aswinvisva

Copy link
Copy Markdown
Collaborator Author

/bot run

1 similar comment
@aswinvisva

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #81740 [ run ] triggered by Bot. Commit: 8aaaa17 Link to invocation

@github-actions

Copy link
Copy Markdown

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.

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #81740 [ run ] completed with state SUCCESS. Commit: 8aaaa17
/LLM/main/L0_MergeRequest_PR pipeline #67399 completed with status: 'SUCCESS'

CI Report

Link to invocation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants