Skip to content

[None][chore] Refresh PrimTS vendor source onto FlashInfer main - #20155

Merged
yuxianq merged 3 commits into
NVIDIA:mainfrom
yuxianq:prims-ts-refresh-20261012
Oct 13, 2026
Merged

yuxianq merged 3 commits into
NVIDIA:mainfrom
yuxianq:prims-ts-refresh-20261012

Conversation

@yuxianq

@yuxianq yuxianq commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator

Dev Engineer Review

  • The vendor refresh updates the pinned FlashInfer branch and commit, compatibility patch, and digests. The patch changes selected API decorators and imports. It removes trace-dispatch arguments from block-sparse and decode entry points while retaining MLA one-shot trace dispatch.
  • PrimsTSFmha now passes separate k_dtype and v_dtype values from the K and V caches. This aligns the call with the updated planner API and avoids assuming both caches share a dtype.
  • The supplied description reports that attention defaults and FMHA selection behavior are unchanged. It also reports successful vendor verification, existing vendor-source unit tests, and static checks. GPU numerical and performance validation remains outstanding; required CI and reviews are pending.
  • Current review severity counts are unavailable because no review findings were supplied.

QA Engineer Review

  • Modified test: tests/unittest/_torch/attention/test_prims_ts_fmha.py. The test uses an autospecced BatchPrefillPagedTSWrapper mock and checks separate K/V dtype arguments. The stated GPU integration coverage still needs validation on supported hardware.
  • No changed integration test-list files are identified. The supplied search found no listing for test_prims_ts_fmha; that unit test is not an integration-list entry. Listing status for the named GPU integration tests is not established.
  • Coverage verdict: needs follow-up. GPU and integration validation remains outstanding.

Per-File QA Perspective

  • 3rdparty/vendor_patches/flashinfer-prims-ts.patch: Verify behavior after decorator and import changes, especially block-sparse and decode dispatch. MLA one-shot trace dispatch remains.
  • 3rdparty/vendor_sources.lock.yaml: The vendor branch, commit, patch digest, and tree digest change. Verify that the locked source reproduces the expected vendor tree.
  • tensorrt_llm/_torch/attention/backends/fmha/prims_ts.py: The context planner now receives distinct K and V cache dtypes. Verify planning when the cache dtypes differ.
  • tests/unittest/_torch/attention/test_prims_ts_fmha.py: The unit test checks the updated planner arguments with an autospecced wrapper. It is not listed in the integration test lists.

Description

Refresh the flashinfer-prims-ts vendor onto current FlashInfer main, using a new
dated canonical branch rather than rewriting the branch referenced by existing
TRT-LLM releases and contributor PRs.

Item Before After
Canonical branch in yuxianq/flashinfer trtllm-prims-ts-dev trtllm-prims-ts-dev-20261012
Immutable source commit 6e0d64e79f2a87eeb539e2f40ea12d009679a8f5 ae312f7cc1723b06fda5168105ade0f328ee47d8
Refresh base — FlashInfer main at ae312f7cc1723b06fda5168105ade0f328ee47d8

The consumer branch starts from TRT-LLM main at
efeda445748b08bf32c057034089acf4577112f1. The old canonical branch is unchanged.
The new canonical branch is exactly the audited upstream main commit: no
downstream source commits remain to replay
.

Downstream-series audit

