From c8cfb9400a0bd52bb46fe9a95a6fc921fb1bed9e Mon Sep 17 00:00:00 2001 From: Aaron Daubman Date: Wed, 13 May 2026 13:22:55 -0400 Subject: [PATCH] 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) --- frigate/detectors/detection_runners.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frigate/detectors/detection_runners.py b/frigate/detectors/detection_runners.py index 8d7eb1e67..39ebbf578 100644 --- a/frigate/detectors/detection_runners.py +++ b/frigate/detectors/detection_runners.py @@ -79,7 +79,11 @@ def is_openvino_gpu_npu_available() -> bool: available_devices = get_openvino_available_devices() # Check for GPU, NPU, or other acceleration devices (excluding CPU) 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):