1syntax = "proto3";
2
3package tensorflow;
4
5// Next ID: 11
6message ProfileOptions {
7  // Some default value of option are not proto3 default value. Use this version
8  // to determine if we should use default option value instead of proto3
9  // default value.
10  uint32 version = 5;
11
12  enum DeviceType {
13    UNSPECIFIED = 0;
14    CPU = 1;
15    GPU = 2;
16    TPU = 3;
17  }
18
19  // Device type to profile/trace: (version >= 1)
20  // DeviceType::UNSPECIFIED: All registered device profiler will be enabled.
21  // DeviceType::CPU: only CPU will be profiled.
22  // DeviceType::GPU: only CPU/GPU will be profiled.
23  // DeviceType::TPU: only CPU/TPU will be profiled.
24  DeviceType device_type = 6;
25
26  // We don't collect the dataset ops by default for better trace-viewer
27  // scalability. The caller can mannually set this field to include the ops.
28  bool include_dataset_ops = 1;
29
30  // Levels of host tracing: (version >= 1)
31  // - Level 0 is used to disable host traces.
32  // - Level 1 enables tracing of only user instrumented (or default) TraceMe.
33  // - Level 2 enables tracing of all level 1 TraceMe(s) and instrumented high
34  //           level program execution details (expensive TF ops, XLA ops, etc).
35  //           This is the default.
36  // - Level 3 enables tracing of all level 2 TraceMe(s) and more verbose
37  //           (low-level) program execution details (cheap TF ops, etc).
38  uint32 host_tracer_level = 2;
39
40  // Levels of device tracing: (version >= 1)
41  // - Level 0 is used to disable device traces.
42  // - Level 1 is used to enable device traces.
43  // - More levels might be defined for specific device for controlling the
44  //   verbosity of the trace.
45  uint32 device_tracer_level = 3;
46
47  // Whether enable python function calls tracing. Runtime overhead ensues if
48  // enabled. Default off. (version >= 1)
49  uint32 python_tracer_level = 4;
50
51  // Whether serialize hlo_proto when XLA is used. (version >= 1)
52  bool enable_hlo_proto = 7;
53
54  // The local profiler starts profiling at this Unix timestamp in nanoseconds.
55  uint64 start_timestamp_ns = 8;
56
57  // The local profiler collects `duration_ms` milliseconds of data. If the
58  // value is 0, profiling continues until interrupted.
59  uint64 duration_ms = 9;
60
61  // Directory to save profile data to. No-op when empty.
62  string repository_path = 10;
63}
64
65// Options for remote profiler session manager.
66// Next ID: 6
67message RemoteProfilerSessionManagerOptions {
68  // Options for each local profiler.
69  ProfileOptions profiler_options = 1;
70
71  // List of servers to profile. Supported formats: host:port.
72  repeated string service_addresses = 2;
73
74  // Unix timestamp of when the session was started.
75  uint64 session_creation_timestamp_ns = 3;
76
77  // Maximum time (in milliseconds) a profiling session manager waits for all
78  // profilers to finish after issuing gRPC request. If value is 0, session
79  // continues until interrupted. Otherwise, value must be greater than
80  // profiler_options.duration_ms.
81  uint64 max_session_duration_ms = 4;
82
83  // Start of profiling is delayed by this much (in milliseconds).
84  uint64 delay_ms = 5;
85}
86