OpenVINO™ is an open source toolkit for optimizing and deploying AI inference
C++ aicomputer-visiondeep-learningdeploy-aidiffusion-modelsgenerative-aigood-first-issueinferencellm-inferencenatural-language-processingnlpopenvinooptimize-aiperformance-boostrecommendation-systemspeech-recognitionstable-diffusiontransformersyolo
[OV][ITT] Updates the core runtime phases with new domain names (#34278)
tovinkered83afd70bf9e
diff --git a/src/inference/src/cpp/core.cpp b/src/inference/src/cpp/core.cppindex 3996213da7a..6afa50a6bfa 100644--- a/src/inference/src/cpp/core.cpp+++ b/src/inference/src/cpp/core.cpp@@ -88,7 +88,7 @@ std::shared_ptr<ov::Model> Core::read_model(const std::filesystem::path& model_pstd::shared_ptr<ov::Model> Core::read_model(const std::wstring& model_path,const std::wstring& bin_path,const ov::AnyMap& properties) const {- OV_ITT_SCOPED_REGION_BASE(ov::itt::domains::OV, "Read model");+ OV_ITT_SCOPED_REGION_BASE(ov::itt::domains::Phases, "Read model");return read_model(ov::util::make_path(model_path), ov::util::make_path(bin_path), properties);}#endif@@ -96,24 +96,24 @@ std::shared_ptr<ov::Model> Core::read_model(const std::wstring& model_path,std::shared_ptr<ov::Model> Core::read_model(const std::string& model_path,const std::string& bin_path,const AnyMap& properties) const {- OV_ITT_SCOPED_REGION_BASE(ov::itt::domains::OV, "Read model");+ OV_ITT_SCOPED_REGION_BASE(ov::itt::domains::Phases, "Read model");return read_model(ov::util::make_path(model_path), ov::util::make_path(bin_path), properties);}std::shared_ptr<ov::Model> Core::read_model(const std::string& model, const ov::Tensor& weights) const {- OV_ITT_SCOPED_REGION_BASE(ov::itt::domains::OV, "Read model");+ OV_ITT_SCOPED_REGION_BASE(ov::itt::domains::Phases, "Read model");OV_CORE_CALL_STATEMENT(return _impl->read_model(model, weights););}CompiledModel Core::compile_model(const std::shared_ptr<const ov::Model>& model, const AnyMap& config) {- OV_ITT_SCOPED_REGION_BASE(ov::itt::domains::OV, "Compile model");+ OV_ITT_SCOPED_REGION_BASE(ov::itt::domains::Phases, "Compile model");return compile_model(model, ov::default_device_name, config);}CompiledModel Core::compile_model(const std::shared_ptr<const ov::Model>& model,const std::string& device_name,const AnyMap& config) {- OV_ITT_SCOPED_REGION_BASE(ov::itt::domains::OV, "Compile model");+ OV_ITT_SCOPED_REGION_BASE(ov::itt::domains::Phases, "Compile model");OV_CORE_CALL_STATEMENT({auto exec = _impl->compile_model(model, device_name, config);return {exec._ptr, exec._so};@@ -121,14 +121,14 @@ CompiledModel Core::compile_model(const std::shared_ptr<const ov::Model>& model,}CompiledModel Core::compile_model(const std::filesystem::path& model_path, const AnyMap& config) {- OV_ITT_SCOPED_REGION_BASE(ov::itt::domains::OV, "Compile model");+ OV_ITT_SCOPED_REGION_BASE(ov::itt::domains::Phases, "Compile model");return compile_model(model_path, ov::default_device_name, config);}CompiledModel Core::compile_model(const std::filesystem::path& model_path,const std::string& device_name,const AnyMap& config) {- OV_ITT_SCOPED_REGION_BASE(ov::itt::domains::OV, "Compile model");+ OV_ITT_SCOPED_REGION_BASE(ov::itt::domains::Phases, "Compile model");OV_CORE_CALL_STATEMENT({auto exec = _impl->compile_model(model_path, device_name, config);return {exec._ptr, exec._so};@@ -136,19 +136,19 @@ CompiledModel Core::compile_model(const std::filesystem::path& model_path,}CompiledModel Core::compile_model(const std::string& model_path, const AnyMap& config) {- OV_ITT_SCOPED_REGION_BASE(ov::itt::domains::OV, "Compile model");+ OV_ITT_SCOPED_REGION_BASE(ov::itt::domains::Phases, "Compile model");return compile_model(ov::util::make_path(model_path), ov::default_device_name, config);}#ifdef OPENVINO_ENABLE_UNICODE_PATH_SUPPORTCompiledModel Core::compile_model(const std::wstring& model_path, const AnyMap& config) {- OV_ITT_SCOPED_REGION_BASE(ov::itt::domains::OV, "Compile model");+ OV_ITT_SCOPED_REGION_BASE(ov::itt::domains::Phases, "Compile model");return compile_model(ov::util::make_path(model_path), config);}#endifCompiledModel Core::compile_model(const std::string& model_path, const std::string& device_name, const AnyMap& config) {- OV_ITT_SCOPED_REGION_BASE(ov::itt::domains::OV, "Compile model");+ OV_ITT_SCOPED_REGION_BASE(ov::itt::domains::Phases, "Compile model");return compile_model(ov::util::make_path(model_path), device_name, config);}@@ -156,7 +156,7 @@ CompiledModel Core::compile_model(const std::string& model_path, const std::striCompiledModel Core::compile_model(const std::wstring& model_path,const std::string& device_name,const AnyMap& config) {- OV_ITT_SCOPED_REGION_BASE(ov::itt::domains::OV, "Compile model");+ OV_ITT_SCOPED_REGION_BASE(ov::itt::domains::Phases, "Compile model");return compile_model(ov::util::make_path(model_path), device_name, config);}#endif@@ -165,7 +165,7 @@ CompiledModel Core::compile_model(const std::string& model,const ov::Tensor& weights,const std::string& device_name,const AnyMap& config) {- OV_ITT_SCOPED_REGION_BASE(ov::itt::domains::OV, "Compile model");+ OV_ITT_SCOPED_REGION_BASE(ov::itt::domains::Phases, "Compile model");OV_CORE_CALL_STATEMENT({auto exec = _impl->compile_model(model, weights, device_name, config);return {exec._ptr, exec._so};@@ -175,7 +175,7 @@ CompiledModel Core::compile_model(const std::string& model,CompiledModel Core::compile_model(const std::shared_ptr<const ov::Model>& model,const RemoteContext& context,const AnyMap& config) {- OV_ITT_SCOPED_REGION_BASE(ov::itt::domains::OV, "Compile model");+ OV_ITT_SCOPED_REGION_BASE(ov::itt::domains::Phases, "Compile model");OV_CORE_CALL_STATEMENT({auto exec = _impl->compile_model(model, ov::SoPtr<ov::IRemoteContext>{context._impl, context._so}, config);return {exec._ptr, exec._so};@@ -211,7 +211,7 @@ void Core::add_extension(const std::vector<std::shared_ptr<ov::Extension>>& exte}CompiledModel Core::import_model(std::istream& modelStream, const std::string& device_name, const AnyMap& config) {- OV_ITT_SCOPED_TASK(ov::itt::domains::OV, "Core::import_model");+ OV_ITT_SCOPED_REGION_BASE(ov::itt::domains::Phases, "Import Model");OV_CORE_CALL_STATEMENT({auto exec = _impl->import_model(modelStream, device_name, config);return {exec._ptr, exec._so};@@ -219,7 +219,7 @@ CompiledModel Core::import_model(std::istream& modelStream, const std::string& d}CompiledModel Core::import_model(std::istream& modelStream, const RemoteContext& context, const AnyMap& config) {- OV_ITT_SCOPED_TASK(ov::itt::domains::OV, "Core::import_model");+ OV_ITT_SCOPED_REGION_BASE(ov::itt::domains::Phases, "Import Model");OV_CORE_CALL_STATEMENT({auto exec = _impl->import_model(modelStream, ov::SoPtr<ov::IRemoteContext>{context._impl, context._so}, config);@@ -228,7 +228,7 @@ CompiledModel Core::import_model(std::istream& modelStream, const RemoteContext&}CompiledModel Core::import_model(const ov::Tensor& model, const std::string& device_name, const AnyMap& config) {- OV_ITT_SCOPED_TASK(ov::itt::domains::OV, "Core::import_model");+ OV_ITT_SCOPED_REGION_BASE(ov::itt::domains::Phases, "Import Model");OV_CORE_CALL_STATEMENT({auto exec = _impl->import_model(model, device_name, config);return {exec._ptr, exec._so};@@ -236,7 +236,7 @@ CompiledModel Core::import_model(const ov::Tensor& model, const std::string& dev}CompiledModel Core::import_model(const ov::Tensor& model, const RemoteContext& context, const AnyMap& config) {- OV_ITT_SCOPED_TASK(ov::itt::domains::OV, "Core::import_model");+ OV_ITT_SCOPED_REGION_BASE(ov::itt::domains::Phases, "Import Model");OV_CORE_CALL_STATEMENT({auto exec = _impl->import_model(model, ov::SoPtr<ov::IRemoteContext>{context._impl, context._so}, config);diff --git a/src/inference/src/itt.hpp b/src/inference/src/itt.hppindex 9a65f95aa8a..883fac52a99 100644--- a/src/inference/src/itt.hpp+++ b/src/inference/src/itt.hpp@@ -18,6 +18,8 @@ namespace domains {OV_ITT_DOMAIN(OV, "ov");OV_ITT_DOMAIN(ReadTime, "ov::ReadTime");OV_ITT_DOMAIN(LoadTime, "ov::LoadTime");+// Domain used for marking phases in the runtime+OV_ITT_DOMAIN(Phases, "ov::phases");} // namespace domains} // namespace itt} // namespace ovdiff --git a/src/plugins/intel_cpu/src/infer_request.cpp b/src/plugins/intel_cpu/src/infer_request.cppindex f5f655a1fc6..bbef187969b 100644--- a/src/plugins/intel_cpu/src/infer_request.cpp+++ b/src/plugins/intel_cpu/src/infer_request.cpp@@ -10,7 +10,6 @@#include <map>#include <memory>#include <oneapi/dnnl/dnnl_common.hpp>-#include <string>#include <string_view>#include <unordered_set>#include <utility>@@ -66,8 +65,7 @@ SyncInferRequest::SyncInferRequest(CompiledModelHolder compiled_model)}void SyncInferRequest::create_infer_request() {- m_profiling_task = openvino::itt::handle("INTEL_CPU_INFER_" + m_compiled_model.name() + "_" +- std::to_string(m_compiled_model.id()));+ m_profiling_task = openvino::itt::handle("SyncInferenceCPU::infer::" + m_compiled_model.name());// Alocate memory for each tensor if static shapefor (const auto& it : m_input_ports_map) {@@ -103,8 +101,7 @@ void SyncInferRequest::update_external_tensor_ptrs() {}void SyncInferRequest::infer() {- OV_ITT_SCOPED_TASK_BASE(itt::domains::ov_cpu_inference,- std::string("SyncInferenceCPU::infer::") + m_compiled_model.name());+ OV_ITT_SCOPED_TASK_BASE(itt::domains::ov_cpu_inference, m_profiling_task);auto graphLock = m_compiled_model.lock();auto&& graph = graphLock._graph;auto message = ov::threading::message_manager();