[rl] Stateful Trainer Send: NCCL + Sparse NCCL [3/N] (#50902)
Signed-off-by: haoaaron <ahao@anyscale.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
43d691ec6b
commit
21ea5b4fa1
@@ -177,6 +177,10 @@ def packed_nccl_broadcast_producer(
|
||||
# Move to the next buffer
|
||||
buffer_idx = (buffer_idx + 1) % num_buffers
|
||||
|
||||
# Drain every slot before returning.
|
||||
for stream in streams:
|
||||
stream.synchronize()
|
||||
|
||||
|
||||
def packed_nccl_broadcast_consumer(
|
||||
iterator: Iterator[tuple[str, tuple[list[int], torch.dtype]]],
|
||||
@@ -279,6 +283,10 @@ def packed_nccl_broadcast_consumer(
|
||||
)
|
||||
break
|
||||
|
||||
# Drain every slot before returning.
|
||||
for stream in streams:
|
||||
stream.synchronize()
|
||||
|
||||
|
||||
# ── IPC packed transfer ────────────────────────────────────────────────
|
||||
|
||||
|
||||
Reference in New Issue
Block a user