syntax = "proto3";

package tensorflow;
option cc_enable_arenas = true;
option java_outer_classname = "RewriterConfigProtos";
option java_multiple_files = true;
option java_package = "org.tensorflow.framework";

message AutoParallelOptions {
  bool enable = 1;
  int32 num_replicas = 2;
}

message RewriterConfig {
  // Graph rewriting is experimental and subject to change, not subject to any
  // API guarantees.

  bool optimize_tensor_layout = 1;
  bool disable_model_pruning = 2;
  bool constant_folding = 3;

  enum MemOptType {
    // Fully disabled
    NO_MEM_OPT = 0;
    // Driven by manual annotations
    MANUAL = 1;
  }
  MemOptType memory_optimization = 4;

  AutoParallelOptions auto_parallel = 5;

  // If non-empty, will use this as an alternative way to specify a list of
  // optimizations to turn on and the order of the optimizations.
  repeated string optimizers = 100;
}
