未验证 提交 e16260c9 编写于 作者: M MissPenguin 提交者: GitHub

Merge pull request #4823 from ronny1996/fix_rocm

Fix bug for rocm
...@@ -311,7 +311,10 @@ def create_predictor(args, mode, logger): ...@@ -311,7 +311,10 @@ def create_predictor(args, mode, logger):
def get_infer_gpuid(): def get_infer_gpuid():
cmd = "env | grep CUDA_VISIBLE_DEVICES" if not paddle.fluid.core.is_compiled_with_rocm():
cmd = "env | grep CUDA_VISIBLE_DEVICES"
else:
cmd = "env | grep HIP_VISIBLE_DEVICES"
env_cuda = os.popen(cmd).readlines() env_cuda = os.popen(cmd).readlines()
if len(env_cuda) == 0: if len(env_cuda) == 0:
return 0 return 0
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册