The 34 downstream commits since 1c142d58d7cb8b394e43517fc18ec7c970b5f5bd
are covered by the following merged upstream work. All listed squash commits
are ancestors of the new pin.

  • FlashInfer #4829: plan/run and fixed-page-table contracts, including the aggregate follow-up backport b0d190d4f. The follow-up's lock-selected Python edits match the recorded upstream range exactly. The initial-series adaptations include trace/import and naming changes subsequently reverted in that same series.
  • FlashInfer #4872: bitmask/proxy block-sparse routes. Rebase adaptations substitute fixed page-table arguments for the upstream series' older CSR arguments; the final fixed-table interface is upstream in Does TensoRT-LLM Support Llama 4 for Engine Compilation? #5144.
  • FlashInfer #5002: streamed block-sparse performance work. The non-identical selected edit is placement of a @property line at a diff boundary; the final property is preserved.
  • FlashInfer #5144: fixed paged block-sparse tables. Differences account for alias validation that upstream subsequently removed; this refresh adopts the current upstream contract.
  • FlashInfer #5478: the upstream 4.7/4.8 task API compatibility helper supersedes the unpaired downstream bad2bdb15 fix. The FMHA and MLA task overrides use version-aware context forwarding, so the 4.8-only patch is not reapplied.

This is an upstream source refresh, not a lock-only promotion. It imports the
current selected Python source, including newer context/decode implementations;
it must run normal CI and must not use /bot skip.

TRT-LLM integration

  • Continue selecting only flashinfer/attention/prims_ts/**/*.py; no FlashInfer tests, benchmarks, external CUDA/JIT sources, or dependency versions are vendored.
  • Regenerate the persistent compatibility patch and both digests. The patch uses the pinned package's flashinfer_api decorator and resolves external FlashInfer helper imports absolutely. It drops unavailable block-sparse traces and incompatible CSR/plan-owned decode trace schemas, but retains compatible MLA one-shot tracing. Only five files require adaptations; the other 87 selected files are exact upstream copies. Original source licenses are preserved, with no license-only patch entries or duplicate copyright lines.
  • Update the paged-context planner call to explicit k_dtype and v_dtype; strengthen its existing test with an autospecced wrapper so future signature mismatches fail.
  • Update live-wrapper GPU tests for separate context K/V dtypes and the public paged decode/MLA one-shot APIs. Remove assertions for upstream-removed alias checks while retaining CUDA-graph replay and shared-workspace coverage.
  • Produce per-block V means in the SOL predictor, matching the refreshed PrimTS proxy contract. Previously the kernel multiplied already-summed values by block mass again. Update summary-contract references, including partial final blocks; retain the independent raw-Q/K/V SOL reference and all numerical tolerances unchanged.
  • Remove _tensor_aliasing.py because it was removed upstream. Its previous bytes remain recoverable from Git.
  • Do not enable new FMHA selection cases or change attention defaults. Newly imported optional APIs are not additional TRT-LLM feature enablement; in particular Q-token sparse metadata JIT execution still depends on support in the installed FlashInfer package.
  • Keep vendor bot/tool changes separate in #19048.

Maintainer cutover completed — 2026-10-13

  • Done: Published the new dated canonical branch without changing the old branch. Rechecked both remote tips after cutover; the old branch remains at 6e0d64e79f2a87eeb539e2f40ea12d009679a8f5.
  • Done: Merged this refresh as fca08032f752cecde2fdb99d1538940b4d23fc7a at 07:59 UTC.
  • Done: Verified the current main lock names yuxianq/flashinfer:trtllm-prims-ts-dev-20261012 at ae312f7cc1723b06fda5168105ade0f328ee47d8, matching the new remote branch tip.
  • Done: Backed up the original SQLite state, then used [None][infra] Add PrimTS vendor promotion maintainer tool #19048's explicit --migrate-canonical-branch-from trtllm-prims-ts-dev migration in the same existing operator workdir. Preserved the source cache, logs, operator/repository configuration, and historical cutoff; no manual SQLite edits.
  • Done: The dry run exposed a stale-head classification bug: unrelated-vendor and patch-only PRs were compared only with the refreshed main lock. Fixed this in tool commit 951452a30d: classify the selected source-pin change relative to the PR merge base, while retaining the latest canonical pin for promotion safety. Regression coverage includes restart without cached SQLite results. All 193 bot tests passed; the 180 promotion/vendor-source tests and applicable pre-commit checks also passed.
  • Done: Corrected dry-run reconciliation completed at 08:21:27 UTC with 19 tracked PRs processed, 5 relevant author-blocked updates, and 0 operational errors.
  • Done: Restarted --daemon --publish with the new canonical branch, preserving the 120-second interval and INFO logging. Its first publishing poll completed at 08:23:33 UTC: 19 processed, 5 author-blocked, 0 operational errors. needs_attention reflects contributor rebase/metadata work, not a failed daemon. No promotion was created for historical or unrelated updates.
  • Done: Re-scanned 1,015 open PRs and posted source-branch/consumer rebase notices to #19395, #19396, #20006, #20068, #20209. Posted compatibility-patch reconciliation guidance for #20144, which does not need a temporary source-branch rebase. [None][feat] Add PrimsTS MoE with Rubin locality domains #19115 and [None][feat] Add DynamicEPLB kernels and runtime integration #19646 change other vendor entries and were deliberately excluded.
  • No additional lock-back promotion is needed: main already points directly to the new canonical branch. Contributor rebases and their CI remain the respective authors' follow-ups.

