Skip to content

Commit 7cf1c0e

Browse files
author
Changqi Lu
committed
fix synchronize before transfer blocks
Signed-off-by: Changqi Lu <luchangqi.123@bytedance.com>
1 parent a7eca8f commit 7cf1c0e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

vllm/worker/worker.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,8 +339,7 @@ def _read_blocks(self, worker_input: WorkerInput) -> None:
339339
self.nixl_connector.read_blocks(worker_input.local_block_ids[i], worker_input.staging_block_ids[i], worker_input.remote_block_ids[i], worker_input.remote_engine_id[i])
340340

341341
def _write_blocks(self, worker_input: WorkerInput) -> None:
342-
if not self.is_driver_worker:
343-
torch.cuda.synchronize() # to make sure that the blocks are ready, on driver worker we transfer after sampling, so there's no need to synchronize
342+
torch.cuda.synchronize() # to make sure that the blocks are ready, on driver worker we transfer after sampling, so there's no need to synchronize
344343

345344
for i, op_type in enumerate(worker_input.op_type):
346345
if op_type == MemoryOpType.WRITE:

0 commit comments

Comments
 (0)