mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-10-26 13:00:58 +08:00
Add tags to the rendezvous calls for TPU. (#921)
* Update data_loading.py * Update training_io.py * Update trainer.py
This commit is contained in:
1 parent
89d5772f55
commit
5778a4131c
3 files changed
+3
-3
No files matched your search
@@ -233,7 +233,7 @@ class TrainerDataLoadingMixin(ABC):
|
||||
self.get_val_dataloaders()
|
||||
|
||||
# wait for all processes to catch up
|
||||
torch_xla.core.xla_model.rendezvous()
|
||||
torch_xla.core.xla_model.rendezvous("pl.TrainerDataLoadingMixin.get_dataloaders")
|
||||
|
||||
# support IterableDataset for train data
|
||||
self.is_iterable_train_dataloader = (
|
||||
|
||||
@@ -1002,7 +1002,7 @@ class Trainer(TrainerIOMixin,
|
||||
# wait for all models to restore weights
|
||||
if self.on_tpu and XLA_AVAILABLE:
|
||||
# wait for all processes to catch up
|
||||
torch_xla.core.xla_model.rendezvous()
|
||||
torch_xla.core.xla_model.rendezvous("pl.Trainer.run_pretrain_routine")
|
||||
|
||||
# set up checkpoint callback
|
||||
self.configure_checkpoint_callback()
|
||||
|
||||
@@ -183,7 +183,7 @@ class TrainerIOMixin(ABC):
|
||||
# wait for all models to restore weights
|
||||
if self.on_tpu and XLA_AVAILABLE:
|
||||
# wait for all processes to catch up
|
||||
torch_xla.core.xla_model.rendezvous()
|
||||
torch_xla.core.xla_model.rendezvous("pl.TrainerIOMixin.restore_weights")
|
||||
|
||||
# clear cache after restore
|
||||
if self.on_gpu:
|
||||
|
||||
Reference in new issue
Block a user