From 731eee379b7075421f3c1f40e099b48ef4e89838 Mon Sep 17 00:00:00 2001 From: Egor Duplensky Date: Fri, 13 Dec 2024 17:02:38 +0100 Subject: [PATCH] [CPU][DEBUG_CAPS] Fix average counters csv generation csv file was generated by default --- 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