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

    • Propagated use_host_stop_criteria in the pipeline-parallel sample-state broadcast.
    • Preserved sampler compatibility with hasattr and getattr.
    • Prevented inconsistent stop-criteria state across pipeline stages.
  • Chores

    • Removed the outdated Nemotron-H LoRA pipeline-parallel waiver.

Dev Engineer Review

  • The broadcast fix restores use_host_stop_criteria on receiving ranks.
  • Sending ranks use False when the sampler does not provide the attribute.
  • The change addresses the IndexError risk in process_draft_tokens.
  • The waiver removal uses the existing test path and bug reference format.
  • No public API declarations changed.

QA Engineer Review

  • Removed the waiver for TestNemotronHLoRA::test_lora_pp2_sanity.
  • No test code changed.
  • No test-db/ or qa/ files changed.
  • Verdict: needs follow-up because CBTS coverage data is unavailable.

@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

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: 244cc875-b3b8-4063-8994-da3cecdf8dc2

📥 Commits

Reviewing files that changed from the base of the PR and between 16260e5 and 76c93cb.

📒 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
🚧 Files skipped from review as they are similar to previous changes (1)
  • tensorrt_llm/_torch/pyexecutor/py_executor.py

Included review availability: Your plan provides up to 12 included reviews per hour; 7 remain after this review.


Walkthrough

The pipeline-parallel ring broadcast now carries use_host_stop_criteria with host state and result diffs. The integration waiver list no longer skips the Nemotron-H LoRA pipeline-parallel sanity test.

Changes

PP Ring Broadcast Flag Propagation

Layer / File(s) Summary
Ring broadcast flag propagation and validation
tensorrt_llm/_torch/pyexecutor/py_executor.py, tests/integration/test_lists/waives.txt
The receive path applies the received flag when supported. The send path includes the flag and uses False when the attribute is unavailable. The waiver for TestNemotronHLoRA::test_lora_pp2_sanity is removed.

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

Merge Risk: ⚪ Minimal · up to 76c93

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

  • NVIDIA/TensorRT-LLM#15585: Both pull requests modify the integration test waiver list, but they address different tests and issues.

Suggested reviewers: byshiue, mlefeb01, mzweilz

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the NVBugs fix and the primary change: adding use_host_stop_criteria to the PP send/recv payload.
Description check ✅ Passed 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 Coverag…
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.
Full details: Description check

Explanation

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)
  • 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
Contributor

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

@brnguyen2 brnguyen2 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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"):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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.

@trtllm-agent
trtllm-agent force-pushed the repair-bot-bug6428124 branch from 812d4e0 to 1bc4608 Compare August 15, 2026 22:25
@coderabbitai

coderabbitai Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

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.

@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

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.

@trtllm-agent
trtllm-agent force-pushed the repair-bot-bug6428124 branch from f9189f4 to f30412c Compare August 22, 2026 09:35
@coderabbitai

coderabbitai Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

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.

@trtllm-agent
trtllm-agent force-pushed the repair-bot-bug6428124 branch from f30412c to 76c93cb Compare August 26, 2026 13:56
@coderabbitai

coderabbitai Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

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.

@trtllm-agent
trtllm-agent force-pushed the repair-bot-bug6428124 branch from 76c93cb to 4727810 Compare August 28, 2026 06:39
trtllm-agent and others added 2 commits August 30, 2026 09:24
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 4727810 to dfdc2f4 Compare August 30, 2026 16:26
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.

8 participants