From 67e8c7255d0bd587fd5da3853fb129ef67bf36a0 Mon Sep 17 00:00:00 2001 From: Andrew Park Date: Tue, 27 Feb 2024 08:52:19 +0900 Subject: [PATCH] Apply comments --- src/plugins/intel_gpu/src/graph/network.cpp | 5 ++++- src/plugins/intel_gpu/src/graph/primitive_inst.cpp | 4 ++-- src/plugins/intel_gpu/src/runtime/debug_configuration.cpp | 7 +++++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/plugins/intel_gpu/src/graph/network.cpp b/src/plugins/intel_gpu/src/graph/network.cpp index a925a8f17c1ed7..9db77d3e059b25 100644 --- a/src/plugins/intel_gpu/src/graph/network.cpp +++ b/src/plugins/intel_gpu/src/graph/network.cpp @@ -855,7 +855,7 @@ void network::execute_impl(const std::vector& events) { int64_t curr_iter = -1; GPU_DEBUG_GET_INSTANCE(debug_config); #ifdef GPU_DEBUG_CONFIG - curr_iter = iteration++; + curr_iter = iteration; #endif // Wait for previous execution completion @@ -1175,6 +1175,9 @@ void network::execute_impl(const std::vector& events) { GPU_DEBUG_IF(debug_config->dump_runtime_memory_pool > 0) { get_memory_pool().dump(get_id()); } +#ifdef GPU_DEBUG_CONFIG + iteration++; +#endif } std::vector network::get_input_ids() const { diff --git a/src/plugins/intel_gpu/src/graph/primitive_inst.cpp b/src/plugins/intel_gpu/src/graph/primitive_inst.cpp index a3a8912c47439c..c4975da37d8145 100644 --- a/src/plugins/intel_gpu/src/graph/primitive_inst.cpp +++ b/src/plugins/intel_gpu/src/graph/primitive_inst.cpp @@ -2076,7 +2076,7 @@ void primitive_inst::add_profiling_data(instrumentation::pipeline_stage stage, b #ifdef GPU_DEBUG_CONFIG int64_t curr_iter = -1; GPU_DEBUG_IF(debug_config->dump_prof_data_iter_params.is_enabled) { - curr_iter = get_network().get_current_iteration_num() - 1; + curr_iter = get_network().get_current_iteration_num(); } GPU_DEBUG_IF(curr_iter < 0 || debug_config->is_target_dump_prof_data_iteration(curr_iter)) { #else @@ -2089,7 +2089,7 @@ void primitive_inst::add_profiling_data(instrumentation::pipeline_stage stage, b get_implementation_name(), stage, #ifdef GPU_DEBUG_CONFIG - per_iter_mode ? get_network().get_current_iteration_num() - 1 : 0, + per_iter_mode ? get_network().get_current_iteration_num() : 0, #else 0, #endif diff --git a/src/plugins/intel_gpu/src/runtime/debug_configuration.cpp b/src/plugins/intel_gpu/src/runtime/debug_configuration.cpp index 0d65b85d23c1d6..b03ddf9041c485 100644 --- a/src/plugins/intel_gpu/src/runtime/debug_configuration.cpp +++ b/src/plugins/intel_gpu/src/runtime/debug_configuration.cpp @@ -116,8 +116,11 @@ static void print_help_messages() { " Please use OV_GPU_DumpProfilingDataPerIter=1 env variable to collect performance per iteration." " Note: Performance impact may be significant as this option enforces host side sync after each primitive"); message_list.emplace_back("OV_GPU_DumpProfilingDataIteration", "Enable collecting profiling data only at iterations with requested range. " - "For example for dump profiling data only when iteration is from 10 to 20, " - "you can use OV_GPU_DumpProfilingDataIteration='10..20'"); + "For example for dump profiling data only when iteration is from 10 to 20, you can use " + "OV_GPU_DumpProfilingDataIteration='10..20'. Additionally, you can dump profiling data only " + "from one specific iteration by giving the same values for the start and end, and the open " + "ended range is also available by range from given start to the last iteration as -1. e.g. " + "OV_GPU_DumpProfilingDataIteration='10..-1'"); message_list.emplace_back("OV_GPU_DumpGraphs", "1) dump ngraph before and after transformation. 2) dump graph in model compiling." "3) dump graph in execution."); message_list.emplace_back("OV_GPU_DumpSources", "Dump opencl sources");