Skip to content

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

[CPU] Avoid dumping graph to get name (#31303)

Egor Duplenskiic4b632bbd3f5
diff --git a/src/plugins/intel_cpu/src/compiled_model.cpp b/src/plugins/intel_cpu/src/compiled_model.cpp
index 89f5c7909d0..52b07486ced 100644
--- a/src/plugins/intel_cpu/src/compiled_model.cpp
+++ b/src/plugins/intel_cpu/src/compiled_model.cpp
@@ -314,8 +314,7 @@ ov::Any CompiledModel::get_property(const std::string& name) const {
}
if (name == ov::model_name) {
- // @todo Does not seem ok to 'dump()' the whole graph everytime in order to get a name
- const std::string modelName = graph.dump()->get_friendly_name();
+ std::string modelName = graph.GetName();
return decltype(ov::model_name)::value_type(modelName);
}
if (name == ov::optimal_number_of_infer_requests) {