mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-10-29 13:30:57 +08:00
This reverts commit d0ec11b9d6.
This commit is contained in:
1 parent
460ab5485e
commit
ca815698f5
2 files changed
+2
-2
No files matched your search
@@ -501,7 +501,7 @@ class TrainerDPMixin(ABC):
|
||||
|
||||
self.run_pretrain_routine(model)
|
||||
|
||||
def tpu_train(self, model):
|
||||
def tpu_train(self, tpu_core_idx, model):
|
||||
# put model on tpu
|
||||
self._device = xm.xla_device(self.tpu_id) if self.tpu_id is not None else xm.xla_device()
|
||||
model.to(self._device)
|
||||
|
||||
@@ -904,7 +904,7 @@ class Trainer(
|
||||
|
||||
# train
|
||||
if self.tpu_id is not None:
|
||||
self.tpu_train(model)
|
||||
self.tpu_train(self.tpu_id, model)
|
||||
else:
|
||||
xmp.spawn(self.tpu_train, args=(model,), nprocs=self.tpu_cores, start_method=start_method)
|
||||
|
||||
|
||||
Reference in new issue
Block a user