Changed "face_recognition_demo" - fixing the device argument to accept AUTO: GPU,CPU style inputs for flexibility#4039
Open
InfoSage05 wants to merge 2 commits into
Open
Conversation
…le inputs Previously, the -d_fd, -d_lm, and -d_reid arguments only accepted bare device names like CPU, GPU, AUTO. This blocked users from passing compound OpenVINO device strings like AUTO:GPU,CPU or HETERO:GPU,CPU which are needed to use the AUTO plugin properly. Removed the choices restriction and updated the help text to show the correct format.
|
Can one of the admins verify this patch? |
…lidation Pass THROUGHPUT performance hint to compile_model when AUTO device is used so OpenVINO can optimise for streaming workloads instead of using the default latency mode. Also add a runtime check that rejects bare HETERO without sub-devices and prints a clear message telling the user the correct format (HETERO:GPU,CPU), instead of failing deep inside OpenVINO with a confusing error.
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.
Summary
choices=DEVICE_KINDSrestriction from-d_fd,-d_lm, and-d_reidarguments in
face_recognition_demo.pyCPU,GPU,AUTO,HETERO) andrejected valid OpenVINO compound strings like
AUTO:GPU,CPUorHETERO:GPU,CPUwith an argparse error so I have added them in the argument.
Root Cause
OpenVINO supports compound device strings as a standard way to configure
the AUTO and HETERO plugins. For example:
AUTO:GPU,CPU— automatically selects the best device, and it prefers GPUand falls back to CPU
HETERO:GPU,CPU— splits model layers across GPU and CPUThese strings are not standalone device names and they carry a priority list
after the colon. However, the demo used Python's
argparsewithchoices=DEVICE_KINDSwhere:How to Test