"tests/vscode:/vscode.git/clone" did not exist on "98d46a3f085cc7529c9ddf3b7c4918cc248e9162"
Commit b789b70c authored by WenmuZhou's avatar WenmuZhou
Browse files

add system judge

parent e9555900
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
import argparse import argparse
import os import os
import sys import sys
import platform
import cv2 import cv2
import numpy as np import numpy as np
import paddle import paddle
...@@ -313,6 +314,10 @@ def create_predictor(args, mode, logger): ...@@ -313,6 +314,10 @@ def create_predictor(args, mode, logger):
def get_infer_gpuid(): def get_infer_gpuid():
sysstr = platform.system()
if sysstr == "Windows":
return 0
if not paddle.fluid.core.is_compiled_with_rocm(): if not paddle.fluid.core.is_compiled_with_rocm():
cmd = "env | grep CUDA_VISIBLE_DEVICES" cmd = "env | grep CUDA_VISIBLE_DEVICES"
else: else:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment