Repository navigation
Conversation
|
@yuxianq — vendor promotion needs author action: The pinned temporary source commit Fix: Fetch The bot will recheck automatically on a later poll. |
47a02ee to
d575c3f
Compare
|
/bot run |
|
PR_Github #76928 [ run ] triggered by Bot. Commit: |
|
PR_Github #76928 [ run ] completed with state
|
|
@yuxianq — the PrimTS upstream refresh #20155 has merged. Please update this source-update PR before merging it. The new canonical source branch is
The publishing bot now targets the new dated canonical branch. After this source-update PR merges, its lock-only promotion will target that branch. The old |
8298aba to
72a6cea
Compare
|
/bot run |
|
PR_Github #77492 [ run ] triggered by Bot. Commit: |
|
PR_Github #77492 [ run ] completed with state
|
Vendor validation:
|
Vendor validation:
|
Vendor validation:
|
Vendor validation:
|
Vendor validation:
|
72a6cea to
d829f61
Compare
|
/bot run |
Vendor validation:
|
👎 Promotion blocked, new vulnerability foundVulnerability report
|
Import FlashInfer 75961f74dac2c438cd7bce3dd135d527e78e49ec from prims-ts-mla-prefill--flashinfer. This consolidates the functional vendor refresh and its rebase/ABI fixups without changing the pinned source or generated bytes. The runtime exposes store_softmax_stats for continuous/paged context, standard decode, and MLA decode. These statistics enable cached/chunked MLA partial-output merging. Dense-Q scheduling optimization is deliberately excluded and reviewed separately. Signed-off-by: Yuxian Qiu <142763828+yuxianq@users.noreply.github.com>
…patch Add mla_context_preprocess with caller-owned buffers. Reuse RoPE/cache append and FP8 QKV quantization, allow preprocessed cached/chunked inputs, and pack the strided V projection. This commit adds the prologue contract only; the PrimTS adapter follows separately. Signed-off-by: Yuxian Qiu <142763828+yuxianq@users.noreply.github.com>
Route fresh, cached and chunked MLA prefill through the planned PrimTS context wrapper, including FP8 scales and merge-compatible softmax statistics. Preserve full cached K/V spans and account for BF16 V-packing workspace. Fold the FMHA-field and statistics-API rebase adaptations into this implementation. Correct MLA generation to require query-only input (is_fused_qkv=False), matching PhasedFmha. Include selector/contract and workspace tests; Rubin enablement and performance scheduling are separate commits. Signed-off-by: Yuxian Qiu <142763828+yuxianq@users.noreply.github.com>
Add K3 full-attention coverage for fresh/cached/chunked prefill, BF16/FP8 KV, TP/attention-DP heads, and CUDA graph decode. Check fresh prefill against independent FP64 math after preprocessing; retain direct backend comparisons for cached/chunk-merged prefill and decode. Add forced-PrimTS GSM8K CI cases, supported KvCacheConfig dtype selection, and the missing FP8-KV reference without relaxing accuracy thresholds. Hecate qualification on the equivalent full functional snapshot passed 1319 examples per dtype (BF16 96.058%, FP8 96.740%). Scheduling optimization is not part of this commit. Signed-off-by: Yuxian Qiu <142763828+yuxianq@users.noreply.github.com>
Keep Blackwell on the existing DSL 4.7 minimum and require DSL 4.8 for SM107, retaining the compiler 13.3 gate. Extend availability tests and full-attention test collection to Rubin. This is architecture enablement only, not the dense-Q scheduling optimization. Signed-off-by: Yuxian Qiu <142763828+yuxianq@users.noreply.github.com>
Signed-off-by: Yuxian Qiu <142763828+yuxianq@users.noreply.github.com>
Signed-off-by: Yuxian Qiu <142763828+yuxianq@users.noreply.github.com>
Permit explicit MLA context calls under linear speculative metadata, retaining tree, custom-mask, mixed-phase and Helix-context exclusions. Cover causal fresh/final chunks, FULL cached chunks, FP8 statistics and live metadata reuse. Validation: 363 adapter tests and 8 Kimi K3 module tests passed with no skips in the matching Rubin runtime; two independent review passes and pre-commit passed. Full-model MTP qualification remains separate. Signed-off-by: Yuxian Qiu <142763828+yuxianq@users.noreply.github.com>
Signed-off-by: Yuxian Qiu <142763828+yuxianq@users.noreply.github.com>
Add the FP8 MLA DSpark7 integration case to the existing eight-GPU CI stage. Propagate strict target FMHA selection to pre-existing workers, restore each worker environment, and cover success and failure cleanup with CPU regressions. Preserve existing model resources, GSM8K criteria, acceptance length, and FP32 KDA state. Signed-off-by: Yuxian Qiu <142763828+yuxianq@users.noreply.github.com>
Preserve the static PrimTS capability contract after rebasing onto the shared MLA routing helper. SM107 FP8 pages are not exclusive to CuTe DSL once PrimTS supports them. Signed-off-by: Yuxian Qiu <142763828+yuxianq@users.noreply.github.com>
Signed-off-by: Yuxian Qiu <142763828+yuxianq@users.noreply.github.com>
Signed-off-by: Yuxian Qiu <142763828+yuxianq@users.noreply.github.com>
Avoid repeated workspace policy and sizing work on warmed eager MLA calls. Scope scalar sizes to the prepared KV capacity, invalidate dependent plans when that capacity changes, and preserve workspace allocation and CUDA graph capture checks. Signed-off-by: Yuxian Qiu <142763828+yuxianq@users.noreply.github.com>
Import the separately reviewed FlashInfer single-split, packed-query pruning, LDRED and runtime-KV domain optimizations from the published temporary source branch. Preserve main compatibility adaptations and the functionality/performance split. The materialized production tree matches the Rubin-validated source, except for the independently audited block-sparse metadata compatibility fix from main. Keep the benchmark results scoped to their frozen pre-rebase runtime. Signed-off-by: Yuxian Qiu <142763828+yuxianq@users.noreply.github.com>
d829f61 to
0c80a0c
Compare
Vendor validation:
|
|
/bot run --extra-stage "GB300-8_GPUs-2_Nodes-PyTorch-SingleNvlinkDomain-Post-Merge-1" |
Vendor validation:
|
|
PR_Github #81839 [ run ] triggered by Bot. Commit: |
|
PR_Github #81839 [ run ] completed with state
|
Forward the trailing disabled KV-bounds operand through the downstream prepared launcher and regenerate the vendor compatibility patch with the vendor toolkit. Cover host argument parity for both cache layouts and workspace modes, and exercise prepared execution after persistent-kernel reload. Signed-off-by: Yuxian Qiu <142763828+yuxianq@users.noreply.github.com>
Signed-off-by: Yuxian Qiu <142763828+yuxianq@users.noreply.github.com>
…ging Signed-off-by: Yuxian Qiu <142763828+yuxianq@users.noreply.github.com>
Signed-off-by: Yuxian Qiu <142763828+yuxianq@users.noreply.github.com>
Vendor validation:
|
Vendor validation:
|
|
/bot run --disable-fail-fast --extra-stage "GB300-8_GPUs-2_Nodes-PyTorch-SingleNvlinkDomain-Post-Merge-1" |
Vendor validation:
|
|
PR_Github #81855 [ run ] triggered by Bot. Commit: |
@coderabbitai summary
Description
Integrate non-absorbed MLA prefill into
PrimsTSFmha, so Kimi K3 full-attention layers can use PrimTS for context and decode with BF16 or FP8 target KV cache. Add linear MTP and Helix per-query KV-bound integration. KDA execution and the default FMHA library list are unchanged; dense PrimTS remains opt-in.Delivery snapshot: TRT-LLM
a7da965b611830fbc1347e84646b687adc177f67, with FlashInfer source pin069139a65aad98f3e5c61f049c761e28eff0b14e. The corrected dev source passed its 21-case Rubin rerun, and the final TRT-LLM source passed 26 matching-runtime B200 regression checks.Review order
Functionality and performance remain separate commits. Review the native context-preparation interface, MLA context integration, MTP/Helix bounds, and tests first. The performance section is independently separable:
The functionality-only checkpoint is
f5f0ba48b3, with the published functionality source pindf3434b1dc23df96527e202aa43ae233ed8641ee. It is followed by these four performance commits:e486a17897: normalize dense MLA context capacity buckets.c14e0abc43: precompile selected dense MLA profiles before readiness.dd49775236: cache MLA workspace sizes by request geometry.0c80a0cfc6: import the separately committed FlashInfer kernel optimizations: bounded SM107 single-split MLA decode, packed-query tile pruning, full-tile LDRED, and request-length-bounded dense KV work.The FlashInfer optimizations retain individual commits in the pinned source history, rather than being folded into the functionality commits.
Four subsequent correctness/test commits remain separate:
6f075ff46486ebe3dc6a427317fa6247f906cbf8: restore the prepared sparse MLA callable's trailing optional operand, with source/ABI regression coverage and the matching vendor compatibility patch.0299c41c78b1e2444d0282f04318c756a6b4f0de: initialize PrimTS warmup collaborators in phase-selective test fixtures.06b382b78c3a06c982e6ab0bbb3c5b429ed66c3f: retain original natural softmax scales for partition statistics, update the vendor pin, and pass the existing FP8 preparation buffer's natural-scale view alongside its base-2 view. This correctness fix is distinct from the performance commits.a7da965b611830fbc1347e84646b687adc177f67: preserve the rounded FP32 attention-sink anchor in the older dev implementation. An explicit nearest-even multiplication prevents contraction with the subsequent subtraction; statistics-disabled behavior is unchanged.Vendored source
The lock points to the temporary branch
yuxianq:prims-ts-mla-prefill--flashinferat069139a65aad98f3e5c61f049c761e28eff0b14e. It descends from canonicaltrtllm-prims-ts-dev-20261012ataa709061230a58858375c513056e7733fa74294a; the canonical branch is not modified.The vendor tree and immutable lock are maintained with
scripts/vendor/manage.py. The 101-file selected production tree now includes the original-scale statistics fix and dev-only explicit sink-anchor rounding. TRT-LLM's explicit compatibility patch preserves main'sq_token_kv_block_sparse_metadata.pyfix from #20911 and supplies the prepared sparse MLA call's trailing optional operand. These adaptations are outside the measured dense-context performance changes. Other vendor entries are unchanged; this newer source is not represented as byte-identical to the historical performance snapshot.The corresponding main-based FlashInfer work is FlashInfer #5489, published at
005d91701b95e88a3495da84e6d384efccc606d7on base3bcec819fc4531ce18591d5ced9e478297212ad8. Its 104 selected Rubin cases passed with zero skips. Main's broader packed-query pruning is already provided by FlashInfer #6774.The upstream port preserves main's scalar scale API, independent base-2 LSE, runtime Q/K bounds, output-quantization arguments, and split-capacity planning. The older dev branch retains its device-tensor scale interface: statistics-enabled context overrides bind both original natural and base-2 scale tensors. TRT-LLM reuses the two views already emitted by native FP8 preparation; it does not reconstruct the natural scale from the rounded base-2 value. The resolutions below document these actual adaptations, not exact-patch matches or permission to drop them during a future canonical refresh.
Test Coverage
Publication and rebase checks
5d86481f60bdb137c1a2ecd283125f8d944c3635, with before/after commit-range and file-set audits. Preserved main's phased context helper, architecture-capability set, and newer CI entries. Dropped only the executor-mapping backport already present upstream.0c80a0cfc6exposed prepared-sparse launch-ABI and phase-fixture initialization regressions; the separate6f075ffand0299c41fixes are included. That failed run does not qualify the currenta7da965snapshot.005d917with zero skips: context 31, standard decode 38, and MLA 35. This is full-source wrapper/kernel qualification, not a new K3 end-to-end or performance result.eef263b's original-scale sink case[2-disabled]. The dev helper could contract the maximum multiplication with the sink subtraction, using a different anchor from the separately rounded published maximum. Source069139anow explicitly usesNEAREST_EVENmultiplication before subtraction; upstream's different implementation passed all eight corresponding regressions and does not need this dev-only patch.069139awith zero skips, including the previously failing sink case, without weakening tolerances. Explicit nearest-even multiplication preserves the rounded FP32 maximum before sink subtraction; the CPU counterexample and actual DSL IR also verify the rounding boundary. The allocation completed successfully after its gated benchmark.a7da965b611830fbc1347e84646b687adc177f67: four sparse MLA GPU regressions (graph replay, one/two-pool prepared launches, and cold/persistent-cache reload), four CPU ABI cases, two warmup-fixture cases, and 16 context-scale/plan-reuse cases. The runtime reused CI's immutable0c80a0cfc6DLFW native wheel plus the complete reviewed eight-file Python delta; Git verification confirmed no native/build changes. All 101 vendored files and source/test hashes were bound to the qualification manifest. Torch/CUDA 13.4, CUTLASS DSL 4.8.0, FlashInfer 0.7.2, and the actual SM100 GPU were verified. This is focused matching-runtime qualification, not a new complete native build or full-model run.Main-based prepared-context comparison on Rubin
After the correctness gates passed, 36 fresh-process receipts completed three ABBA blocks per case. Baseline
e2203f939e6c95475d7ec609fadfb916c04a2becand candidate005d91701b95e88a3495da84e6d384efccc606d7contain the same original-scale correctness change. Their production delta is only full-tile dense LDRED plus request-local dense KV domains. Both use actual runtime Q/K maxima.All cases use packed dense FP8 E4M3 attention, H96, Dqk192/Dv128, and BF16 output. The one-request cases use Q/K lengths 1920/1920 and Q/K capacities 2048/2048. The two-request case uses Q lengths
[1664,256], K lengths[0,3840], and capacities Q2048/K4096. All eager, graph, and post-timing numerical checks passed; input identities were unchanged. An independent audit recomputed all 360 raw CUDA-event samples, receipt medians, and nine block summaries. The means of paired block ratios are reported, with sample SD across three blocks.This is one-allocation prepared-wrapper graph replay, not a CuTeDSL/trtllm-gen comparison or a new K3 end-to-end result. The large empty-partition gain does not establish how frequently that geometry occurs in serving. Statistics ON/OFF also changes precision policy, so their absolute-time difference is not an isolated statistics-store cost.
Functionality-only Kimi K3 qualification on Rubin
26e9b3b33cplus FlashInferd9f0146; published source-equivalent functionality commitdf3434b1d), not every current-main combination.Controlled DEP16 performance experiment on Rubin
The performance experiment used FP8 target KV/P128, TP16/EP16 with attention DP, DSpark5 (six target query tokens per verification step), chunked prefill, overlap scheduling, and CUDA graphs. Both policies used the same BF16 KDA state and engine prefill path; drafter KV remained BF16/P32. The fixed workload was 4,096 input / 256 output tokens at concurrency 128 and 256, seed 42, temperature 0, and ignore-EOS. This is an aggregated-serving comparison, not the original disaggregated AgentX workload.
Three allocation-bounded ABBA blocks produced 24 accepted measured windows. All measurements were retained; sealed-source/artifact and compilation-log audits passed. Observed native compilation warnings were confined to startup; no matching compilation markers occurred in accepted measured windows. This does not prove zero unlogged JIT.
This supports near throughput parity in this workload, not a robust speedup, statistical equivalence, or noninferiority claim. Policy TPS columns are arithmetic means; percentage changes are means of paired block ratios. The experiment used the pre-rebase TRT
be927b7015runtime and the source-equivalent FlashInfer30e7ea65/76e822974kernels. It is not a latest-main native performance result or a causal before/after comparison across different allocation series.Accuracy and scope limits
PR Checklist
Please review the following before submitting this PR:
GitHub Bot Help
To see available CI bot commands, comment
/bot help.