Skip to content

[https://nvbugs/6428124][fix] Include use_host_stop_criteria in the PP send/recv payload in… - #16134

Open
trtllm-agent wants to merge 2 commits into
NVIDIA:mainfrom
tensorrt-cicd:repair-bot-bug6428124
Open

[https://nvbugs/6428124][fix] Include use_host_stop_criteria in the PP send/recv payload in…#16134
trtllm-agent wants to merge 2 commits into
NVIDIA:mainfrom
tensorrt-cicd:repair-bot-bug6428124

Conversation

@trtllm-agent

@trtllm-agent trtllm-agent commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Root cause: On non-last PP ranks, sample_state.use_host_stop_criteria stayed False while the last rank's fast host-stop path produced host.finish_reasons=None, so update_requests entered process_draft_tokens with an empty finish_reasons list and raised IndexError.
  • Fix: Include use_host_stop_criteria in the PP send/recv payload in _ring_broadcast_sample_state and restore it on the receiver, using hasattr/getattr to stay compatible with non-Torch sampler flavors; remove the corresponding waives.txt entry.
  • Automated fix generated by repair-bot

Test plan

  • Verify fix on the same GPU type as the original failure
  • Check for regressions in related tests

Links

Summary by CodeRabbit

  • Bug Fixes

    • Improved pipeline-parallel generation to keep stop-criteria handling consistent across stages, helping requests stop at the expected time.
  • Chores

    • Removed one outdated test waiver from the skip list.

@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: bcdc74a8-0578-4eaa-bd94-3eb1980eb70a

📥 Commits

Reviewing files that changed from the base of the PR and between 5ce293f and 26e810c.

📒 Files selected for processing (2)
  • tensorrt_llm/_torch/pyexecutor/py_executor.py
  • tests/integration/test_lists/waives.txt
💤 Files with no reviewable changes (1)
  • tests/integration/test_lists/waives.txt

📝 Walkthrough

Walkthrough

Modified the pipeline-parallel ring broadcast of SampleState to propagate an additional use_host_stop_criteria flag alongside existing data on both receive and send paths. Also removed one test waiver entry unrelated to this change.

Changes

PP Ring Broadcast Flag Propagation

Layer / File(s) Summary
Ring broadcast flag propagation
tensorrt_llm/_torch/pyexecutor/py_executor.py
Receive path now unpacks a 3-tuple including use_host_stop_criteria and conditionally applies it to sample_state; send path appends the flag via getattr(sample_state, "use_host_stop_criteria", False) to the isend_object payload.
Test waiver removal
tests/integration/test_lists/waives.txt
Removed a waiver entry for test_lora_pp2_sanity previously skipped with reference to nvbugs/6428124.

Estimated code review effort: 2 (Simple) | ~10 minutes

Sequence Diagram(s)

sequenceDiagram
  participant PrevPPRank
  participant CurrentPPRank
  participant NextPPRank
  PrevPPRank->>CurrentPPRank: recv_object(host, py_result_diffs, use_host_stop_criteria)
  CurrentPPRank->>CurrentPPRank: set sample_state.use_host_stop_criteria if attribute exists
  CurrentPPRank->>NextPPRank: isend_object(host, py_result_diffs, use_host_stop_criteria)
Loading

Suggested reviewers: yuxianq, pcastonguay, dongxuy04

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is specific and matches the bug fix, ticket, and payload change described in the PR.
Description check ✅ Passed The PR explains the issue, fix, test plan, and bug link, but it does not follow the template headings exactly.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@chienchunhung

Copy link
Copy Markdown
Collaborator

A fix was being worked on: #16096

@trtllm-agent
trtllm-agent force-pushed the repair-bot-bug6428124 branch from 8d406d5 to 72fdc5d Compare July 20, 2026 04:44

@BowenFu BowenFu left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@trtllm-agent
trtllm-agent force-pushed the repair-bot-bug6428124 branch from 72fdc5d to d8f8ccf Compare July 22, 2026 22:10
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>
@trtllm-agent
trtllm-agent force-pushed the repair-bot-bug6428124 branch from d8f8ccf to 812d4e0 Compare July 24, 2026 07:29
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.

7 participants