• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1syntax = "proto3";
2
3package tensorflow;
4
5import "tensorflow/core/framework/graph.proto";
6
7// Tensor Tracer Report proto gives information about the trace including:
8// - TensorTracerConfig: version, device, num replicas, trace mode.
9// - Graphdef, e.g., list of operations, tensors
10// - TracedTensorDef:
11//    * Name of the tensor
12//    * Tracepoint name if provided.
13//    * Index of the tensor in the compact cache if traced.
14//    * Explanation for why the tensor is traced or not.
15message TensorTracerReport {
16  TensorTracerConfig config = 1;
17
18  // Tensorflow graph.
19  tensorflow.GraphDef graphdef = 2;
20
21  // A map from tensor name to its TracedTensorDef.
22  map<string, TracedTensorDef> tensordef = 3;
23
24  message TensorTracerConfig {
25    // Tensor tracer version, e.g. hostcall, outside compilation.
26    string version = 1;
27    // Traced device, CPU, TPU...
28    string device = 2;
29
30    // Trace mode, norm, summary, full-trace.
31    string trace_mode = 3;
32
33    // Number of cores, e.g. TPU cores, in the system.
34    int32 num_cores = 4;
35
36    // Number of hosts, e.g. compute nodes in the system.
37    int32 num_hosts = 5;
38
39    // Keep submode as string for backward compatibility.
40    string submode = 6;
41
42    // Keep num cores per host for backward compatibility.
43    int32 num_cores_per_host = 7;
44
45    // Id of the included cores, if a subset of cores are traced.
46    repeated int32 included_cores = 8;
47
48    // The names of the signatures corresponding to the cache indices.
49    repeated string signatures = 9;
50  }
51
52  message TracedTensorDef {
53    // Name of the tensor as appears in tf graph.
54    string name = 1;
55    // Cache index of the tensor. This may be different than topological index.
56    int32 cache_index = 2;
57    // If trace points are provided, corresponding tracepoint name of the
58    // tensor. Trace points are placed on the edges (tensors) in the tensorflow
59    // graph, and they force tensor tracer to trace the corresponding tensor.
60    // Tracepoints can be added using the programatic interface
61    // tensor_tracer.tensor_tracepoint(tensor, trace_point_name) function.
62    // This will add a trace point with the given trace_point_name for the given
63    // tensor. If a trace_point is provided for the tensor,
64    // trace_point name will be used for the rest of the analysis instead of
65    // tensor names. One can use trace_point_name's to compare two models with
66    // arbitrary tensor names by providing the same trace point name for the
67    // tensors that are comparable.
68    string trace_point_name = 3;
69    // Whether the tensor is traced or not.
70    bool is_traced = 4;
71    // Detailed explanation why the tensor is traced or not.
72    string explanation = 5;
73  }
74}
75