set dp as default backend

This commit is contained in:
William Falcon
2019-07-18 11:48:16 -04:00
parent 6d1d5ef68e
commit d49a83dec0
+1
View File
@@ -122,6 +122,7 @@ class Trainer(TrainerIO):
# set the correct cuda visible devices (using pci order)
os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID"
os.environ["CUDA_VISIBLE_DEVICES"] = ','.join([str(x) for x in self.data_parallel_device_ids])
print(f'VISIBLE GPUS: {os.environ["CUDA_VISIBLE_DEVICES"]}')
# make DP and DDP mutually exclusive
# single GPU will also use DP with devices=[0]