Skip to content

Commit

Permalink
Apply comments
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-k-park committed Feb 26, 2024
1 parent 886866a commit 67e8c72
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
5 changes: 4 additions & 1 deletion src/plugins/intel_gpu/src/graph/network.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -855,7 +855,7 @@ void network::execute_impl(const std::vector<event::ptr>& 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
Expand Down Expand Up @@ -1175,6 +1175,9 @@ void network::execute_impl(const std::vector<event::ptr>& 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<primitive_id> network::get_input_ids() const {
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/intel_gpu/src/graph/primitive_inst.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
7 changes: 5 additions & 2 deletions src/plugins/intel_gpu/src/runtime/debug_configuration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 67e8c72

Please sign in to comment.