Skip to content

Commit 50bb344

Browse files
committed
Merge pull request opencv#19206 from OrestChura:oc/fix_plugconfparams_n_align
2 parents cd68cc1 + e80f662 commit 50bb344

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

modules/gapi/test/infer/gapi_infer_ie_test.cpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -508,10 +508,8 @@ TEST(TestAgeGenderIE, GenericInfer)
508508

509509
cv::GComputation comp(cv::GIn(in), cv::GOut(age, gender));
510510

511-
cv::gapi::ie::Params<cv::gapi::Generic> pp{"age-gender-generic",
512-
params.model_path,
513-
params.weights_path,
514-
params.device_id};
511+
cv::gapi::ie::Params<cv::gapi::Generic> pp{
512+
"age-gender-generic", params.model_path, params.weights_path, params.device_id};
515513

516514
comp.apply(cv::gin(in_mat), cv::gout(gapi_age, gapi_gender),
517515
cv::compile_args(cv::gapi::networks(pp)));
@@ -539,10 +537,9 @@ TEST(TestAgeGenderIE, InvalidConfigGeneric)
539537
auto gender = outputs.at("prob");
540538
cv::GComputation comp(cv::GIn(in), cv::GOut(age, gender));
541539

542-
auto pp = cv::gapi::ie::Params<cv::gapi::Generic>{"age-gender-generic",
543-
model_path,
544-
weights_path,
545-
device_id}.pluginConfig({{"unsupported_config", "some_value"}});
540+
auto pp = cv::gapi::ie::Params<cv::gapi::Generic>{
541+
"age-gender-generic", model_path, weights_path, device_id
542+
}.pluginConfig({{"unsupported_config", "some_value"}});
546543

547544
EXPECT_ANY_THROW(comp.compile(cv::GMatDesc{CV_8U,3,cv::Size{320, 240}},
548545
cv::compile_args(cv::gapi::networks(pp))));
@@ -566,10 +563,10 @@ TEST(TestAgeGenderIE, CPUConfigGeneric)
566563
auto gender = outputs.at("prob");
567564
cv::GComputation comp(cv::GIn(in), cv::GOut(age, gender));
568565

569-
auto pp = cv::gapi::ie::Params<cv::gapi::Generic>{"age-gender-generic",
570-
model_path,
571-
weights_path,
572-
device_id}.pluginConfig({{"ENFORCE_BF16", "NO"}});
566+
auto pp = cv::gapi::ie::Params<cv::gapi::Generic> {
567+
"age-gender-generic", model_path, weights_path, device_id
568+
}.pluginConfig({{IE::PluginConfigParams::KEY_CPU_THROUGHPUT_STREAMS,
569+
IE::PluginConfigParams::CPU_THROUGHPUT_NUMA}});
573570

574571
EXPECT_NO_THROW(comp.compile(cv::GMatDesc{CV_8U,3,cv::Size{320, 240}},
575572
cv::compile_args(cv::gapi::networks(pp))));
@@ -593,7 +590,8 @@ TEST(TestAgeGenderIE, InvalidConfig)
593590

594591
auto pp = cv::gapi::ie::Params<AgeGender> {
595592
model_path, weights_path, device_id
596-
}.cfgOutputLayers({ "age_conv3", "prob" }).pluginConfig({{"unsupported_config", "some_value"}});
593+
}.cfgOutputLayers({ "age_conv3", "prob" })
594+
.pluginConfig({{"unsupported_config", "some_value"}});
597595

598596
EXPECT_ANY_THROW(comp.compile(cv::GMatDesc{CV_8U,3,cv::Size{320, 240}},
599597
cv::compile_args(cv::gapi::networks(pp))));
@@ -617,7 +615,9 @@ TEST(TestAgeGenderIE, CPUConfig)
617615

618616
auto pp = cv::gapi::ie::Params<AgeGender> {
619617
model_path, weights_path, device_id
620-
}.cfgOutputLayers({ "age_conv3", "prob" }).pluginConfig({{"ENFORCE_BF16", "NO"}});
618+
}.cfgOutputLayers({ "age_conv3", "prob" })
619+
.pluginConfig({{IE::PluginConfigParams::KEY_CPU_THROUGHPUT_STREAMS,
620+
IE::PluginConfigParams::CPU_THROUGHPUT_NUMA}});
621621

622622
EXPECT_NO_THROW(comp.compile(cv::GMatDesc{CV_8U,3,cv::Size{320, 240}},
623623
cv::compile_args(cv::gapi::networks(pp))));

0 commit comments

Comments
 (0)