aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/framework/log_memory.proto
blob: 7f37eadc3bed0a03311232b32a52d7fce07f8021 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
syntax = "proto3";

package tensorflow;
option cc_enable_arenas = true;
option java_outer_classname = "LogMemoryProtos";
option java_multiple_files = true;
option java_package = "org.tensorflow.framework";
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework";
import "tensorflow/core/framework/tensor_description.proto";

message MemoryLogStep {
  // Process-unique step id.
  int64 step_id = 1;

  // Handle describing the feeds and fetches of the step.
  string handle = 2;
};

message MemoryLogTensorAllocation {
  // Process-unique step id.
  int64 step_id = 1;

  // Name of the kernel making the allocation as set in GraphDef,
  // e.g., "affine2/weights/Assign".
  string kernel_name = 2;

  // Allocated tensor details.
  TensorDescription tensor = 3;
};

message MemoryLogTensorDeallocation {
  // Id of the tensor buffer being deallocated, used to match to a
  // corresponding allocation.
  int64 allocation_id = 1;

  // Name of the allocator used.
  string allocator_name = 2;
};

message MemoryLogTensorOutput {
  // Process-unique step id.
  int64 step_id = 1;

  // Name of the kernel producing an output as set in GraphDef, e.g.,
  // "affine2/weights/Assign".
  string kernel_name = 2;

  // Index of the output being set.
  int32 index = 3;

  // Output tensor details.
  TensorDescription tensor = 4;
}

message MemoryLogRawAllocation {
  // Process-unique step id.
  int64 step_id = 1;

  // Name of the operation making the allocation.
  string operation = 2;

  // Number of bytes in the allocation.
  int64 num_bytes = 3;

  // Address of the allocation.
  uint64 ptr = 4;

  // Id of the tensor buffer being allocated, used to match to a
  // corresponding deallocation.
  int64 allocation_id = 5;

  // Name of the allocator used.
  string allocator_name = 6;
};

message MemoryLogRawDeallocation {
  // Process-unique step id.
  int64 step_id = 1;

  // Name of the operation making the deallocation.
  string operation = 2;

  // Id of the tensor buffer being deallocated, used to match to a
  // corresponding allocation.
  int64 allocation_id = 3;

  // Name of the allocator used.
  string allocator_name = 4;

  // True if the deallocation is queued and will be performed later,
  // e.g. for GPU lazy freeing of buffers.
  bool deferred = 5;
};