From dc4396891835f5b092ebbd65d005c098a11df24d Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Tue, 16 Jul 2019 19:10:33 +0200 Subject: [PATCH] updates --- utils/torch_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/torch_utils.py b/utils/torch_utils.py index 7d82a236..adbc8705 100644 --- a/utils/torch_utils.py +++ b/utils/torch_utils.py @@ -28,7 +28,7 @@ def select_device(force_cpu=False): x = [torch.cuda.get_device_properties(i) for i in range(ng)] cuda_str = 'Using CUDA ' + apex_str for i in range(0, ng): - if ng == 1: + if i == 1: # torch.cuda.set_device(0) # OPTIONAL: Set GPU ID cuda_str = ' ' * len(cuda_str) print("%sdevice%g _CudaDeviceProperties(name='%s', total_memory=%dMB)" %