|
75 | 75 | #include "utils/node_dumper.h" |
76 | 76 | #include "utils/verbose.h" |
77 | 77 | #include "weights_cache.hpp" |
| 78 | +#include "linux_perf.hpp" |
78 | 79 |
|
79 | 80 | #if (OV_THREAD == OV_THREAD_TBB || OV_THREAD == OV_THREAD_TBB_AUTO) |
80 | 81 | # include <tbb/task.h> |
@@ -1208,6 +1209,7 @@ bool Graph::ProcessDynNodes() const { |
1208 | 1209 |
|
1209 | 1210 | void Graph::PushInputData(const std::size_t& index, const ov::SoPtr<ITensor>& input) { |
1210 | 1211 | OPENVINO_ASSERT(IsReady(), "Wrong state. Topology not ready."); |
| 1212 | + auto prof=LinuxPerf::Profile("Graph::PushInputData"); |
1211 | 1213 | if (index < inputNodes.size() && inputNodes[index]) { |
1212 | 1214 | auto node = inputNodes[index]; |
1213 | 1215 | auto childEdge = node->getChildEdgeAt(0); |
@@ -1239,7 +1241,7 @@ void Graph::PushInputData(const std::size_t& index, const ov::SoPtr<ITensor>& in |
1239 | 1241 | // suppose always being shared infer_request intel_cpu::Tensor to Graph if isDynamic. |
1240 | 1242 | void Graph::PullOutputData(std::unordered_map<std::size_t, ov::SoPtr<ITensor>>& output) { |
1241 | 1243 | OPENVINO_ASSERT(IsReady(), "Wrong state. Topology not ready."); |
1242 | | - |
| 1244 | + auto prof=LinuxPerf::Profile("Graph::PullOutputData"); |
1243 | 1245 | for (size_t output_index = 0; output_index < outputNodes.size(); ++output_index) { |
1244 | 1246 | auto node = outputNodes[output_index]; |
1245 | 1247 | auto parentEdge = node->getParentEdgeAt(0); |
@@ -1352,6 +1354,8 @@ VecMemoryDescs Graph::getOutputMemoryDescriptors() const { |
1352 | 1354 |
|
1353 | 1355 | void Graph::InferStatic(SyncInferRequest* request, int numaId) { |
1354 | 1356 | for (const auto& node : m_executableGraphNodes) { |
| 1357 | + auto prof = LinuxPerf::Profile("Graph::InferStatic::ExecuteNode: type:" + node->getTypeStr() + |
| 1358 | + " name:" + node->getName()); |
1355 | 1359 | ExecuteNodeWithCatch(node, request, numaId); |
1356 | 1360 | } |
1357 | 1361 | } |
@@ -1625,6 +1629,8 @@ void Graph::InferDynamic(SyncInferRequest* request, int numaId, UpdateStrategy&& |
1625 | 1629 |
|
1626 | 1630 | for (; inferCounter < stopIndx; ++inferCounter) { |
1627 | 1631 | auto& node = m_executableGraphNodes[inferCounter]; |
| 1632 | + auto prof = LinuxPerf::Profile("Graph::InferDynamic::ExecuteNode: type:" + node->getTypeStr() + |
| 1633 | + " name:" + node->getName()); |
1628 | 1634 |
|
1629 | 1635 | ExecuteNodeWithCatch(node, request, numaId); |
1630 | 1636 | } |
|
0 commit comments