mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-09-09 11:32:07 +08:00
Remove unused param tpu_core_idx (#1948)
This commit is contained in:
@@ -501,7 +501,7 @@ class TrainerDPMixin(ABC):
|
||||
|
||||
self.run_pretrain_routine(model)
|
||||
|
||||
def tpu_train(self, tpu_core_idx, model):
|
||||
def tpu_train(self, 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)
|
||||
|
||||
@@ -900,7 +900,7 @@ class Trainer(
|
||||
|
||||
# train
|
||||
if self.tpu_id is not None:
|
||||
self.tpu_train(self.tpu_id, model)
|
||||
self.tpu_train(model)
|
||||
else:
|
||||
xmp.spawn(self.tpu_train, args=(model,), nprocs=self.tpu_cores, start_method=start_method)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user