This commit is contained in:
Glenn Jocher 2019-07-16 19:10:33 +02:00
parent a773350224
commit dc43968918
1 changed files with 1 additions and 1 deletions

View File

@ -28,7 +28,7 @@ def select_device(force_cpu=False):
x = [torch.cuda.get_device_properties(i) for i in range(ng)] x = [torch.cuda.get_device_properties(i) for i in range(ng)]
cuda_str = 'Using CUDA ' + apex_str cuda_str = 'Using CUDA ' + apex_str
for i in range(0, ng): for i in range(0, ng):
if ng == 1: if i == 1:
# torch.cuda.set_device(0) # OPTIONAL: Set GPU ID # torch.cuda.set_device(0) # OPTIONAL: Set GPU ID
cuda_str = ' ' * len(cuda_str) cuda_str = ' ' * len(cuda_str)
print("%sdevice%g _CudaDeviceProperties(name='%s', total_memory=%dMB)" % print("%sdevice%g _CudaDeviceProperties(name='%s', total_memory=%dMB)" %