Skip to content

Commit cbe1209

Browse files
committed
Merge the last two ifs instead
1 parent 4aacf40 commit cbe1209

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/inference/src/dev/core_impl.cpp

+2-10
Original file line numberDiff line numberDiff line change
@@ -787,10 +787,7 @@ ov::SoPtr<ov::ICompiledModel> ov::CoreImpl::compile_model(const std::string& mod
787787

788788
auto cacheManager = coreConfig.get_cache_config_for_device(plugin, parsed._config)._cacheManager;
789789

790-
if (plugin.get_name().find("LLAMA_CPP") != std::string::npos) {
791-
compiled_model = plugin.compile_model(model_path, parsed._config);
792-
}
793-
else if (cacheManager && device_supports_model_caching(plugin) && !is_proxy_device(plugin)) {
790+
if (cacheManager && device_supports_model_caching(plugin) && !is_proxy_device(plugin)) {
794791
// Skip caching for proxy plugin. HW plugin will load network from the cache
795792
CacheContent cacheContent{cacheManager, model_path};
796793
cacheContent.blobId = ov::ModelCache::compute_hash(model_path, create_compile_config(plugin, parsed._config));
@@ -800,13 +797,8 @@ ov::SoPtr<ov::ICompiledModel> ov::CoreImpl::compile_model(const std::string& mod
800797
auto model = read_model(model_path, std::string{});
801798
return compile_model_and_cache(plugin, model, parsed._config, {}, cacheContent);
802799
});
803-
} else if (cacheManager) {
804-
// this code path is enabled for AUTO / MULTI / BATCH / PROXY devices which don't support
805-
// import / export explicitly, but can redirect this functionality to actual HW plugin
806-
compiled_model = plugin.compile_model(model_path, parsed._config);
807800
} else {
808-
auto model = read_model(model_path, std::string());
809-
compiled_model = plugin.compile_model(model, parsed._config);
801+
compiled_model = plugin.compile_model(model_path, parsed._config);
810802
}
811803
return compiled_model;
812804
}

0 commit comments

Comments
 (0)