Disable core::set_property() to support ov::device::properties setting (#15175)

* Disable set_property() to support ov::device::properties setting.

* Update benchmark APP to set device properties through compile_model() instead of through set_property().

* Update.

* Update.

* Update some test case including ov::device::properties setting via core.ser_property().

* Since core.set_property() didn't support ov::device::properties setting, just remove the test case to check compile_model() works well if setting ov::device::properties via core.set_property() first.

* Update CompileModel in test name to CompiledModel

Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>

* Add corresponding test case.

Signed-off-by: Wang, Yang <yang4.wang@intel.com>

* Update.

* Update.

* Remove the changes of this commit as this modification has nothing to do
with this PR.

This reverts commit 4f04b9f085.

---------

Signed-off-by: Wang, Yang <yang4.wang@intel.com>
Co-authored-by: Chen Peter <peter.chen@intel.com>
Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>
This commit is contained in:
Wang, Yang
2023-02-17 14:15:38 +08:00
committed by GitHub
parent 672522492e
commit a088d1ab7d
7 changed files with 49 additions and 76 deletions

View File

@@ -606,11 +606,14 @@ int main(int argc, char* argv[]) {
device_nstreams.erase(device);
}
}
for (auto&& item : config) {
core.set_property(item.first, item.second);
}
auto result = std::find_if(config.begin(), config.end(), [&](const std::pair<std::string, ov::AnyMap>& item) {
if (device_name.find(item.first) == 0)
return true;
return false;
});
ov::AnyMap device_config = {};
if (result != config.end())
device_config = result->second;
size_t batchSize = FLAGS_b;
ov::element::Type type = ov::element::undefined;
std::string topology_name = "";
@@ -642,7 +645,7 @@ int main(int argc, char* argv[]) {
next_step();
slog::info << "Skipping the step for loading model from file" << slog::endl;
auto startTime = Time::now();
compiledModel = core.compile_model(FLAGS_m, device_name);
compiledModel = core.compile_model(FLAGS_m, device_name, device_config);
auto duration_ms = get_duration_ms_till_now(startTime);
slog::info << "Compile model took " << double_to_string(duration_ms) << " ms" << slog::endl;
slog::info << "Original model I/O parameters:" << slog::endl;
@@ -821,7 +824,7 @@ int main(int argc, char* argv[]) {
// --------------------------------------------------------
next_step();
startTime = Time::now();
compiledModel = core.compile_model(model, device_name);
compiledModel = core.compile_model(model, device_name, device_config);
duration_ms = get_duration_ms_till_now(startTime);
slog::info << "Compile model took " << double_to_string(duration_ms) << " ms" << slog::endl;
if (statistics)