nb. devices (#2973)

This commit is contained in:
Jirka Borovec 2020-08-14 11:37:21 +02:00 committed by GitHub
parent 0c264689cb
commit 5bce06c050
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -87,7 +87,7 @@ class DDPBackend(object):
command = [sys.executable] + command command = [sys.executable] + command
# since this script sets the visible devices we replace the gpus flag with a number # since this script sets the visible devices we replace the gpus flag with a number
num_gpus = os.environ.get('CUDA_VISIBLE_DEVICES', []).split(',').__len__() num_gpus = torch.cuda.device_count()
if '--gpus' in command: if '--gpus' in command:
gpu_flag_idx = command.index('--gpus') gpu_flag_idx = command.index('--gpus')