Merge b86300a604
into 59bafb8d4d
This commit is contained in:
commit
1815b4667e
|
@ -15,7 +15,6 @@
|
|||
import argparse
|
||||
import os
|
||||
import sys
|
||||
import platform
|
||||
import cv2
|
||||
import numpy as np
|
||||
import paddle
|
||||
|
@ -336,10 +335,11 @@ def get_output_tensors(args, mode, predictor):
|
|||
|
||||
|
||||
def get_infer_gpuid():
|
||||
sysstr = platform.system()
|
||||
if sysstr == "Windows":
|
||||
return 0
|
||||
|
||||
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:
|
||||
|
|
Loading…
Reference in New Issue