[TRTLLM-14155][fix] Revert host-side greedy stop checks from #15920 - #16163
Conversation
📝 WalkthroughWalkthroughThis change removes the host stop-criteria fast path from ChangesHost stop-criteria fast-path removal
Estimated code review effort: 3 (Moderate) | ~25 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tensorrt_llm/_torch/pyexecutor/sampler/sampler.py`:
- Line 3787: The `sample_async` unpacking includes `seq_lens_host`, but that
symbol is never used afterward and triggers RUF059. Update the unpacking near
`sample_async` so only the needed values are assigned, or replace the unused
slot with a throwaway placeholder, while keeping the existing `seq_lens_cuda`
flow into `write_finish_reasons` and `_update_original_tokens` intact.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 17372634-8982-4a48-86a9-579f058c810d
📒 Files selected for processing (2)
tensorrt_llm/_torch/pyexecutor/sampler/sampler.pytests/unittest/_torch/sampler/test_torch_sampler.py
💤 Files with no reviewable changes (1)
- tests/unittest/_torch/sampler/test_torch_sampler.py
|
/bot run --add-multi-gpu-test --disable-fail-fast |
|
PR_Github #58364 [ run ] triggered by Bot. Commit: |
This reverts commit 4f1c3cd. Signed-off-by: Mingyang Hao <200044211+mingyangHao@users.noreply.github.com>
d0a65db to
6fcfd81
Compare
|
/bot skip --comment "Bring TOT main back to normal" |
|
PR_Github #58390 [ skip ] triggered by Bot. Commit: |
|
PR_Github #58364 [ run ] completed with state |
|
PR_Github #58390 [ skip ] completed with state |
Reland the host-side greedy stop-criteria fast path from NVIDIA#15920 after its temporary revert in NVIDIA#16163. Signed-off-by: Mingyang Hao <200044211+mingyangHao@users.noreply.github.com>
The TorchSampler IndexError described in nvbug 6435097 was introduced by PR NVIDIA#15920 ("Move greedy stop checks to host") and cleanly reverted by PR NVIDIA#16163 (commit 9a8ec05). PR NVIDIA#16163 is already present at HEAD, so the underlying code bug is fixed. The waiver at nvbugs/6427411 for test_ctx_pp_gen_tp_asymmetric[GSM8K-gen_tp=1-ctx_pp=2] was added by PRs NVIDIA#16103 / NVIDIA#16105 / NVIDIA#16127 before the revert landed and was not cleaned up afterward. Verified locally on this HEAD (e523b43): pytest tests/integration/defs/accuracy/test_disaggregated_serving.py::\ TestLlama3_1_8BInstruct::test_ctx_pp_gen_tp_asymmetric[GSM8K-gen_tp=1-ctx_pp=2] -> PASSED, GSM8K accuracy = 73.465 (threshold 70.997). Signed-off-by: trtllm-agent <296075020+trtllm-agent@users.noreply.github.com>
The TorchSampler IndexError described in nvbug 6435097 was introduced by PR NVIDIA#15920 ("Move greedy stop checks to host") and cleanly reverted by PR NVIDIA#16163 (commit 9a8ec05). PR NVIDIA#16163 is already present at HEAD, so the underlying code bug is fixed. The waiver at nvbugs/6427411 for test_ctx_pp_gen_tp_asymmetric[GSM8K-gen_tp=1-ctx_pp=2] was added by PRs NVIDIA#16103 / NVIDIA#16105 / NVIDIA#16127 before the revert landed and was not cleaned up afterward. Verified locally on this HEAD (e523b43): pytest tests/integration/defs/accuracy/test_disaggregated_serving.py::\ TestLlama3_1_8BInstruct::test_ctx_pp_gen_tp_asymmetric[GSM8K-gen_tp=1-ctx_pp=2] -> PASSED, GSM8K accuracy = 73.465 (threshold 70.997). Signed-off-by: trtllm-agent <296075020+trtllm-agent@users.noreply.github.com>
This reverts commit 4f1c3cd.
Summary by CodeRabbit
Description
Test Coverage
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-compatibleorapi-breaking. Forapi-breaking, includeBREAKINGin 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.