diff --git a/tensorflow/core/profiler/utils/group_events.cc b/tensorflow/core/profiler/utils/group_events.cc index f19aab4249c..c51b9a043cf 100644 --- a/tensorflow/core/profiler/utils/group_events.cc +++ b/tensorflow/core/profiler/utils/group_events.cc @@ -422,6 +422,15 @@ std::vector CreateInterThreadConnectInfoList() { {HostEventType::kSessionRun, HostEventType::kExecutorDoneCallback, {StatType::kStepId}}, + {HostEventType::kRunGraph, + HostEventType::kExecutorStateProcess, + {StatType::kStepId}}, + {HostEventType::kRunGraph, + HostEventType::kExecutorDoneCallback, + {StatType::kStepId}}, + {HostEventType::kRunGraph, + HostEventType::kRunGraphDone, + {StatType::kStepId}}, {HostEventType::kExecutorStateProcess, HostEventType::kIteratorGetNextOp, {StatType::kStepId, StatType::kIterNum}}, @@ -450,7 +459,8 @@ void GroupTfEvents(XSpace* space, EventGroupNameMap* event_group_name_map) { CreateInterThreadConnectInfoList(); const std::vector root_event_types( {HostEventType::kTraceContext, HostEventType::kFunctionRun, - HostEventType::kSessionRun, HostEventType::kHostTrainingLoopIteration}); + HostEventType::kSessionRun, HostEventType::kRunGraph, + HostEventType::kHostTrainingLoopIteration}); EventForest event_forest(connect_info_list, root_event_types, CreateTfXPlaneVisitor, space); if (event_group_name_map) { diff --git a/tensorflow/core/profiler/utils/xplane_schema.cc b/tensorflow/core/profiler/utils/xplane_schema.cc index 2851b572593..0a2cc52c0c0 100644 --- a/tensorflow/core/profiler/utils/xplane_schema.cc +++ b/tensorflow/core/profiler/utils/xplane_schema.cc @@ -65,6 +65,7 @@ const HostEventTypeMap& GetHostEventTypeMap() { {"SessionRun", kSessionRun}, {"FunctionRun", kFunctionRun}, {"RunGraph", kRunGraph}, + {"RunGraphDone", kRunGraphDone}, {"TfOpRun", kTfOpRun}, {"EagerKernelExecute", kEagerKernelExecute}, {"ExecutorState::Process", kExecutorStateProcess}, diff --git a/tensorflow/core/profiler/utils/xplane_schema.h b/tensorflow/core/profiler/utils/xplane_schema.h index 427a3a2968d..432c948582d 100644 --- a/tensorflow/core/profiler/utils/xplane_schema.h +++ b/tensorflow/core/profiler/utils/xplane_schema.h @@ -67,6 +67,7 @@ enum HostEventType { kSessionRun, kFunctionRun, kRunGraph, + kRunGraphDone, kTfOpRun, kEagerKernelExecute, kExecutorStateProcess,