diff --git a/src/plugins/template/src/sync_infer_request.cpp b/src/plugins/template/src/sync_infer_request.cpp index e788142dfb3991..fa87f4e9bd4fe5 100644 --- a/src/plugins/template/src/sync_infer_request.cpp +++ b/src/plugins/template/src/sync_infer_request.cpp @@ -17,6 +17,7 @@ #include "openvino/runtime/make_tensor.hpp" #include "openvino/runtime/profiling_info.hpp" #include "openvino/runtime/tensor.hpp" +#include "perf_counter.hpp" #include "plugin.hpp" #include "remote_tensor.hpp" #include "template/remote_tensor.hpp" @@ -268,9 +269,19 @@ std::vector ov::template_plugin::InferRequest::get_profiling_ p_info.cpu_time = p_info.real_time = std::chrono::duration_cast(time); return p_info; }; + info.emplace_back(fill_profiling_info("input preprocessing", m_durations[Preprocess])); info.emplace_back(fill_profiling_info("execution time", m_durations[StartPipeline])); + auto template_model = get_template_model(); + for (const auto& op : template_model->get_runtime_model()->get_ops()) { + auto rt_info = op->get_rt_info(); + const auto& it = rt_info.find(ov::runtime::interpreter::PERF_COUNTER_NAME); + OPENVINO_ASSERT(it != rt_info.end(), "Operation ", op, " doesn't contain performance counter"); + auto counter = it->second.as>(); + info.emplace_back(fill_profiling_info(op->get_friendly_name(), counter->duration())); + } info.emplace_back(fill_profiling_info("output postprocessing", m_durations[Postprocess])); + return info; } // ! [infer_request:get_profiling_info]