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