Skip to content

Commit

Permalink
Pipeline timers (deepspeedai#15)
Browse files Browse the repository at this point in the history
* update default configs

* fix bug with onebitadam + p.p hanging

* send tensors to cuda

Co-authored-by: sid <sidney.black@aleph-alpha.de>
  • Loading branch information
sdtblck and sid authored Mar 10, 2021
1 parent d10a3f8 commit e020c27
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions deepspeed/runtime/fp16/fused_optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,9 @@ def step(self, closure=None):
if hasattr(self.optimizer.comm_backend_handle,
"mpu") and self.optimizer.comm_backend_handle.mpu is not None:
if self.overflow:
bool_tensor = torch.zeros(1)
bool_tensor = torch.zeros(1).cuda()
else:
bool_tensor = torch.ones(1)
bool_tensor = torch.ones(1).cuda()
dist.all_reduce(bool_tensor, op=dist.ReduceOp.PRODUCT)
if not any(bool_tensor):
self.overflow = True
Expand Down

0 comments on commit e020c27

Please # to comment.