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