Home | History | Annotate | Download | only in framework
      1 syntax = "proto3";
      2 
      3 package tensorflow;
      4 option cc_enable_arenas = true;
      5 option java_outer_classname = "StepStatsProtos";
      6 option java_multiple_files = true;
      7 option java_package = "org.tensorflow.framework";
      8 
      9 import "tensorflow/core/framework/allocation_description.proto";
     10 import "tensorflow/core/framework/tensor_description.proto";
     11 
     12 // An allocation/de-allocation operation performed by the allocator.
     13 message AllocationRecord {
     14   // The timestamp of the operation.
     15   int64 alloc_micros = 1;
     16   // Number of bytes allocated, or de-allocated if negative.
     17   int64 alloc_bytes = 2;
     18 }
     19 
     20 message AllocatorMemoryUsed {
     21   string allocator_name = 1;
     22   // These are per-node allocator memory stats.
     23   int64 total_bytes = 2;
     24   int64 peak_bytes = 3;
     25   // The bytes that are not deallocated.
     26   int64 live_bytes = 4;
     27   // The allocation and deallocation timeline.
     28   repeated AllocationRecord allocation_records = 6;
     29 
     30   // These are snapshots of the overall allocator memory stats.
     31   // The number of live bytes currently allocated by the allocator.
     32   int64 allocator_bytes_in_use = 5;
     33 }
     34 
     35 // Output sizes recorded for a single execution of a graph node.
     36 message NodeOutput {
     37   int32 slot = 1;
     38   TensorDescription tensor_description = 3;
     39 };
     40 
     41 // For memory tracking.
     42 message MemoryStats {
     43   int64 temp_memory_size = 1;
     44   int64 persistent_memory_size = 3;
     45   repeated int64 persistent_tensor_alloc_ids = 5;
     46 
     47   int64 device_temp_memory_size = 2 [deprecated = true];
     48   int64 device_persistent_memory_size = 4 [deprecated = true];
     49   repeated int64 device_persistent_tensor_alloc_ids = 6 [deprecated = true];
     50 }
     51 
     52 // Time/size stats recorded for a single execution of a graph node.
     53 message NodeExecStats {
     54   // TODO(tucker): Use some more compact form of node identity than
     55   // the full string name.  Either all processes should agree on a
     56   // global id (cost_id?) for each node, or we should use a hash of
     57   // the name.
     58   string node_name = 1;
     59   int64 all_start_micros = 2;
     60   int64 op_start_rel_micros = 3;
     61   int64 op_end_rel_micros = 4;
     62   int64 all_end_rel_micros = 5;
     63   repeated AllocatorMemoryUsed memory = 6;
     64   repeated NodeOutput output = 7;
     65   string timeline_label = 8;
     66   int64 scheduled_micros = 9;
     67   uint32 thread_id = 10;
     68   repeated AllocationDescription referenced_tensor = 11;
     69   MemoryStats memory_stats = 12;
     70 };
     71 
     72 message DeviceStepStats {
     73   string device = 1;
     74   repeated NodeExecStats node_stats = 2;
     75 }
     76 
     77 message StepStats {
     78   repeated DeviceStepStats dev_stats = 1;
     79 };
     80