mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-09-10 12:21:57 +08:00
added multi-node proc 0 ip reading
This commit is contained in:
@@ -315,13 +315,11 @@ class Trainer(TrainerIO):
|
||||
print(f"GPU: {gpu_nb} - Rank: {self.proc_rank}")
|
||||
|
||||
# copy model to each gpu
|
||||
print('starting DDP')
|
||||
torch.cuda.set_device(gpu_nb)
|
||||
model.cuda(gpu_nb)
|
||||
model = LightningDistributedDataParallel(model, device_ids=[gpu_nb])
|
||||
|
||||
# continue training routine
|
||||
print('running pretrain')
|
||||
self.__run_pretrain_routine(model)
|
||||
|
||||
def __get_root_node_ip(self, proc_rank, nb_gpu_nodes, ip_file_dir):
|
||||
|
||||
Reference in New Issue
Block a user