Group TF1 profiles using the distributed runtime.

PiperOrigin-RevId: 308713981
Change-Id: Ie87148827e5db951e653e3af36b27165cef9d7e2
This commit is contained in:
Jiho Choi 2020-04-27 15:46:45 -07:00 committed by TensorFlower Gardener
parent 92978b84d0
commit a59f9bac82
3 changed files with 13 additions and 1 deletions

View File

@ -422,6 +422,15 @@ std::vector<InterThreadConnectInfo> 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<int64 /*EventType*/> 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) {

View File

@ -65,6 +65,7 @@ const HostEventTypeMap& GetHostEventTypeMap() {
{"SessionRun", kSessionRun},
{"FunctionRun", kFunctionRun},
{"RunGraph", kRunGraph},
{"RunGraphDone", kRunGraphDone},
{"TfOpRun", kTfOpRun},
{"EagerKernelExecute", kEagerKernelExecute},
{"ExecutorState::Process", kExecutorStateProcess},

View File

@ -67,6 +67,7 @@ enum HostEventType {
kSessionRun,
kFunctionRun,
kRunGraph,
kRunGraphDone,
kTfOpRun,
kEagerKernelExecute,
kExecutorStateProcess,