Fix path of device

This commit is contained in:
Nick Mowen 2023-02-06 14:43:39 -07:00
parent f96bd5d9b5
commit 3d1f3505c9

View File

@ -29,7 +29,7 @@ def get_gpu_device() -> str:
devices = list(filter(lambda d: d.startswith("render"), os.listdir("/dev/dri")))
if len(devices) < 2:
GPU_DEVICE_PARAM = "renderD128"
GPU_DEVICE_PARAM = "/dev/dri/renderD128"
return GPU_DEVICE_PARAM
else:
for device in devices:
@ -38,7 +38,7 @@ def get_gpu_device() -> str:
logger.debug(f"{device} return vainfo status code: {check.returncode}")
if check.returncode == 0:
GPU_DEVICE_PARAM = device
GPU_DEVICE_PARAM = f"/dev/dri/{device}"
return GPU_DEVICE_PARAM
raise ValueError(