Skip to content

[https://nvbugs/6428063][fix] Include use_host_stop_criteria in the PP ring-broadcast payload (sender uses… - #16136

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

[https://nvbugs/6428063][fix] Include use_host_stop_criteria in the PP ring-broadcast payload (sender uses…#16136
trtllm-agent wants to merge 2 commits into
NVIDIA:mainfrom
tensorrt-cicd:repair-bot-bug6428063

Conversation

@trtllm-agent

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

Copy link
Copy Markdown
Collaborator

Summary

  • Root cause: PR [None][perf] Move greedy stop checks to host #15920's new SampleStateTorch.use_host_stop_criteria flag was set only on the last PP rank; non-last PP ranks received sample_state.host with finish_reasons=None but kept the local default False, hitting the process_draft_tokens branch which indexed an empty list.
  • Fix: Include use_host_stop_criteria in the PP ring-broadcast payload (sender uses getattr default False; receiver assigns via hasattr guard) so all PP ranks agree on the sampler fast-path decision; also removed the corresponding waiver line.
  • 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 handling of pipeline-stage message exchange so additional stop-criteria state is preserved during asynchronous processing.
    • Reduced the chance of inconsistent generation behavior across stages by keeping sender and receiver state in sync.
  • Tests

    • Removed an outdated test waiver from the integration test 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: 0582325d-513e-4312-8278-f062be4752c7

📥 Commits

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

📒 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

This PR modifies the PP ring broadcast protocol in py_executor.py to send and receive an additional use_host_stop_criteria boolean alongside sample_state, and removes an obsolete test waiver entry from waives.txt.

Changes

Ring Broadcast Protocol Update

Layer / File(s) Summary
Propagate use_host_stop_criteria in ring broadcast
tensorrt_llm/_torch/pyexecutor/py_executor.py
Receive-side unpacks an additional use_host_stop_criteria from recv_object and assigns it to sample_state; send-side includes getattr(sample_state, "use_host_stop_criteria", False) when calling isend_object.

Test Waiver Cleanup

Layer / File(s) Summary
Remove obsolete waiver
tests/integration/test_lists/waives.txt
Removes the SKIP entry for test_nvfp4_4gpus (CUTLASS, mtp_nextn=0, pp4, fp8kv=True, torch_compile=True) referencing nvbugs/6428063.

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

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is specific and matches the main fix to the PP ring-broadcast payload.
Description check ✅ Passed The description includes summary, test plan, and bug link, but omits the PR Checklist section.
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.

@trtllm-agent
trtllm-agent force-pushed the repair-bot-bug6428063 branch 2 times, most recently from 42a35e8 to 41705fc Compare July 13, 2026 09:36
PR NVIDIA#15920 introduced a fast path in TorchSampler that skips writing
finish_reasons to host when all requests are greedy, single-beam, and
have no stop words. In pipeline-parallel mode with disable_overlap_scheduler=False,
only the last PP rank runs sample_async and knows the fast path was taken;
non-last PP ranks construct SampleState in _forward_step_inter_pp with the
default use_host_stop_criteria=False. The ring-broadcast payload sent only
sample_state.host, so non-last ranks ended up with finish_reasons=None but
use_host_stop_criteria=False, falling through to process_draft_tokens ->
finish_if_reason which indexed an empty list and raised IndexError.

Include use_host_stop_criteria in the PP ring-broadcast payload so all ranks
agree on which update_requests branch to take. Guard with getattr/hasattr so
SampleStateTRTLLM (which lacks this field) is unaffected. Remove the waiver
for the affected test.

Signed-off-by: trtllm-agent <296075020+trtllm-agent@users.noreply.github.com>
Signed-off-by: trtllm-agent <296075020+trtllm-agent@users.noreply.github.com>
@trtllm-agent
trtllm-agent force-pushed the repair-bot-bug6428063 branch from 41705fc to e2bfdb4 Compare July 13, 2026 17:45
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.

2 participants