Fix the logic issue of handling the ov::device::properties in the ie core. (#13482)
* Update the logic to handle the ov:device::properties in the ie core. Signed-off-by: Wang, Yang <yang4.wang@intel.com> * Update test cases. Signed-off-by: Wang, Yang <yang4.wang@intel.com> * 1. Remove the config filter within AUTO plugin when passing the configs to target hardwre device through AUTO plugin. 2. add test cases to check if the secondary properties have been passed into the target device through virtaul device. Signed-off-by: Wang, Yang <yang4.wang@intel.com> * Add mock tests to check if device properties works throgh the AUTO or MULTI plugin. Signed-off-by: Wang, Yang <yang4.wang@intel.com> * Update. Signed-off-by: Wang, Yang <yang4.wang@intel.com> * Add mock head file for loadnetwork with device properties testing. Signed-off-by: Wang, Yang <yang4.wang@intel.com> * Update. Signed-off-by: Wang, Yang <yang4.wang@intel.com> * Update gtest commit to fix the warning issue appeared in the macro MATCHER_P. Signed-off-by: Wang, Yang <yang4.wang@intel.com> Signed-off-by: Wang, Yang <yang4.wang@intel.com>
This commit is contained in:
1 parent
8f9fc34ed3
commit
560dba22cb
9 files changed
+360
-40
No files matched your search
+14
-21
@@ -443,29 +443,22 @@ IExecutableNetworkInternal::Ptr MultiDeviceInferencePlugin::LoadNetworkImpl(cons
|
||||
LOG_INFO_TAG("load with model path");
|
||||
}
|
||||
}
|
||||
// replace the configure with configure that auto want to pass to device
|
||||
// and reset the strDevices to support devices
|
||||
auto validConfigKey = PerfHintsConfig::SupportedKeys();
|
||||
validConfigKey.push_back(PluginConfigParams::KEY_PERF_COUNT);
|
||||
validConfigKey.push_back(PluginConfigParams::KEY_EXCLUSIVE_ASYNC_REQUESTS);
|
||||
// reset the strDevices to support devices
|
||||
strDevices = "";
|
||||
for (auto iter = supportDevices.begin(); iter != supportDevices.end(); iter++) {
|
||||
std::map<std::string, std::string> deviceConfig;
|
||||
auto& configs = iter->config;
|
||||
for (auto& config : configs) {
|
||||
if (std::find(validConfigKey.begin(), validConfigKey.end(), config.first) != validConfigKey.end()) {
|
||||
deviceConfig.insert({config.first, config.second});
|
||||
LOG_INFO_TAG("device:%s, config:%s=%s", iter->deviceName.c_str(),
|
||||
config.first.c_str(), config.second.c_str());
|
||||
}
|
||||
}
|
||||
insertPropToConfig(CONFIG_KEY(ALLOW_AUTO_BATCHING), iter->deviceName, deviceConfig);
|
||||
insertPropToConfig(CONFIG_KEY(AUTO_BATCH_TIMEOUT), iter->deviceName, deviceConfig);
|
||||
insertPropToConfig(CONFIG_KEY(CACHE_DIR), iter->deviceName, deviceConfig);
|
||||
iter->config = deviceConfig;
|
||||
strDevices += iter->deviceName;
|
||||
strDevices += ((iter + 1) == supportDevices.end()) ? "" : ",";
|
||||
LOG_INFO_TAG("device:%s, priority:%ld", iter->deviceName.c_str(), iter->devicePriority);
|
||||
auto& configs = iter->config;
|
||||
for (auto& config : configs) {
|
||||
LOG_INFO_TAG("device:%s, config:%s=%s",
|
||||
iter->deviceName.c_str(),
|
||||
config.first.c_str(),
|
||||
config.second.c_str());
|
||||
}
|
||||
insertPropToConfig(CONFIG_KEY(ALLOW_AUTO_BATCHING), iter->deviceName, configs);
|
||||
insertPropToConfig(CONFIG_KEY(AUTO_BATCH_TIMEOUT), iter->deviceName, configs);
|
||||
insertPropToConfig(CONFIG_KEY(CACHE_DIR), iter->deviceName, configs);
|
||||
strDevices += iter->deviceName;
|
||||
strDevices += ((iter + 1) == supportDevices.end()) ? "" : ",";
|
||||
LOG_INFO_TAG("device:%s, priority:%ld", iter->deviceName.c_str(), iter->devicePriority);
|
||||
}
|
||||
autoSContext->_modelPath = clonedModelPath;
|
||||
// clone the network, in case of reshape conflict
|
||||
|
||||
@@ -48,7 +48,7 @@ public:
|
||||
|
||||
MOCKTESTMACRO std::string GetDeviceList(const std::map<std::string, std::string>& config) const;
|
||||
|
||||
std::list<DeviceInformation> GetValidDevice(const std::vector<DeviceInformation>& metaDevices,
|
||||
MOCKTESTMACRO std::list<DeviceInformation> GetValidDevice(const std::vector<DeviceInformation>& metaDevices,
|
||||
const std::string& networkPrecision = METRIC_VALUE(FP32));
|
||||
|
||||
MOCKTESTMACRO DeviceInformation SelectDevice(const std::vector<DeviceInformation>& metaDevices,
|
||||
|
||||
Reference in new issue
Block a user