Skip to content

Commit

Permalink
[pipe] prevent deadlock with multiple evals sequence (#1944)
Browse files Browse the repository at this point in the history
* [pipe] prevent deadlock with multiple evals sequence

* style

* style

* style

* align DSE commit w. latest master

Co-authored-by: Jeff Rasley <[email protected]>
Co-authored-by: Olatunji Ruwase <[email protected]>
  • Loading branch information
3 people authored May 10, 2022
1 parent de88718 commit dbeadf1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions deepspeed/runtime/pipe/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,10 @@ def eval_batch(self,
sched = schedule.InferenceSchedule(micro_batches=self.micro_batches,
stages=self.num_stages,
stage_id=self.stage_id)

# prevent dead-lock with multiple evals sequence
dist.barrier()

with torch.no_grad():
self._exec_schedule(sched)

Expand Down

0 comments on commit dbeadf1

Please sign in to comment.