From 74dea926b66d061e568b61d36b777b1010ffc4a9 Mon Sep 17 00:00:00 2001 From: Egor Duplenskii Date: Mon, 16 Dec 2024 09:49:03 +0100 Subject: [PATCH] [CPU][DEBUG_CAPS] Fix average counters csv generation (#28068) csv file was generated by default by mistake --- src/plugins/intel_cpu/src/graph_dumper.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/plugins/intel_cpu/src/graph_dumper.cpp b/src/plugins/intel_cpu/src/graph_dumper.cpp index 5a3a95362267fe..ffd58fdb162899 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) { * - _.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