Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions tensorrt_llm/_torch/pyexecutor/py_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -3199,10 +3199,18 @@ def _ring_broadcast_sample_state(
if not self.dist.is_last_pp_rank:
# Receive tokens from previous pp rank (w.r.t model forward direction)
with nvtx_range("recv_sample_state"):
sample_state.host, py_result_diffs = self.dist.recv_object(
src=self.dist.prev_pp_rank,
tag=tag,
)
(sample_state.host, py_result_diffs,
use_host_stop_criteria) = self.dist.recv_object(
src=self.dist.prev_pp_rank,
tag=tag,
)

# The last PP rank owns the sampling shape. Its fast host stop
# 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.

sample_state.use_host_stop_criteria = use_host_stop_criteria

for request, py_result_diff in zip(requests, py_result_diffs):
request.py_result.apply_diff(py_result_diff)
Expand All @@ -3220,7 +3228,8 @@ def _ring_broadcast_sample_state(
self.wait_on_pp_send_handles(self.send_handles, microbatch_id)
with nvtx_range("send_sample_state"):
self.send_handles[microbatch_id] = self.dist.isend_object(
(sample_state.host, py_result_diffs),
(sample_state.host, py_result_diffs,
getattr(sample_state, "use_host_stop_criteria", False)),
dest=self.dist.next_pp_rank,
tag=tag,
)
Expand Down
1 change: 0 additions & 1 deletion tests/integration/test_lists/waives.txt
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,6 @@ unittest/_torch/attention/test_attention_backends.py::test_attention_backend[qwe
unittest/_torch/executor/test_overlap_scheduler.py::test_overlap_scheduler_block_reuse_cache_hit SKIP (https://nvbugs/6608387)
unittest/_torch/modeling/test_gemma4_e2e_dummy.py::test_e2e_text_31b_dummy SKIP (https://nvbugs/6607482)
unittest/_torch/modeling/test_modeling_nemotron_nano_v2_vl.py::test_nemotron_nano_v2_vl_video_batch_equivalence SKIP (https://nvbugs/6625695)
unittest/_torch/modules/tests_lora_modules/test_nemotron_h_lora_sanity.py::TestNemotronHLoRA::test_lora_pp2_sanity SKIP (https://nvbugs/6428124)
unittest/_torch/modules/tests_lora_modules/test_qwen3_sanity.py::TestQwen3LoRA::test_qwen3_fp8_lora SKIP (https://nvbugs/6668777)
unittest/_torch/moe/test_moe_backend.py::test_moe_backend[act=Relu2-e60_k4_h2048_i1408-seq=8-dtype=torch.bfloat16-backend=TRTLLM-quant=NVFP4-routing=Renormalize] SKIP (https://nvbugs/5989912)
unittest/_torch/multi_gpu/test_linear.py::test_row_linear_norm_fusion[2-hidden:16-seqlen:2] SKIP (https://nvbugs/6501404)
Expand Down
Loading