[https://nvbugs/6426886][fix] Forward use_host_stop_criteria alongside sample_state.host and py_result_diffs… - #16149
Closed
trtllm-agent wants to merge 1 commit into
Closed
Conversation
TestDeepSeekV3Lite::test_nvfp4_4gpus[...pp4-fp8kv=True-attention_dp=True- cuda_graph=True-overlap_scheduler=True...] hung and MPI_Aborted on PP=4. Just before the hang, ranks 0/1/2 raised IndexError: list index out of range in finish_if_reason at sampler.py:2775 while indexing an empty finish_reasons list. The last PP rank runs the fast-greedy path with use_host_stop_criteria=True, which suppresses population of finish_reasons_host on the SampleStateTorch. _ring_broadcast_sample_state only forwarded (sample_state.host, py_result_diffs) to non-last PP ranks, so their sample_state.use_host_stop_criteria stayed at the constructor default False. Non-last ranks then entered the process_draft_tokens branch in update_requests and raised IndexError on the empty finish_reasons list. The exception killed the executor loop, peer ranks stalled in MPI collectives, HangDetector fired and MPI_Abort was triggered. Include use_host_stop_criteria in the PP ring payload and restore it on the receiver. Guarded with hasattr/getattr so sampler flavors without the field (e.g. SampleStateTRTLLM) are unaffected. Signed-off-by: trtllm-agent <296075020+trtllm-agent@users.noreply.github.com>
Contributor
|
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 (1)
📝 WalkthroughWalkthroughThe PP ring broadcast in py_executor.py now transmits a use_host_stop_criteria flag alongside existing sample state data. The receiving side unpacks and conditionally applies this flag to sample_state, ensuring non-last pipeline-parallel ranks maintain consistent host-stop behavior with the last rank. ChangesHost-Stop Criteria Broadcast Fix
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Collaborator
|
Duplicate of #16133 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test plan
Links
Summary by CodeRabbit