提交 4a9e50e1 编写于 作者: J Jim

fix #5065

上级 04c44974
......@@ -313,6 +313,11 @@ def create_predictor(args, mode, logger):
def get_infer_gpuid():
if os.name == 'nt':
try:
return int(os.environ['CUDA_VISIBLE_DEVICES'].split(',')[0])
except KeyError:
return 0
if not paddle.fluid.core.is_compiled_with_rocm():
cmd = "env | grep CUDA_VISIBLE_DEVICES"
else:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册