message: Added EdgeTpuSettings for the EdgeTpuDelegate.
diff: @@ -51,8 +51,6 @@ enum Delegate {
  GPU = 2;
  HEXAGON = 3;
  XNNPACK = 4;
  - // TODO(b/157893534): Support exposing edgetpu tflite delegate creation
  - // options.
  EDGETPU = 5;
  }
  @@ -162,6 +160,43 @@ message XNNPackSettings {
  optional int32 num_threads = 1;
  }
  +// EdgeTPU Delegate settings
  +//
  +message EdgeTpuSettings {
  + // Generic definitions of EdgeTPU power states.
  + enum PowerState {
  + // Undefined power state.
  + UNDEFINED = 0;
  +
  + // TPU core is off but control cluster is on.
  + TPU_CORE_OFF = 1;
  +
  + // A non-active low-power state that has much smaller transition time to
  + // active compared to off.
  + READY = 2;
  +
  + // Device is inactive but ready and all previous data is retained (e.g.
  + // cached parameters).
  + READY_WITH_RETENTION = 3;
  +
  + // Minimum power active state.
  + ACTIVE_MIN_POWER = 4;
  +
  + // Low performance, low power.
  + ACTIVE_LOW_POWER = 5;
  +
  + // The normal performance and power. This setting usually provides the
  + // optimal perf/power trade-off for the average use-case.
  + ACTIVE = 6;
  +
  + // Maximum performance level. Potentially higher power and thermal. This
  + // setting may not be allowed in production depending on the system.
  + OVER_DRIVE = 7;
  + }
  +
  + optional PowerState inference_power_state = 1;
  +}
  +
  message CPUSettings {
  optional int32 num_threads = 1;
  }
  @@ -185,6 +220,9 @@ message TFLiteSettings {
  // Shared delegation settings.
  optional int32 max_delegated_partitions = 7;
  +
  + // For configuring the EdgeTpuDelegate.
  + optional EdgeTpuSettings edgetpu_settings = 8;
  }
  // Whether to automatically fallback to TFLite CPU path on delegation errors.
  