1syntax = "proto3"; 2 3package tensorflow.profiler; 4 5// All possible execution modes of a tf-function. 6enum TfFunctionExecutionMode { 7 // Yet to be set. 8 INVALID_MODE = 0; 9 // Eager execution. 10 EAGER_MODE = 1; 11 // Graph execution with tracing. 12 TRACED_MODE = 2; 13 // Graph execution without tracing. 14 NOT_TRACED_MODE = 3; 15 // Concrete function. 16 CONCRETE_MODE = 4; 17} 18 19// All possible compilers that can be used to compile a tf-function in the graph 20// mode. 21enum TfFunctionCompiler { 22 // Yet to be set. 23 INVALID_COMPILER = 0; 24 // Any other compiler. 25 OTHER_COMPILER = 1; 26 // If some instance of the function is compiled with XLA and some is compiled 27 // with Non-XLA, use "MIXED_COMPILER". 28 MIXED_COMPILER = 2; 29 // XLA compiler. 30 XLA_COMPILER = 3; 31 // MLIR compiler. 32 MLIR_COMPILER = 4; 33} 34 35// Metrics associated with a particular execution mode of a tf-function. 36message TfFunctionMetrics { 37 // Number of invocations to the function in that execution mode. 38 uint64 count = 1; 39 // The sum of "self-execution" time of this function over those invocations. 40 uint64 self_time_ps = 2; 41} 42 43// Statistics for a tf-function. 44message TfFunction { 45 // A map from each execution mode to its corresponding metrics. 46 map<int32, TfFunctionMetrics> metrics = 1; 47 // Total tracing count from the program's beginning (i.e. beyond the profiling 48 // period) of this tf-function. 49 int64 total_tracing_count = 2; 50 // Compiler used to compile this function. 51 TfFunctionCompiler compiler = 3; 52 // Percentage of time spent in the expensive calls to this function in the 53 // profiled period. 54 double expensive_call_percent = 4; 55} 56 57// Statistics for all tf-functions. 58message TfFunctionDb { 59 // A map from function name to the statistics of that function. 60 map<string, TfFunction> tf_functions = 1; 61} 62