Test Coverage

  • Passed source-backed vendor verification against the exact new FlashInfer checkout: 92 selected files reproduce exactly from the lock plus compatibility patch.
  • Passed offline verification of all three vendor entries; unrelated vendor entries and bytes are unchanged.
  • Passed all 72 existing vendor-source unit tests on the refresh branch.
  • Passed isolated import of the refreshed vendored Python package using the pinned FlashInfer 0.6.18 wheel, without importing TRT-LLM's C++ bindings.
  • Passed all eight MLA one-shot trace variants with FlashInfer 0.6.18: fixed/packed Q, rank-3/rank-4 cache, and BF16/FP8 cache. Verified that the compatibility patch has no license-only entries.
  • Passed signature binding checks for all six dense context/decode/MLA adapter plan/run calls and four block-sparse wrapper plan/run calls.
  • Passed Python syntax compilation, git diff --check, and applicable pre-commit checks.
  • Updated test_prims_ts_fmha.py validates the new K/V dtype arguments and uses the actual wrapper signature via create_autospec.
  • Reproduced both CI failure patterns on B200 using the exact PR-head CI wheel and PyTorch 2.14.0a0+b2c75dd062.nv26.09: the stale context kv_dtype argument and the SOL proxy mismatch (96.8% of elements; maximum absolute error 9.375).
  • Passed 35 focused tests on B200, with zero failures or skips: all six affected attention wrapper/graph cases, all 16 SOL parity tests, all 12 SOL predictor tests, and generic block-sparse proxy graph replay. This includes the independent raw-Q/K/V reference and unchanged numerical tolerances. The fixed run imports the live worktree over matching CI-built extension artifacts.
  • Reran all 72 vendor-source tests and applicable pre-commit checks successfully. This source refresh required normal CI; no end-to-end model or performance-benchmark result is claimed here.
  • CI should cover the existing test_prims_ts_fmha.py, test_prims_ts_attention_backend.py (Qwen/DeepSeek, eager and CUDA graph), and sparse/test_prims_ts_block_sparse.py suites on supported hardware.

PR Checklist

Please review the following before submitting your PR:

  • Description explains the source audit, compatibility changes, and post-merge migration.

  • Followed TRT-LLM coding guidelines and DCO sign-off requirements.

  • Relevant tests and unvalidated GPU coverage are identified above.

  • No new model architecture, user-facing configuration, dependency pin, or ownership changes.

  • This refresh merged on 2026-10-13; the post-merge canonical-branch cutover is complete as recorded above.

  • 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.

Move to the dated canonical branch trtllm-prims-ts-dev-20261012 at ae312f7cc1723b06fda5168105ade0f328ee47d8. Merged FlashInfer PRs NVIDIA#4829, NVIDIA#4872, NVIDIA#5002, and NVIDIA#5144 cover the downstream series; NVIDIA#5478 supersedes the standalone CUTLASS DSL 4.8 fix. No downstream source commits remain to replay. Regenerate the TRT-LLM compatibility patch and bind the paged context adapter to separate K/V dtype arguments.

