Add memory cost breakdown per operation type and memory space to OpMetrics.

PiperOrigin-RevId: 312741555
Change-Id: Id6666a8c6b9d67fe443154fb135cadeeeaecebdc
This commit is contained in:
Jiho Choi 2020-05-21 14:28:20 -07:00 committed by TensorFlower Gardener
parent d0a5894b58
commit 8d7f18b250

View File

@ -26,7 +26,7 @@ message LayoutAnalysis {
}
// Metrics for an operation (accumulated over all occurrences).
// Next ID: 19
// Next ID: 20
message OpMetrics {
// HLO module id. 0 for TF ops.
uint64 hlo_module_id = 13;
@ -50,6 +50,19 @@ message OpMetrics {
uint64 flops = 2;
// Total bytes accessed.
uint64 bytes_accessed = 5;
// Breakdown of memory accessed by operation type and memory space.
message MemoryAccessed {
enum OperationType {
UNKNOWN = 0;
READ = 1;
WRITE = 2;
}
OperationType operation_type = 1;
// Device-specific id of memory space.
uint64 memory_space = 2;
uint64 bytes_accessed = 3;
}
repeated MemoryAccessed memory_accessed_breakdown = 19;
// Total dma stall time in picoseconds.
uint64 dma_stall_ps = 10;
// The data layout for this op. Only set for convolution ops for now.