Skip to content

OpenVINO™ is an open source toolkit for optimizing and deploying AI inference

[core] Remove get model RT info for `__weight_path` (#33223)

Pawel Raaszc032c7aed7b9
diff --git a/src/inference/src/dev/core_impl.cpp b/src/inference/src/dev/core_impl.cpp
index 2c82ec3898f..80a261a6efa 100644
--- a/src/inference/src/dev/core_impl.cpp
+++ b/src/inference/src/dev/core_impl.cpp
@@ -876,16 +876,6 @@ ov::SoPtr<ov::ICompiledModel> ov::CoreImpl::compile_model(const std::shared_ptr<
return ModelCache::compute_hash(model, cache_content.m_model_path, compiled_config);
});
cache_content.model = model;
-
- const auto& cache_mode_it = config.find(cache_mode.name());
- if (cache_mode_it != config.end() && cache_mode_it->second == CacheMode::OPTIMIZE_SIZE) {
- const auto& rt_info = model->get_rt_info();
- auto weights_path = rt_info.find("__weights_path");
- if (weights_path != rt_info.end()) {
- parsed.m_config[ov::weights_path.name()] = weights_path->second;
- }
- }
-
const auto lock = m_cache_guard.get_hash_lock(cache_content.m_blob_id);
compiled_model = load_model_from_cache(cache_content, plugin, parsed.m_config, {}, [&]() {
return compile_model_and_cache(plugin, model, parsed.m_config, {}, cache_content);