Browse Source

!13821 skip empty graph in profiling

From: @jojobugfree
Reviewed-by: @zhoufeng54,@kisnwang
Signed-off-by: @zhoufeng54
pull/13821/MERGE
mindspore-ci-bot Gitee 4 years ago
parent
commit
a12ae4286a
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      mindspore/ccsrc/runtime/device/ascend/profiling/profiling_utils.cc

+ 3
- 0
mindspore/ccsrc/runtime/device/ascend/profiling/profiling_utils.cc View File

@@ -63,6 +63,9 @@ ProfilingTraceInfo ProfilingUtils::GetProfilingTraceFromEnv(NotNull<const sessio
auto profiling_option = GetContextProfilingOption();

ProfilingTraceInfo profiling_trace;
if (cnode_exec_order.empty()) {
return profiling_trace;
}
profiling_trace.trace_begin = GetTraceBegin(cnode_exec_order, profiling_option);
profiling_trace.trace_bp_end = GetTraceBpEnd(cnode_exec_order, profiling_option);
profiling_trace.trace_netoutput = GetTraceNetoutput(cnode_exec_order, profiling_option);


Loading…
Cancel
Save