File tree 1 file changed +11
-1
lines changed
1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -1451,7 +1451,17 @@ ov::SoPtr<ov::ICompiledModel> ov::CoreImpl::load_model_from_cache(
1451
1451
std::string ov::CoreImpl::compute_hash (const std::shared_ptr<const ov::Model>& model,
1452
1452
const std::string& deviceName,
1453
1453
const ov::AnyMap& compileOptions) {
1454
- auto properties = create_compile_config (get_plugin (deviceName), compileOptions);
1454
+ std::string actualDeviceName = deviceName;
1455
+ if (deviceName.find (" AUTO" ) != std::string::npos) {
1456
+ auto pos = deviceName.find_first_of (" :" );
1457
+ if (pos != std::string::npos) {
1458
+ auto deviceNames = ov::DeviceIDParser::get_multi_devices (deviceName.substr (pos + 1 ));
1459
+ actualDeviceName = deviceNames.size () > 0 ? deviceNames.back () : deviceName;
1460
+ } else {
1461
+ return " Cannot compute hash for AUTO device without actual device name" ;
1462
+ }
1463
+ }
1464
+ auto properties = create_compile_config (get_plugin (actualDeviceName), compileOptions);
1455
1465
return ov::ModelCache::compute_hash (model, properties);
1456
1466
}
1457
1467
You can’t perform that action at this time.
0 commit comments