From 8f18b2709e41735782d7da95dbd4b88a42cd7c75 Mon Sep 17 00:00:00 2001 From: James Betker Date: Thu, 31 Dec 2020 10:13:58 -0700 Subject: [PATCH] Get rid of CUDA_VISIBLE_DEVICES It is not clear to me what the purpose of this is, but it has recently started causing failures. --- codes/utils/options.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/codes/utils/options.py b/codes/utils/options.py index 8af09757..2c03d7ac 100644 --- a/codes/utils/options.py +++ b/codes/utils/options.py @@ -8,11 +8,6 @@ Loader, Dumper = OrderedYaml() def parse(opt_path, is_train=True): with open(opt_path, mode='r') as f: opt = yaml.load(f, Loader=Loader) - # export CUDA_VISIBLE_DEVICES - if 'gpu_ids' in opt.keys(): - gpu_list = ','.join(str(x) for x in opt['gpu_ids']) - os.environ['CUDA_VISIBLE_DEVICES'] = gpu_list - print('export CUDA_VISIBLE_DEVICES=' + gpu_list) opt['is_train'] = is_train