[https://nvbugs/6428124][fix] Include use_host_stop_criteria in the PP send/recv payload in… - #16134
[https://nvbugs/6428124][fix] Include use_host_stop_criteria in the PP send/recv payload in…#16134trtllm-agent wants to merge 2 commits into
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
💤 Files with no reviewable changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan provides up to 12 included reviews per hour; 7 remain after this review. WalkthroughThe pipeline-parallel ring broadcast now carries ChangesPP Ring Broadcast Flag Propagation
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The change synchronizes host-stop criteria across pipeline-parallel ranks and removes the related test waiver; no actionable merge-blocking risk remains beyond normal checks and review. Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Description checkExplanation The description explains the root cause, fix, compatibility approach, waiver removal, and test intent. It is mostly complete, although it does not use the template's exact Description and Test Coverage headings or include the PR checklist confirmation. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
A fix was being worked on: #16096 |
26e810c to
8d406d5
Compare
8d406d5 to
72fdc5d
Compare
BowenFu
left a comment
There was a problem hiding this comment.
LGTM — adds use_host_stop_criteria to the PP ring send/recv payload symmetrically (send uses getattr(...,False), recv guards with hasattr); only affects multi-PP-rank sample-state broadcast, and PP=1/default bypasses the loop entirely.
72fdc5d to
d8f8ccf
Compare
d8f8ccf to
812d4e0
Compare
brnguyen2
left a comment
There was a problem hiding this comment.
use_host_stop_criteria doesn't exist anywhere in the repo — grep -rn use_host_stop_criteria tensorrt_llm/ returns only the four lines this PR adds. Neither SampleState (sampler.py:185) nor SampleStateTorch (sampler.py:1128) declares it, so the receiver's hasattr is always False and the sender's getattr(..., False) always ships the default. The change is a no-op apart from widening the payload tuple.
The stated root cause also doesn't hold: host.finish_reasons is only None when the request list is empty (sampler.py:4137/4151); there is no fast host-stop path that leaves it None with requests present.
Please drop this and restore the waives.txt entry until there's a reproduction of the actual failure.
| # criteria path leaves host.finish_reasons=None, so the flag | ||
| # governing update_requests's branching must ride the ring with | ||
| # the host state or non-last ranks index into an empty list. | ||
| if hasattr(sample_state, "use_host_stop_criteria"): |
There was a problem hiding this comment.
No SampleState subclass defines use_host_stop_criteria, so this hasattr is always False and the assignment never executes — paired with getattr(sample_state, "use_host_stop_criteria", False) on the send side, the flag round-trips as a constant False. If a flag really is needed here it has to be a declared field on the sample-state dataclass, set by the sampler; a hasattr guard just hides that it isn't.
812d4e0 to
1bc4608
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
1bc4608 to
f9189f4
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
f9189f4 to
f30412c
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
f30412c to
76c93cb
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
76c93cb to
4727810
Compare
Nemotron-H LoRA PP=2 crashed with IndexError in finish_if_reason because the last PP rank produced a SampleStateTorch with use_host_stop_criteria=True (and host.finish_reasons=None), but only sample_state.host was sent through _ring_broadcast_sample_state. Non-last ranks kept the constructor default False and tried to index into an empty finish_reasons list from process_draft_tokens. Include the flag in the PP send/recv payload and restore it on the receiver. Use getattr/hasattr to stay compatible with the TRT-LLM sampler flavor which lacks this field. Remove the corresponding waiver. Signed-off-by: trtllm-agent <296075020+trtllm-agent@users.noreply.github.com>
Signed-off-by: handongl <handongl@nvidia.com>
4727810 to
dfdc2f4
Compare
Summary
Test plan
Links
Summary by CodeRabbit
Bug Fixes
use_host_stop_criteriain the pipeline-parallel sample-state broadcast.hasattrandgetattr.Chores
Dev Engineer Review
use_host_stop_criteriaon receiving ranks.Falsewhen the sampler does not provide the attribute.IndexErrorrisk inprocess_draft_tokens.QA Engineer Review
TestNemotronHLoRA::test_lora_pp2_sanity.test-db/orqa/files changed.