Skip to content

fix(openvino): support GPU/NPU devices and variable output count#73

Open
Einse57 wants to merge 1 commit intoTau-J:mainfrom
Einse57:fix/openvino-gpu-and-variable-outputs
Open

fix(openvino): support GPU/NPU devices and variable output count#73
Einse57 wants to merge 1 commit intoTau-J:mainfrom
Einse57:fix/openvino-gpu-and-variable-outputs

Conversation

@Einse57
Copy link
Copy Markdown

@Einse57 Einse57 commented Apr 1, 2026

  • Add 'openvino' entry to RTMLIB_SETTINGS with cpu/gpu/npu device mappings, consistent with the opencv and onnxruntime backends.

  • Remove hardcoded CPU-only restriction in the openvino backend. The device string is now mapped through RTMLIB_SETTINGS to the corresponding OpenVINO device name (CPU, GPU, NPU). Unknown device strings fall back to upper-cased (e.g. 'auto' -> 'AUTO').

  • Fix crash on models with != 2 outputs (e.g. YOLOX has 1 output). Output layers are now stored dynamically in _ov_outputs instead of hardcoding output_layer0 / output_layer1. The inference method iterates over all stored outputs.

Tested on Intel Core Ultra 7 165U:

  • GPU (iGPU): YOLOX-tiny, RTMPose-m body, RTMPose-m hand
  • NPU (AI Boost): all three models compile and run

Fixes: YOLOX / single-output models crash with IndexError on output(1)
Relates to: #46 (Can RTMlib run in GPU?)

- Add 'openvino' entry to RTMLIB_SETTINGS with cpu/gpu/npu device
  mappings, consistent with the opencv and onnxruntime backends.

- Remove hardcoded CPU-only restriction in the openvino backend.
  The device string is now mapped through RTMLIB_SETTINGS to the
  corresponding OpenVINO device name (CPU, GPU, NPU). Unknown
  device strings fall back to upper-cased (e.g. 'auto' -> 'AUTO').

- Fix crash on models with != 2 outputs (e.g. YOLOX has 1 output).
  Output layers are now stored dynamically in _ov_outputs instead
  of hardcoding output_layer0 / output_layer1. The inference method
  iterates over all stored outputs.

Tested on Intel Core Ultra 7 165U (Meteor Lake):
  - GPU (Xe-LPG iGPU): YOLOX-tiny, RTMPose-m body, RTMPose-m hand
  - NPU (AI Boost 3720): all three models compile and run

Fixes: YOLOX / single-output models crash with IndexError on output(1)
Relates to: Tau-J#46 (Can RTMlib run in GPU?)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants