Repository navigation
[#18151][feat] Admit trusted KV hints and carry immutable request metadata - #20269
Conversation
|
/bot run |
|
PR_Github #77705 [ run ] triggered by Bot. Commit: |
|
PR_Github #77705 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #77927 [ run ] triggered by Bot. Commit: |
|
PR_Github #77927 [ run ] completed with state
|
b549b2d to
61ff6a9
Compare
61ff6a9 to
8645ea4
Compare
|
/bot run --disable-fail-fast |
|
PR_Github #78251 [ run ] triggered by Bot. Commit: |
|
@Shixiaowei02 Thanks for the review. I addressed all of your comments as part of the design update.
Please take a look; thanks! |
|
PR_Github #78251 [ run ] completed with state
|
1389ebf to
4a38ad7
Compare
|
/bot run |
|
PR_Github #81617 [ run ] triggered by Bot. Commit: |
|
/bot run --disable-fail-fast |
|
PR_Github #81622 [ run ] triggered by Bot. Commit: |
|
PR_Github #81617 [ run ] completed with state |
|
PR_Github #81622 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #81749 [ run ] triggered by Bot. Commit: |
chang-l
left a comment
There was a problem hiding this comment.
Approved from the VisualGen side.
|
PR_Github #81749 [ run ] completed with state |
…st metadata Signed-off-by: Chien-Chun Hung <[email protected]>
4a38ad7 to
760abef
Compare
|
/bot run |
|
PR_Github #82072 [ run ] triggered by Bot. Commit: |
juney-nvidia
left a comment
There was a problem hiding this comment.
Approved from API perspective
JunyiXu-nv
left a comment
There was a problem hiding this comment.
Runtime/serve part LGTM.
|
PR_Github #82072 [ run ] completed with state
|
|
/bot run |
|
PR_Github #82196 [ run ] triggered by Bot. Commit: |
|
PR_Github #82196 [ run ] completed with state |
…on the current main The disaggregated frontend now registers its routes with KvHintsRoute (NVIDIA#20269), which strips kv_hints from request bodies unless the server trusts its ingress. Regenerate the route reference: the six disaggregated configurations record KvHintsRoute where they recorded APIRoute; their route sets and order are unchanged. The route-class invariant, which a regenerated reference cannot hide, now requires KvHintsRoute on every API route of the disaggregated frontend and APIRoute on the coordinator app. Dropping the KV-hint policy from the frontend fails it even after a regeneration, and both apps still reject the aggregated server's msgpack route class. The object.__new__ baseline records the sites on main at the merge base: test_kv_hints.py builds one server that way (NVIDIA#20269), and test_harmony_parsing.py no longer builds any (NVIDIA#21176). The harmony parsing tests are now registered as a whole file (NVIDIA#21411), so the node-id entry that the CPU-selection test used as its example is gone. The node-id check now runs select_entries on a one-entry list of its own, so it no longer depends on which node-id entries l0_cpu.yml holds. Signed-off-by: JunyiXu-nv <[email protected]>
Summary
Carry optional KV reuse hints through Python and HTTP requests, and freeze admitted metadata before queueing. Ignore untrusted, unsupported, oversized or malformed envelopes without changing ordinary request validation or required P/D handoff.
Scope
This PR does not execute actions or activate a backend. gRPC hint transport is not included. Explicit logging of serialized hints still requires redaction.
Verification
Current head:
760abefe826af867b1d304ffb4c3d9eafd8a589a.The CI failure was
TestNanoV3Omni::test_auto_dtype[fp8]inDGX_H100-PyTorch-4. Its MPI worker aborted in PyTorch shared-memory cleanup withcould not unlink the shared memory file. The same error appears in other PRs; the captured failure has no hint-related code fingerprint. No product code or test waiver was added.In #67707, the x86 multi-GPU dispatch was blocked by the incomplete single-GPU stage. The approval label was accepted, and SBSA multi-GPU passed. Recovery #67823 started at 2026-11-03 04:52 UTC after this single rerun request. It must complete the H100 stage and the previously blocked x86 multi-GPU coverage before CI can be reported as passing.
Current-head targeted test commands and complete results
1,296 tests passed in 173.20 seconds, with no failures, errors or skips, on one H200 NVL. The run used normal TensorRT-LLM imports, native bindings and repository pytest plugins, including
pytest-threadleak.tests/unittest/llmapi/test_kv_hints.pytests/unittest/disaggregated/test_kv_hint_selection.pytests/unittest/api_stability/tests/unittest/_torch/visual_gen/test_attention_importable.pytests/unittest/llmapi/test_trtllm_serve_config_schemas.pytests/unittest/others/test_maintain_prims_ts.pytests/unittest/others/test_vendor_bot.pytests/unittest/scripts/test_bolt.pytests/unittest/scripts/test_perf_agentx_aiperf_probe.pytests/unittest/scripts/test_perf_agentx_client.pytests/unittest/_torch/pyexecutor/test_request_utils.pytests/unittest/executor/test_generation_request_array_prompt.pytests/unittest/executor/test_proxy_request_sender.pytests/unittest/disaggregated/test_disagg_openai_client.pytests/unittest/llmapi/apps/test_openai_protocol_chat_agent_fields.pyAll 2,372 package Python files and all 31 changed files matched the frozen source before and after execution. The native wheel came from PostMerge #3050, source
b6bb149fac583ed231f807047d909e4d250bfede; its complete C++ tree and build/dependency inputs match the PR base. The runtime used PyTorch 26.09 and CUDA 13.4. This run reused compatible native artifacts; it did not rebuild native code or run model inference, GPU-kernel correctness tests, or actual multi-rank serving.All required hooks passed for the published commit. Source review,
git diff --check, and syntax checks of all 26 changed Python files passed. Targeted test results below were retained from the verified run at this head.Previous-head verification and CI
At
4a38ad70b0409159f0d1bf9b92a4c472795ff01b, 196 distinct targeted tests passed on one H200 NVL. Three additional 48-case HTTP ingress runs brought the total to 340 successful executions, with no failures, errors or skips. Normal package imports, native bindings and repository pytest plugins were enabled. This evidence is historical and does not validate the rebased revision.The previous-head CI result is green. Run #67288 executed the broad build and test matrix. Run #67406 reused its successful results and reran the failed B200 MoE wrapper on the same SHA; both inner tests passed. No failure waiver cleared that test. Run #67406 was a recovery run, not a fresh execution of the complete matrix.
Earlier verification on prior revisions
At
1389ebfd6d65d4538c90f85a74b8e22d5cc15351, 1,031 tests passed, with no failures, errors or skips, in 248.28 seconds on one H200. This broader run used normal TensorRT-LLM imports, native bindings and repository pytest plugins, without import stubs or a marker filter. It included the child-request hint inheritance regression test.All 2,138 tracked package Python files matched that source snapshot before and after the run. That earlier run used compatible native artifacts from CI #67130. Full-diff self-review before and after that rebase, diff checks and required hooks passed for that revision.
CI build 66524 at
9f2fad264b50a70519764a8d2d4dc4cb0e0848a2recorded 88,975 passed, 0 failed and 12,577 skipped. It was marked unstable because both multi-GPU dispatches were blocked by the missing approval label.Other earlier evidence: 10 candidate tests passed at
efeb4088; 157 selected tests passed at9f2fad2; nine timeout/recovery tests passed atee1790eb; and 694 selected tests passed on B300 atee8242a, including the earlier subprocess-timeout and Blackwell numerical cases. No numerical threshold was changed.Request-broadcast measurements (before rebase)
These tables are historical evidence for
efeb4088ae5bf64f7472fcdac0c863ec05b7a00b. They have not been rerun on the current head. These measurements exclude admission, including the new JSON and MessagePack checks. The rebase adopted upstream request-field collection and child-request construction changes; it retained full-envelope transport.A standalone benchmark exercised the real
RequestBroadcasterwith native requests andMPIDiston one AMD EPYC 7313P node with two H800 NVL GPUs. The tested source was9f2fad264b50a70519764a8d2d4dc4cb0e0848a2plus candidate-helper, test, and documentation changes now committed asefeb4088ae5bf64f7472fcdac0c863ec05b7a00b(patch SHA256229e3c0157c9289471dc5f19e5856c265c31683d91cf71489ee5a2f1342ed32b). The measured broadcast code matches that pre-rebase revision. A compatible prebuilt native wheel was used; this was not a full native rebuild.For TP2, batch size 1, and 256-token requests, each trial offered 10,000 requests/s for 5 seconds. Values below are medians across three trials.
The 64 KiB case completed 9,631–10,000 requests/s across trials and accumulated backlog in some trials. Its worst trial had 189 ms p99 lateness against the synthetic arrival schedule. At batch size 32 and the same offered rate, all sizes completed approximately 10,000 requests/s. In separate saturated TP2 trials with batch size 32 (200 broadcasts per trial, three trials), component throughput fell from 78,514 requests/s without hints to 29,554 with 64 KiB (62.4% lower).
The wider matrix also covered synchronous PP2, long prompts, and batches that crossed the MPI chunk boundary. All seven runs completed, and cross-rank payload checks passed. Prebuilt requests isolate metadata collection, serialization, communication, and receiver deserialization. These results exclude admission, model execution, provider access, and serving TTFT; they do not qualify TorchDist/NCCL or multiple nodes. Large hints with short inputs are transport stress cases, not verified reuse workloads.
Full-envelope broadcast remains unchanged. The measured cost is material at the maximum envelope size. Selecting on rank 0 remains a possible optimization that needs a defined selection owner and a common decision for all ranks. The benchmark is outside the PR diff; these measurements do not establish production performance acceptance.
Complete aggregate results — all 57 measured configurations
The tables contain every non-smoke configuration from the six measurement runs. Each configuration has three trials; 57 × 3 trials plus six smoke checks give 177 cases per rank, or 354 rank-trials across two ranks. All runs completed, with no missing cases or cross-rank payload mismatches.
Smoke check
Passed six smoke cases per rank. These checks validate execution and payloads; their timings are not performance results.
TP2, 256-token requests — initial trials (200 broadcasts per trial)
Synchronous PP2, 256-token requests (100 broadcasts per trial)
TP2, 131,072-token requests (100 broadcasts per trial)
TP2, batch 128 — MPI chunk stress (100 broadcasts per trial)
TP2, batch 1 — five-second arrival windows (50,000 broadcasts per trial)
TP2, batch 32 — 6.4-second arrival windows (2,000 broadcasts per trial)
Notes
Related to #18151 and #18153. One signed implementation commit is based on
mainatcbef70dbc9879798b4106c694928d59976cf0ac1, with no dependency on backend or lender integration PRs.api-compatible, and no new dependencies or LLM configuration fields.