[AUTO BATCH PLUGIN] update time out from set property (#18795)

* [AUTO BATCH PLUGIN] update time out from set property

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* [AUTO BATCH PLUGIN] update test case from time out property

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* [AUTO BATCH PLUGIN] fix review comment

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

---------

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>
Co-authored-by: Haiqi Pan <haiqi.pan@intel.com>
This commit is contained in:
Xuejun Zhai
2023-08-01 05:22:21 +08:00
committed by GitHub
parent 61be577822
commit 5871b355ec
2 changed files with 12 additions and 8 deletions

View File

@@ -166,12 +166,16 @@ std::shared_ptr<const ov::Model> CompiledModel::get_runtime_model() const {
}
void CompiledModel::set_property(const ov::AnyMap& properties) {
auto time_out = properties.find(ov::auto_batch_timeout.name());
if (time_out == properties.end() || properties.size() > 1) {
OPENVINO_THROW("The only config that can be changed on the fly for the AutoBatching is the ",
ov::auto_batch_timeout.name());
} else {
m_time_out = time_out->second.as<std::uint32_t>();
for (const auto& property : properties) {
if (property.first == ov::auto_batch_timeout.name()) {
m_time_out = property.second.as<std::uint32_t>();
m_config[ov::auto_batch_timeout.name()] = property.second.as<std::uint32_t>();
} else {
OPENVINO_THROW("AutoBatching Compiled Model dosen't support property",
property.first,
". The only property that can be changed on the fly is the ",
ov::auto_batch_timeout.name());
}
}
}

View File

@@ -156,8 +156,8 @@ const std::vector<get_property_param> compile_model_get_property_param_test = {
get_property_param{METRIC_KEY(SUPPORTED_CONFIG_KEYS), false},
get_property_param{ov::execution_devices.name(), false},
get_property_param{CONFIG_KEY(AUTO_BATCH_DEVICE_CONFIG), false},
get_property_param{CONFIG_KEY(AUTO_BATCH_TIMEOUT), false},
get_property_param{CONFIG_KEY(CACHE_DIR), false},
get_property_param{ov::auto_batch_timeout.name(), false},
get_property_param{ov::cache_dir.name(), false},
// Config in dependent m_plugin
get_property_param{"OPTIMAL_BATCH_SIZE", false},
// Incorrect Property