Add KernelLaunch and KernelExecute event types.

PiperOrigin-RevId: 291844655
Change-Id: I002aa2a71e35b60a502394a1a5da13ea73290a78
This commit is contained in:
Jiho Choi 2020-01-27 18:30:51 -08:00 committed by TensorFlower Gardener
parent 05445032af
commit d641d29ca5
2 changed files with 7 additions and 1 deletions

View File

@ -77,6 +77,9 @@ const HostEventTypeMap& GetHostEventTypeMap() {
{"WhileOp-StartBody", kWhileOpStartBody},
{"ForOp", kForOp},
{"PartitionedCallOp", kPartitionedCallOp},
// GPU related.
{"KernelLaunch", kKernelLaunch},
{"KernelExecute", kKernelExecute},
});
DCHECK_EQ(host_event_type_map->size(), kNumHostEventTypes);
return *host_event_type_map;

View File

@ -69,7 +69,10 @@ enum HostEventType {
kWhileOpStartBody,
kForOp,
kPartitionedCallOp,
kLastHostEventType = kPartitionedCallOp,
// GPU related.
kKernelLaunch,
kKernelExecute,
kLastHostEventType = kKernelExecute,
};
enum StatType {