!13821 skip empty graph in profiling

From: @jojobugfree
Reviewed-by: @zhoufeng54,@kisnwang
Signed-off-by: @zhoufeng54
This commit is contained in:
mindspore-ci-bot 2021-03-23 19:30:11 +08:00 committed by Gitee
commit a12ae4286a
1 changed files with 3 additions and 0 deletions

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);