Skip to content

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

[CPU][DEBUG_CAPS] Fix average counters csv generation (#28068)

Egor Duplenskii2cbe4b7d7bb1
diff --git a/src/plugins/intel_cpu/src/graph_dumper.cpp b/src/plugins/intel_cpu/src/graph_dumper.cpp
index 5a3a9536226..ffd58fdb162 100644
--- a/src/plugins/intel_cpu/src/graph_dumper.cpp
+++ b/src/plugins/intel_cpu/src/graph_dumper.cpp
@@ -357,12 +357,16 @@ void average_counters(const Graph& graph) {
* - <nesting-level>_<graph-name>.csv
* For example: 0_MyModel.csv
*/
+
+ const std::string& path = graph.getConfig().debugCaps.averageCountersPath;
+
+ if (path.empty())
+ return;
+
static int graphIndex = 0;
+ std::string fileName = path + "_" + std::to_string(graphIndex++) + ".csv";
std::ofstream file;
- std::string fileName =
- graph.getConfig().debugCaps.averageCountersPath + "_" + std::to_string(graphIndex++) + ".csv";
-
file.open(fileName);
// table structure is identical to the benchmark_app average_counters report