[PD] Skip singleton transfer-status all-reduces (#40003)

Co-authored-by: Pranjal Shankhdhar <pranjalssh@users.noreply.github.com>
Co-authored-by: Jialin Ouyang <Jialin.Ouyang@gmail.com>
This commit is contained in:
metamergebot
2026-09-18 22:41:50 -07:00
committed by GitHub
co-authored by Pranjal Shankhdhar Jialin Ouyang
parent 5b42d10edf
commit 8189e3896b
4 changed files with 128 additions and 5 deletions
@@ -185,6 +185,9 @@ def _apply_metadata_gate(polls, decode_reqs, metadata_buffers) -> None:
def _all_reduce_polls(polls: List[int], group: dist.ProcessGroup) -> List[int]:
"""MIN-reduce poll states so no rank commits ahead of its peers."""
if dist.get_world_size(group) == 1:
return polls
tensor_to_reduce = torch.tensor(polls, dtype=torch.uint8, device="cpu")
dist.all_reduce(tensor_to_reduce, op=dist.ReduceOp.MIN, group=group)
return tensor_to_reduce.tolist()
+6 -3
View File
@@ -4888,9 +4888,12 @@ class Scheduler(
self.load_publisher.publish_load_stat(
self.load_inquirer.get_loads, force=True, snapshot=snapshot
)
if self.enable_hicache_storage:
# Storage workers need the GIL between I/O calls. Yield while
# there is no GPU batch so polling cannot starve their acks.
if (
self.enable_hicache_storage
or self.disaggregation_mode != DisaggregationMode.NULL
):
# Storage and transfer workers need the GIL between I/O calls.
# Singleton PD polls no longer yield through a collective.
time.sleep(0)
return
self.metrics_reporter.record_scheduler_idle()