fix(openvino): support GPU/NPU devices and variable output count#73
Open
Einse57 wants to merge 1 commit intoTau-J:mainfrom
Open
fix(openvino): support GPU/NPU devices and variable output count#73Einse57 wants to merge 1 commit intoTau-J:mainfrom
Einse57 wants to merge 1 commit intoTau-J:mainfrom
Conversation
- 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?)
zgx949
approved these changes
Apr 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
Fixes: YOLOX / single-output models crash with IndexError on output(1)
Relates to: #46 (Can RTMlib run in GPU?)