1syntax = "proto3"; 2 3package tensorflow; 4 5import "tensorflow/core/framework/tensor_description.proto"; 6 7option cc_enable_arenas = true; 8option java_outer_classname = "LogMemoryProtos"; 9option java_multiple_files = true; 10option java_package = "org.tensorflow.framework"; 11option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework/log_memory_go_proto"; 12 13message MemoryLogStep { 14 // Process-unique step id. 15 int64 step_id = 1; 16 17 // Handle describing the feeds and fetches of the step. 18 string handle = 2; 19} 20 21message MemoryLogTensorAllocation { 22 // Process-unique step id. 23 int64 step_id = 1; 24 25 // Name of the kernel making the allocation as set in GraphDef, 26 // e.g., "affine2/weights/Assign". 27 string kernel_name = 2; 28 29 // Allocated tensor details. 30 TensorDescription tensor = 3; 31} 32 33message MemoryLogTensorDeallocation { 34 // Id of the tensor buffer being deallocated, used to match to a 35 // corresponding allocation. 36 int64 allocation_id = 1; 37 38 // Name of the allocator used. 39 string allocator_name = 2; 40} 41 42message MemoryLogTensorOutput { 43 // Process-unique step id. 44 int64 step_id = 1; 45 46 // Name of the kernel producing an output as set in GraphDef, e.g., 47 // "affine2/weights/Assign". 48 string kernel_name = 2; 49 50 // Index of the output being set. 51 int32 index = 3; 52 53 // Output tensor details. 54 TensorDescription tensor = 4; 55} 56 57message MemoryLogRawAllocation { 58 // Process-unique step id. 59 int64 step_id = 1; 60 61 // Name of the operation making the allocation. 62 string operation = 2; 63 64 // Number of bytes in the allocation. 65 int64 num_bytes = 3; 66 67 // Address of the allocation. 68 uint64 ptr = 4; 69 70 // Id of the tensor buffer being allocated, used to match to a 71 // corresponding deallocation. 72 int64 allocation_id = 5; 73 74 // Name of the allocator used. 75 string allocator_name = 6; 76} 77 78message MemoryLogRawDeallocation { 79 // Process-unique step id. 80 int64 step_id = 1; 81 82 // Name of the operation making the deallocation. 83 string operation = 2; 84 85 // Id of the tensor buffer being deallocated, used to match to a 86 // corresponding allocation. 87 int64 allocation_id = 3; 88 89 // Name of the allocator used. 90 string allocator_name = 4; 91 92 // True if the deallocation is queued and will be performed later, 93 // e.g. for GPU lazy freeing of buffers. 94 bool deferred = 5; 95} 96