added multi-node proc 0 ip reading

This commit is contained in:
William Falcon 2019-07-08 09:36:27 -04:00
parent f705f15c7a
commit 79d9adf004
1 changed files with 0 additions and 2 deletions

View File

@ -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):