Signed-off-by: Yuxian Qiu <142763828+yuxianq@users.noreply.github.com>
@yuxianq

yuxianq commented Oct 12, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #77260 [ run ] triggered by Bot. Commit: 24e54bd Link to invocation

Signed-off-by: Yuxian Qiu <142763828+yuxianq@users.noreply.github.com>
@yuxianq

yuxianq commented Oct 12, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #77264 [ run ] triggered by Bot. Commit: e7abf19 Link to invocation

@yuxianq
yuxianq marked this pull request as ready for review October 12, 2026 10:52
@yuxianq
yuxianq requested review from a team as code owners October 12, 2026 10:52
@yuxianq

yuxianq commented Oct 12, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #77260 [ run ] completed with state ABORTED. Commit: 24e54bd

Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #77266 [ run ] triggered by Bot. Commit: e7abf19 Link to invocation

@coderabbitai

coderabbitai Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: NVIDIA/TensorRT-LLM/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: c0642bb9-497e-4500-a3f5-e92b9a3aa459
📥 Commits

Reviewing files that changed from the base of the PR and between a8d7911 and e7abf19.

⛔ Files ignored due to path filters (44)
  • tensorrt_llm/_torch/attention/backends/prims_ts/__init__.py is excluded by !tensorrt_llm/_torch/attention/backends/prims_ts/**
  • tensorrt_llm/_torch/attention/backends/prims_ts/_block_sparse/common.py is excluded by !tensorrt_llm/_torch/attention/backends/prims_ts/**
  • tensorrt_llm/_torch/attention/backends/prims_ts/_block_sparse/compiler.py is excluded by !tensorrt_llm/_torch/attention/backends/prims_ts/**
  • tensorrt_llm/_torch/attention/backends/prims_ts/_block_sparse/config.py is excluded by !tensorrt_llm/_torch/attention/backends/prims_ts/**
  • tensorrt_llm/_torch/attention/backends/prims_ts/_block_sparse/inspection.py is excluded by !tensorrt_llm/_torch/attention/backends/prims_ts/**
  • tensorrt_llm/_torch/attention/backends/prims_ts/_block_sparse/plan.py is excluded by !tensorrt_llm/_torch/attention/backends/prims_ts/**
  • tensorrt_llm/_torch/attention/backends/prims_ts/_block_sparse/runtime.py is excluded by !tensorrt_llm/_torch/attention/backends/prims_ts/**
  • tensorrt_llm/_torch/attention/backends/prims_ts/_q_token_kv_block_sparse_policy.py is excluded by !tensorrt_llm/_torch/attention/backends/prims_ts/**
  • tensorrt_llm/_torch/attention/backends/prims_ts/_tensor_aliasing.py is excluded by !tensorrt_llm/_torch/attention/backends/prims_ts/**
  • tensorrt_llm/_torch/attention/backends/prims_ts/block_sparse.py is excluded by !tensorrt_llm/_torch/attention/backends/prims_ts/**
  • tensorrt_llm/_torch/attention/backends/prims_ts/context.py is excluded by !tensorrt_llm/_torch/attention/backends/prims_ts/**
  • tensorrt_llm/_torch/attention/backends/prims_ts/decode.py is excluded by !tensorrt_llm/_torch/attention/backends/prims_ts/**
  • tensorrt_llm/_torch/attention/backends/prims_ts/kernels/fmha_context/fmha_kernel.py is excluded by !tensorrt_llm/_torch/attention/backends/prims_ts/**
  • tensorrt_llm/_torch/attention/backends/prims_ts/kernels/fmha_context/fmha_resources.py is excluded by !tensorrt_llm/_torch/attention/backends/prims_ts/**
  • tensorrt_llm/_torch/attention/backends/prims_ts/kernels/fmha_context/fmha_tasks.py is excluded by !tensorrt_llm/_torch/attention/backends/prims_ts/**
  • tensorrt_llm/_torch/attention/backends/prims_ts/kernels/fmha_context/helpers.py is excluded by !tensorrt_llm/_torch/attention/backends/prims_ts/**
  • tensorrt_llm/_torch/attention/backends/prims_ts/kernels/fmha_decode/direct_sparse_metadata.py is excluded by !tensorrt_llm/_torch/attention/backends/prims_ts/**
  • tensorrt_llm/_torch/attention/backends/prims_ts/kernels/fmha_decode/fmha_decode_config.py is excluded by !tensorrt_llm/_torch/attention/backends/prims_ts/**
  • tensorrt_llm/_torch/attention/backends/prims_ts/kernels/fmha_decode/fmha_decode_constants.py is excluded by !tensorrt_llm/_torch/attention/backends/prims_ts/**
  • tensorrt_llm/_torch/attention/backends/prims_ts/kernels/fmha_decode/fmha_decode_kernel.py is excluded by !tensorrt_llm/_torch/attention/backends/prims_ts/**
  • tensorrt_llm/_torch/attention/backends/prims_ts/kernels/fmha_decode/fmha_decode_resources/__init__.py is excluded by !tensorrt_llm/_torch/attention/backends/prims_ts/**
  • tensorrt_llm/_torch/attention/backends/prims_ts/kernels/fmha_decode/fmha_decode_resources/helpers_common.py is excluded by !tensorrt_llm/_torch/attention/backends/prims_ts/**
  • tensorrt_llm/_torch/attention/backends/prims_ts/kernels/fmha_decode/fmha_decode_resources/helpers_kv_tile_idx.py is excluded by !tensorrt_llm/_torch/attention/backends/prims_ts/**
  • tensorrt_llm/_torch/attention/backends/prims_ts/kernels/fmha_decode/fmha_decode_resources/helpers_output.py is excluded by !tensorrt_llm/_torch/attention/backends/prims_ts/**
  • tensorrt_llm/_torch/attention/backends/prims_ts/kernels/fmha_decode/fmha_decode_resources/helpers_softmax.py is excluded by !tensorrt_llm/_torch/attention/backends/prims_ts/**
  • tensorrt_llm/_torch/attention/backends/prims_ts/kernels/fmha_decode/fmha_decode_resources/sage_scales.py is excluded by !tensorrt_llm/_torch/attention/backends/prims_ts/**
  • tensorrt_llm/_torch/attention/backends/prims_ts/kernels/fmha_decode/fmha_decode_resources/smem_block_sparse_metadata.py is excluded by !tensorrt_llm/_torch/attention/backends/prims_ts/**
  • tensorrt_llm/_torch/attention/backends/prims_ts/kernels/fmha_decode/fmha_decode_resources/smem_p.py is excluded by !tensorrt_llm/_torch/attention/backends/prims_ts/**
  • tensorrt_llm/_torch/attention/backends/prims_ts/kernels/fmha_decode/fmha_decode_resources/smem_resources.py is excluded by !tensorrt_llm/_torch/attention/backends/prims_ts/**
  • tensorrt_llm/_torch/attention/backends/prims_ts/kernels/fmha_decode/fmha_decode_resources/smem_transformed_kv.py is excluded by !tensorrt_llm/_torch/attention/backends/prims_ts/**
  • tensorrt_llm/_torch/attention/backends/prims_ts/kernels/fmha_decode/fmha_decode_resources/tmem_corr.py is excluded by !tensorrt_llm/_torch/attention/backends/prims_ts/**
  • tensorrt_llm/_torch/attention/backends/prims_ts/kernels/fmha_decode/fmha_decode_resources/tmem_o.py is excluded by !tensorrt_llm/_torch/attention/backends/prims_ts/**
  • tensorrt_llm/_torch/attention/backends/prims_ts/kernels/fmha_decode/fmha_decode_resources/tmem_s.py is excluded by !tensorrt_llm/_torch/attention/backends/prims_ts/**
  • tensorrt_llm/_torch/attention/backends/prims_ts/kernels/fmha_decode/fmha_decode_resources/tmem_softmax_stats.py is excluded by !tensorrt_llm/_torch/attention/backends/prims_ts/**
  • tensorrt_llm/_torch/attention/backends/prims_ts/kernels/fmha_decode/fmha_decode_resources/tmem_transformed_kv.py is excluded by !tensorrt_llm/_torch/attention/backends/prims_ts/**
  • tensorrt_llm/_torch/attention/backends/prims_ts/kernels/fmha_decode/fmha_decode_tasks.py is excluded by !tensorrt_llm/_torch/attention/backends/prims_ts/**
  • tensorrt_llm/_torch/attention/backends/prims_ts/kernels/fmha_decode/reduction.py is excluded by !tensorrt_llm/_torch/attention/backends/prims_ts/**
  • tensorrt_llm/_torch/attention/backends/prims_ts/kernels/mla_decode/throughput_2cta/tasks.py is excluded by !tensorrt_llm/_torch/attention/backends/prims_ts/**
  • tensorrt_llm/_torch/attention/backends/prims_ts/kernels/mla_decode/throughput_latency_1cta/parallel_reduction.py is excluded by !tensorrt_llm/_torch/attention/backends/prims_ts/**
  • tensorrt_llm/_torch/attention/backends/prims_ts/kernels/mla_decode/throughput_latency_1cta/tasks.py is excluded by !tensorrt_llm/_torch/attention/backends/prims_ts/**
  • tensorrt_llm/_torch/attention/backends/prims_ts/kernels/task_compat.py is excluded by !tensorrt_llm/_torch/attention/backends/prims_ts/**
  • tensorrt_llm/_torch/attention/backends/prims_ts/mla_decode.py is excluded by !tensorrt_llm/_torch/attention/backends/prims_ts/**
  • tensorrt_llm/_torch/attention/backends/prims_ts/q_token_kv_block_sparse_metadata.py is excluded by !tensorrt_llm/_torch/attention/backends/prims_ts/**
  • tensorrt_llm/_torch/attention/backends/prims_ts/sage.py is excluded by !tensorrt_llm/_torch/attention/backends/prims_ts/**
📒 Files selected for processing (4)
  • 3rdparty/vendor_patches/flashinfer-prims-ts.patch
  • 3rdparty/vendor_sources.lock.yaml
  • tensorrt_llm/_torch/attention/backends/fmha/prims_ts.py
  • tests/unittest/_torch/attention/test_prims_ts_fmha.py

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

Walkthrough

The vendored FlashInfer patch and source pin changed. Context-wrapper planning now passes separate key and value cache dtypes, and the test checks the updated arguments.

Changes

FlashInfer prims-ts integration

Layer / File(s) Summary
Update the vendored FlashInfer patch
3rdparty/vendor_patches/flashinfer-prims-ts.patch, 3rdparty/vendor_sources.lock.yaml
Selected APIs use the flashinfer_api alias, and specified trace-dispatch arguments and imports changed. The vendor entry now points to a different branch and commit with updated patch and tree digests.
Pass separate cache dtypes to context planning
tensorrt_llm/_torch/attention/backends/fmha/prims_ts.py, tests/unittest/_torch/attention/test_prims_ts_fmha.py
Context-wrapper planning passes the key and value cache dtypes separately. The test uses an autospecced wrapper mock and expects separate k_dtype and v_dtype arguments.

Priority: ⬇️ Low

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

Suggested reviewers: chzblych, brnguyen2

Merge Risk: ⚪ Minimal · up to e7abf

No actionable merge-blocking risk was identified; remaining GPU validation is standard follow-up for supported hardware.

Pre-merge checks · Passed 4 · Failed 1

Failed Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. (2 skipped: 2 … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks (4 passed)
Check name Status Explanation
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.
Title check Passed The title clearly and concisely describes the primary change: refreshing the PrimTS vendor source onto FlashInfer main. It follows the required [None][chore] format.
Description check Passed The description includes the required Description, Test Coverage, and PR Checklist sections. It explains the source refresh, compatibility changes, validation results, remaining CI and review requirem…
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. (2 skipped: 2 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • 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.

@yuxianq

yuxianq commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator Author

@PerkzZheng, could you help to review this PR as trt-llm-torch-attention-devs? Thanks~

Assignment explanation
Componentskernels/prims-ts (70%); fmha/prims-ts (27%); integration/dependencies (3%)
Tagsalgorithm:dense (50%); algorithm:sparse (50%); phase:prefill (40%); phase:decode (60%); features:quantization (65%); features:paged-kv (35%)
PR effort13 points — The refresh imports attention capabilities and kernel behavior changes, supporting feature classification despite the chore title. Coupled planning, sparse metadata, mixed-dtype resources and numerical contracts warrant deep kernel review; the score reflects that complexity rather than vendor line count.
ImportanceImportant — Visible changes extend dense/sparse execution and public planning interfaces, separate K/V kernel resources, and alter dtype-dependent memory addressing and FP8 softmax contracts. These are sensitive attention correctness and performance changes.
Affinity (0–1)0.693 component/tag match; 0.520 after PIC preference
Outstanding points at selection49 → 49 (+0)
Points already reserved on this PR13
Effective weight1
Completed review points (preceding 168 hours)8
Combined points after assignment57
Demand-derived target51.00 points (soft share)
Additional fair share before assignment0.00 points
Share explanationWhole PR / qualification or coverage constraint exceeds a soft share; assignment is allowed.
Selection ruleaffinity with half-share guard

Affinity and workload are snapshots at selection, not live counters. Existing reservations on this PR are counted once.

@yuxianq
yuxianq removed the request for review from kris1025 October 12, 2026 11:02
@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #77264 [ run ] completed with state ABORTED. Commit: e7abf19

Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #77266 [ run ] completed with state SUCCESS. Commit: e7abf19
/LLM/main/L0_MergeRequest_PR pipeline #63696 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@yihwang-nv yihwang-nv left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@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.

@yuxianq

yuxianq commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator Author

@yihwang-nv, thanks for picking up this PR! I’ve handed off the trt-llm-torch-attention-devs review from @PerkzZheng to you.

The 13 attention-review points now belong to @yihwang-nv; @PerkzZheng’s attention reservation has been released. Existing points on this PR are counted once.

@PerkzZheng, no further attention review is requested from you. Thanks~

@yuxianq
yuxianq requested review from yihwang-nv and removed request for PerkzZheng October 12, 2026 15:10
Signed-off-by: Yuxian Qiu <142763828+yuxianq@users.noreply.github.com>
@yuxianq
yuxianq requested a review from a team as a code owner October 13, 2026 04:03
@yuxianq

yuxianq commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #77397 [ run ] triggered by Bot. Commit: 79188af Link to invocation

@yuxianq
yuxianq requested a review from heyuhhh October 13, 2026 04:19

@heyuhhh heyuhhh left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM~ SOL attention V sum -> mean is expected

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #77397 [ run ] completed with state SUCCESS. Commit: 79188af
/LLM/main/L0_MergeRequest_PR pipeline #63802 completed with status: 'SUCCESS'

CI Report

Link to invocation

@yuxianq
yuxianq merged commit fca0803 into NVIDIA:main Oct 13, 2026
yunruis added a commit to yunruis/TensorRT-LLM that referenced this pull request Oct 13, 2026
Re-pin flashinfer-prims-ts to yunruis/flashinfer@549977ef (branch
yunruis/prims-ts-sparse-mla-group-major-out): FlashInfer main at ae312f7cc
(the revision NVIDIA#20155 vendored) plus flashinfer-ai/flashinfer#5434 (native
two-source sparse MLA with fused inverse-RoPE + E4M3 output, rebased head
735e1f4f3) and flashinfer-ai/flashinfer#6345 (group-major fused output and the
2CTA schedule for short lists). This brings BatchSparseMLADecodePagedTSWrapper
into TensorRT-LLM with the output layout TRT-LLM's DeepSeek-V4 epilogue
consumes.

The compatibility patch keeps upstream's shims and additionally drops the
one-shot MLA trace template (absent from the pinned flashinfer-python 0.6.18)
and makes the sparse plan's kernel imports relative so the vendored package
does not import flashinfer.attention.prims_ts.

AI-assisted.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: yunruis <205571022+yunruis@users.noreply.github.com>
yunruis added a commit to yunruis/TensorRT-LLM that referenced this pull request Oct 21, 2026
Re-pin flashinfer-prims-ts to yunruis/flashinfer@549977ef (branch
yunruis/prims-ts-sparse-mla-group-major-out): FlashInfer main at ae312f7cc
(the revision NVIDIA#20155 vendored) plus flashinfer-ai/flashinfer#5434 (native
two-source sparse MLA with fused inverse-RoPE + E4M3 output, rebased head
735e1f4f3) and flashinfer-ai/flashinfer#6345 (group-major fused output and the
2CTA schedule for short lists). This brings BatchSparseMLADecodePagedTSWrapper
into TensorRT-LLM with the output layout TRT-LLM's DeepSeek-V4 epilogue
consumes.

The compatibility patch keeps upstream's shims and additionally drops the
one-shot MLA trace template (absent from the pinned flashinfer-python 0.6.18)
and makes the sparse plan's kernel imports relative so the vendored package
does not import flashinfer.attention.prims_ts.

AI-assisted.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: yunruis <205571022+yunruis@users.noreply.github.com>
yunruis added a commit to yunruis/TensorRT-LLM that referenced this pull request Oct 23, 2026
Re-pin flashinfer-prims-ts to yunruis/flashinfer@549977ef (branch
yunruis/prims-ts-sparse-mla-group-major-out): FlashInfer main at ae312f7cc
(the revision NVIDIA#20155 vendored) plus flashinfer-ai/flashinfer#5434 (native
two-source sparse MLA with fused inverse-RoPE + E4M3 output, rebased head
735e1f4f3) and flashinfer-ai/flashinfer#6345 (group-major fused output and the
2CTA schedule for short lists). This brings BatchSparseMLADecodePagedTSWrapper
into TensorRT-LLM with the output layout TRT-LLM's DeepSeek-V4 epilogue
consumes.

The compatibility patch keeps upstream's shims and additionally drops the
one-shot MLA trace template (absent from the pinned flashinfer-python 0.6.18)
and makes the sparse plan's kernel imports relative so the vendored package
does not import flashinfer.attention.prims_ts.

AI-assisted.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: yunruis <205571022+yunruis@users.noreply.github.com>
yunruis added a commit to yunruis/TensorRT-LLM that referenced this pull request Oct 24, 2026
Re-pin flashinfer-prims-ts to yunruis/flashinfer@549977ef (branch
yunruis/prims-ts-sparse-mla-group-major-out): FlashInfer main at ae312f7cc
(the revision NVIDIA#20155 vendored) plus flashinfer-ai/flashinfer#5434 (native
two-source sparse MLA with fused inverse-RoPE + E4M3 output, rebased head
735e1f4f3) and flashinfer-ai/flashinfer#6345 (group-major fused output and the
2CTA schedule for short lists). This brings BatchSparseMLADecodePagedTSWrapper
into TensorRT-LLM with the output layout TRT-LLM's DeepSeek-V4 epilogue
consumes.

The compatibility patch keeps upstream's shims and additionally drops the
one-shot MLA trace template (absent from the pinned flashinfer-python 0.6.18)
and makes the sparse plan's kernel imports relative so the vendored package
does not import flashinfer.attention.prims_ts.

AI-assisted.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: yunruis <205571022+yunruis@users.noreply.github.com>
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.

6 participants