syntax = "proto3";

package tensorflow.tfprof;

// It specifies the Python callstack that creates an op.
message CodeDef {
  repeated Trace traces = 1;
  message Trace {
    string file = 1;
    int32 lineno = 2;
    string function = 3;
    string line = 4;
  }
}

message OpLogEntry {
  // op name.
  string name = 1;
  // float_ops is filled by tfprof Python API when called. It requires the
  // op has RegisterStatistics defined. Currently, Conv2D, MatMul, etc, are
  // implemented.
  int64 float_ops = 2;
  // User can define extra op type information for an op. This allows the user
  // to select a group of ops precisely using op_type as a key.
  repeated string types = 3;
  // Used to support tfprof "code" view.
  CodeDef code_def = 4;
}

message OpLogProto {
  repeated OpLogEntry log_entries = 1;
}
