Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ibeltagy committed Jul 28, 2020
1 parent f8a176c commit 1115d6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pytorch_lightning/trainer/distrib_data_parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ def ddp_train(self, process_idx, q, model, is_master=False, proc_offset=0):
if is_master:
# source of truth is cuda for gpu idx
gpus = os.environ['CUDA_VISIBLE_DEVICES'].split(',')
gpu_idx = int(gpus[self.local_rank])
gpu_idx = self.local_rank

self.root_gpu = gpu_idx
torch.cuda.set_device(self.root_gpu)
Expand Down

0 comments on commit 1115d6b

Please sign in to comment.