Enum RewriterConfig.Toggle

java.lang.Object
java.lang.Enum<RewriterConfig.Toggle>
org.tensorflow.proto.RewriterConfig.Toggle
All Implemented Interfaces:
Internal.EnumLite, ProtocolMessageEnum, Serializable, Comparable<RewriterConfig.Toggle>
Enclosing class:
RewriterConfig

public static enum RewriterConfig.Toggle extends Enum<RewriterConfig.Toggle> implements ProtocolMessageEnum
Protobuf enum tensorflow.RewriterConfig.Toggle
  • Enum Constant Details

    • DEFAULT

      public static final RewriterConfig.Toggle DEFAULT
      DEFAULT = 0;
    • ON

      public static final RewriterConfig.Toggle ON
      ON = 1;
    • OFF

      public static final RewriterConfig.Toggle OFF
      OFF = 2;
    • AGGRESSIVE

      public static final RewriterConfig.Toggle AGGRESSIVE
      Enable some aggressive optimizations that use assumptions that TF graphs
      may break. For example, assume the shape of a placeholder matches its
      actual feed.
      
      AGGRESSIVE = 3;
    • EXPERIMENTAL_MLIR

      public static final RewriterConfig.Toggle EXPERIMENTAL_MLIR
      Run MLIR pass if there's one implemented in TFG, do nothing otherwise.
      I.e., if there's no corresponding TFG pass, it's an OFF. This is supposed
      to be mapped with `ON` and there's no `AGGRESSIVE` in MLIR pass now.
      
      EXPERIMENTAL_MLIR = 4;
    • EXPERIMENTAL_BOTH

      public static final RewriterConfig.Toggle EXPERIMENTAL_BOTH
      Run both MLIR and Grappler passes consecutively and MLIR pass will come
      first.
      
      EXPERIMENTAL_BOTH = 5;
    • UNRECOGNIZED

      public static final RewriterConfig.Toggle UNRECOGNIZED
  • Field Details

    • DEFAULT_VALUE

      public static final int DEFAULT_VALUE
      DEFAULT = 0;
      See Also:
    • ON_VALUE

      public static final int ON_VALUE
      ON = 1;
      See Also:
    • OFF_VALUE

      public static final int OFF_VALUE
      OFF = 2;
      See Also:
    • AGGRESSIVE_VALUE

      public static final int AGGRESSIVE_VALUE
      Enable some aggressive optimizations that use assumptions that TF graphs
      may break. For example, assume the shape of a placeholder matches its
      actual feed.
      
      AGGRESSIVE = 3;
      See Also:
    • EXPERIMENTAL_MLIR_VALUE

      public static final int EXPERIMENTAL_MLIR_VALUE
      Run MLIR pass if there's one implemented in TFG, do nothing otherwise.
      I.e., if there's no corresponding TFG pass, it's an OFF. This is supposed
      to be mapped with `ON` and there's no `AGGRESSIVE` in MLIR pass now.
      
      EXPERIMENTAL_MLIR = 4;
      See Also:
    • EXPERIMENTAL_BOTH_VALUE

      public static final int EXPERIMENTAL_BOTH_VALUE
      Run both MLIR and Grappler passes consecutively and MLIR pass will come
      first.
      
      EXPERIMENTAL_BOTH = 5;
      See Also:
  • Method Details

    • values

      public static RewriterConfig.Toggle[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static RewriterConfig.Toggle valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • getNumber

      public final int getNumber()
      Specified by:
      getNumber in interface Internal.EnumLite
      Specified by:
      getNumber in interface ProtocolMessageEnum
    • valueOf

      @Deprecated public static RewriterConfig.Toggle valueOf(int value)
      Deprecated.
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      value - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • forNumber

      public static RewriterConfig.Toggle forNumber(int value)
      Parameters:
      value - The numeric wire value of the corresponding enum entry.
      Returns:
      The enum associated with the given numeric wire value.
    • internalGetValueMap

      public static Internal.EnumLiteMap<RewriterConfig.Toggle> internalGetValueMap()
    • getValueDescriptor

      public final Descriptors.EnumValueDescriptor getValueDescriptor()
      Specified by:
      getValueDescriptor in interface ProtocolMessageEnum
    • getDescriptorForType

      public final Descriptors.EnumDescriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface ProtocolMessageEnum
    • getDescriptor

      public static final Descriptors.EnumDescriptor getDescriptor()
    • valueOf

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      desc - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null