syntax = "proto2";

package tensorflow;

import "tensorflow/core/framework/node_def.proto";
import "tensorflow/core/framework/tensor.proto";
import "tensorflow/core/framework/tensor_shape.proto";
import "tensorflow/core/framework/types.proto";

message TfCallbackData {
  message BufferDescription {
    optional TensorShapeProto shape = 1;
    optional DataType type = 2;
  }

  message InputBufferDescription {
    optional BufferDescription buffer_description = 1;

    // The input value might be already fixed at the compilation time.
    // This value may or may not be present.
    optional TensorProto value = 2;
  }

  message OutputBufferDescription {
    optional BufferDescription buffer_description = 1;
    // Whether the buffer stores dynamically padded data: in that case, actual
    // concrete dimensions need to be stored after the buffer.
    optional bool is_dynamically_padded = 2;
  }

  optional tensorflow.NodeDef op = 1;
  repeated InputBufferDescription inputs = 2;
  repeated OutputBufferDescription outputs = 3;
}
