Skip to content

Commit bfe221f

Browse files
committed
option 1 - use block_current to overlap compute/communication
1 parent 91207a2 commit bfe221f

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
@@ -382,7 +382,7 @@ def allreduce(self, tensor: torch.Tensor, should_quantize: bool = False) -> Work
382382
)
383383
else:
384384
work = self._pg.allreduce([tensor], ReduceOp.SUM)
385-
work.wait()
385+
work.block_current_stream()
386386

387387
fut = work.get_future()
388388

0 commit comments

Comments
 (0)