From 3e64d19b0307ecc7280495dcbefb5c45b2f54d79 Mon Sep 17 00:00:00 2001 From: chenguowei01 Date: Thu, 20 Aug 2020 10:51:01 +0800 Subject: [PATCH] update utils.py --- dygraph/utils/utils.py | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/dygraph/utils/utils.py b/dygraph/utils/utils.py index 50059378..e002f145 100644 --- a/dygraph/utils/utils.py +++ b/dygraph/utils/utils.py @@ -29,24 +29,6 @@ def seconds_to_hms(seconds): return hms_str -def get_environ_info(): - info = dict() - info['place'] = 'cpu' - info['num'] = int(os.environ.get('CPU_NUM', 1)) - if os.environ.get('CUDA_VISIBLE_DEVICES', None) != "": - if hasattr(fluid.core, 'get_cuda_device_count'): - gpu_num = 0 - try: - gpu_num = fluid.core.get_cuda_device_count() - except: - os.environ['CUDA_VISIBLE_DEVICES'] = '' - pass - if gpu_num > 0: - info['place'] = 'cuda' - info['num'] = fluid.core.get_cuda_device_count() - return info - - def load_pretrained_model(model, pretrained_model): if pretrained_model is not None: logger.info('Load pretrained model from {}'.format(pretrained_model)) -- GitLab