mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-15 18:00:52 +03:00
Fix multi-GPU OpenVINO detection for enrichments (#23188)
On multi-GPU systems, OpenVINO enumerates devices as "GPU.0", "GPU.1",
etc. rather than a single "GPU". The exact string match in
is_openvino_gpu_npu_available() fails to recognize these suffixed device
names, causing enrichments (face recognition, semantic search) to
silently fall back to CPU-only inference via ONNXModelRunner instead of
using OpenVINOModelRunner on GPU.
Switch from exact match to prefix match so both single-GPU ("GPU") and
multi-GPU ("GPU.0", "GPU.1") device names are correctly detected, along
with any future suffixed variants for NPU and other accelerators.
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
ca75f06456
commit
c8cfb9400a
@ -79,7 +79,11 @@ def is_openvino_gpu_npu_available() -> bool:
|
|||||||
available_devices = get_openvino_available_devices()
|
available_devices = get_openvino_available_devices()
|
||||||
# Check for GPU, NPU, or other acceleration devices (excluding CPU)
|
# Check for GPU, NPU, or other acceleration devices (excluding CPU)
|
||||||
acceleration_devices = ["GPU", "MYRIAD", "NPU", "GNA", "HDDL"]
|
acceleration_devices = ["GPU", "MYRIAD", "NPU", "GNA", "HDDL"]
|
||||||
return any(device in available_devices for device in acceleration_devices)
|
return any(
|
||||||
|
avail_dev == accel_dev or avail_dev.startswith(accel_dev + ".")
|
||||||
|
for avail_dev in available_devices
|
||||||
|
for accel_dev in acceleration_devices
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class BaseModelRunner(ABC):
|
class BaseModelRunner(ABC):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user