Skip to content

Commit 81636fe

Browse files
kaushikb11awaelchli
authored andcommitted
Add sleep to fix the rendezous error
1 parent 824c11d commit 81636fe

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pytorch_lightning/plugins/training_type/tpu_spawn.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,11 @@ def _wrapped_function(
277277
result = function(*args, **kwargs)
278278
if self.local_rank == 0:
279279
return_queue.put(move_data_to_device(result, "cpu"))
280+
280281
self.barrier("end-process")
282+
# https://github.com/pytorch/xla/issues/2190#issuecomment-641665358
283+
if self.local_rank == 0:
284+
time.sleep(2)
281285

282286
def _worker_setup(self, process_idx: int):
283287
reset_seed()

0 commit comments

Comments
 (0)