Skip to content

Commit

Permalink
fix CUDA_VISIBLE_DEVICE=-1 bug
Browse files Browse the repository at this point in the history
  • Loading branch information
wuyefeilin authored Oct 27, 2020
1 parent c67e05f commit acdfa96
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dygraph/paddleseg/utils/env/sys_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ def get_sys_env():

env_info['CUDA_VISIBLE_DEVICES'] = os.environ.get(
'CUDA_VISIBLE_DEVICES')
if gpu_nums == 0:
os.environ['CUDA_VISIBLE_DEVICES'] = ''
env_info['GPU'] = _get_gpu_info()

try:
Expand Down

0 comments on commit acdfa96

Please sign in to comment.