Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork56.4k
Expand ie::Params to support config#18701
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Expand ie::Params to support config#18701
Uh oh!
There was an error while loading.Please reload this page.
Conversation
TolyaTalamanov commentedOct 30, 2020
b71d343 to45c86e5CompareTolyaTalamanov commentedNov 2, 2020
@rgarnov@anton-potapov Could you have a look, please ? |
dmatveev commentedNov 2, 2020
@rgarnov@anton-potapov please prioritize |
rgarnov left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Looks good
Uh oh!
There was an error while loading.Please reload this page.
| model_path, | ||
| weights_path, | ||
| device_id, | ||
| {{"unsupported_config","some_value"}}}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
No. Putting everything to a cosntructor bloats up everything.
I'd expect to see
pp.cfgPlugin(map);
or even
pp .cfgPlugin("key","value") .cfgPlugin("key","value")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I propose to change the method name tosetCfg or something similar.cfgPlugin looks like it expects some plugin name at input and may be misleading. In its turnsetCfg can conflict withcfgInputs/Outputs though since there are different meanings ofcfg in these names
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
we have all other methods starting withcfg, and via this you configure plugin, though I agree it doesn't look very good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
hmm... exceptconstInput(). :)
Maybe.pluginConfig is what we need - but it can always be added atop.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
setPluginConfig() andgetPluginConfig() (optional, but can be used in tests)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Ok, rename topluginConfig
45c86e5 to73d5a6fCompare73d5a6f tob9604daCompareUh oh!
There was an error while loading.Please reload this page.
| auto gender = outputs.at("prob"); | ||
| cv::GComputationcomp(cv::GIn(in),cv::GOut(age, gender)); | ||
| auto pp = cv::gapi::ie::Params<cv::gapi::Generic>{"age-gender-generic", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
would not this test should be extended to test generic version ofParams ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
It is alreadygeneric, is it ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Added tests onnon-generic
| device_id}.pluginConfig({{"unsupported_config","some_value"}}); | ||
| EXPECT_ANY_THROW(comp.compile(cv::GMatDesc{CV_8U,3,cv::Size{320,240}}, | ||
| cv::compile_args(cv::gapi::networks(pp)))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
BTW is it possible to create positive test ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
For which option, for example ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Added test
TolyaTalamanov commentedNov 3, 2020
@anton-potapov Could you have a look, please ? |
TolyaTalamanov commentedNov 3, 2020
@dmatveev@rgarnov@anton-potapov Can it be merged today ? |
dmatveev commentedNov 3, 2020
Approved, but@alalek is who merges.:) |
| auto pp = cv::gapi::ie::Params<AgeGender> { | ||
| model_path, weights_path, device_id | ||
| }.cfgOutputLayers({"age_conv3","prob" }).pluginConfig({{"ENFORCE_BF16","NO"}}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
[ FAILED ] 2 tests, listed below:[ FAILED ] TestAgeGenderIE.CPUConfigGeneric[ FAILED ] TestAgeGenderIE.CPUConfigwith message
Exception message: [NOT_FOUND] Unsupported property ENFORCE_BF16 by CPU pluginCPU isi7-6700K.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Caused by oldbuild_image:Custom Win=openvino-2020.3.0.
It is OpenVINO LTS version so it is better to add handling for that (replace property or skip test).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thanks! I'll replace option asap
dmatveev commentedNov 4, 2020
@TolyaTalamanov can you please update our wiki, too? |
…ig-for-ie-paramsExpand ie::Params to support config* Add config to IE params* Add test* Remove comments from tests* Rename to pluginConfig* Add one more overloads for pluginConfig* Add more tests
Uh oh!
There was an error while loading.Please reload this page.
Pull Request Readiness Checklist
See details athttps://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.