Skip to content

[backport] feat/bench_y reuse-budget fixes onto v1.3.0rc11 (issue #13318) - #1

Closed
yifjiang wants to merge 3 commits into
v1.3.0rc11-basefrom
v1.3.0rc11-benchy-subset
Closed

[backport] feat/bench_y reuse-budget fixes onto v1.3.0rc11 (issue #13318)#1
yifjiang wants to merge 3 commits into
v1.3.0rc11-basefrom
v1.3.0rc11-benchy-subset

Conversation

@yifjiang

Copy link
Copy Markdown
Owner

Draft PR — not for upstream merge. This is a downstream-only branch on the yifjiang fork that captures the cherry-pick state used by the dynamo-trtllm v4 production image overlay (head-health-cuda-v4-benchy-rc11). PR base is v1.3.0rc11-base (a fork-side branch pointing exactly at the upstream v1.3.0rc11 tag commit 4e69c14f7), so the diff shown is exactly the three cherry-picks.

Cherry-picks (in order)

Commit Upstream PR Files Purpose
c0d22ad6c (was d9038d3b90) NVIDIA#12682 4 Introduces _estimate_post_reuse_compute() + Python-side remaining_budget re-validation in prepare_resources (catches C++ scheduler over-admission before _prepare_tp_inputs). Also patches microBatchScheduler.cpp for the C++ admission math; we keep the C++ change in source for fidelity but the production overlay only ships the Python parts.
9faa1dd27 (was 01c4947990) NVIDIA#12806 1 Pre-subtract non-first-chunk context costs from remaining_budget before first-chunk checks. Patches a bug introduced inside NVIDIA#12682's gate.
e11cedca5 (was f24dcb33e1) NVIDIA#12909 1 Disagg: pass the filtered (post-prepare_resources) batch to _recv_disagg_gen_cache, fixing CacheReceiver::requestSync unordered_map::at when a request is skipped by the budget gate. Required for our disagg deployments (Qwen3-Coder-480B).

Authors preserved (Liao Lanyu, Jin Li, Lizhi Zhou). Committer rewritten to satisfy GitHub email-privacy on this fork; signed-off-by trailers from the original commits are intact.

Why this exists

Issue NVIDIA#13318 — the C++ scheduler under-counts last-chunk reuse cost, leading to assert total_num_tokens <= self.max_num_tokens killing the event loop. The proper upstream fix is on feat/bench_y (16 commits ahead of main, 125 commits behind v1.3.0rc11). We need the fix on v1.3.0rc11 now for the Qwen3-Coder-480B deployment that crashed three times on 2026-04-22. Cherry-picking the three relevant commits onto v1.3.0rc11 is the cleanest available path until feat/bench_y lands on main and rolls into a release wheel.

Why three commits and not the whole feat/bench_y

feat/bench_y has 16 unique commits; the other 13 are DSA perf work, prefix-reuse refactor, and tests that are unrelated to this bug or are scoped to features we do not use. Importing them would broaden the patch surface for no reason.

Cherry-pick base verification

v1.3.0rc11 tag commit:        4e69c14f732a6e6afce4f71616db5b5cd2b10530
merge-base HEAD v1.3.0rc11:   4e69c14f732a6e6afce4f71616db5b5cd2b10530

Branch tip is "v1.3.0rc11 + the three cherry-picks, nothing else."

Cherry-pick result

All three commits applied via 3-way auto-merge with no conflicts. Files changed (vs v1.3.0rc11):

cpp/tensorrt_llm/batch_manager/microBatchScheduler.cpp  +43 -32
tensorrt_llm/_torch/pyexecutor/model_engine.py          +18  -0
tensorrt_llm/_torch/pyexecutor/py_executor.py          +135 -15
tensorrt_llm/_torch/pyexecutor/resource_manager.py      +84  -4
                                              total:   +280 -51

Downstream consumer

This branch is consumed by docs/build_dynamo_trtllm_head_health_cuda_v4_benchy_rc11.md in the claude-local-orchestrator repo. The dynamo-trtllm Docker build clones this branch, copies the three patched Python files (the C++ change is in source for fidelity but is not built into the image — has_trtllm_context: "0"), and overlays them on the installed tensorrt-llm==1.3.0rc11 wheel.

lancelly and others added 3 commits April 22, 2026 20:44
…ext chunking (NVIDIA#12682)

Signed-off-by: Lanyu Liao <lancelly@users.noreply.github.com>
Co-authored-by: Lanyu Liao <lancelly@users.noreply.github.com>
NVIDIA#12806)

Signed-off-by: Jin Li <59594262+liji-nv@users.noreply.github.com>
…VIDIA#12909)

Signed-off-by: Lizhi Zhou <1432185+reasonsolo@users.noreply.github.com>
@yifjiang

Copy link
Copy Markdown
Owner Author

Superseded by upstream draft PR NVIDIA#13359 — same branch, same content, opened against NVIDIA:main for CI signal and maintainer visibility. Branch v1.3.0rc11-benchy-subset remains on this fork as the canonical cherry-pick state.

@yifjiang yifjiang closed this Apr 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants