Skip to content

Commit 61e177c

Browse files
committed
option 1 - use block_current to overlap compute/communication
1 parent 7e5dda1 commit 61e177c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

torchft/manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ def allreduce(self, tensor: torch.Tensor, should_quantize: bool = False) -> Work
388388
)
389389
else:
390390
work = self._pg.allreduce([tensor], ReduceOp.SUM)
391-
work.wait()
391+
work.block_current_stream()
392392

393393
fut = work.get_future()
394394

0 commit comments

Comments
 (0)