Enum Class GraphOptimizationLevel
- All Implemented Interfaces:
Serializable, Comparable<GraphOptimizationLevel>, Constable
Graph optimization level for an ONNX Runtime session, corresponding to
GraphOptimizationLevel in the ONNX Runtime C API.
Higher optimization levels may increase session initialization time but typically reduce inference latency.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionDisable all optimizations.Enable all available optimizations.Enable basic optimizations (redundant node eliminations).Enable extended optimizations (complex node fusions).Enable layout optimizations. -
Method Summary
Modifier and TypeMethodDescriptionintvalue()Returns the ORT integer code.static GraphOptimizationLevelReturns the enum constant of this class with the specified name.static GraphOptimizationLevel[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DISABLE_ALL
Disable all optimizations. -
ENABLE_BASIC
Enable basic optimizations (redundant node eliminations). -
ENABLE_EXTENDED
Enable extended optimizations (complex node fusions). -
ENABLE_LAYOUT
Enable layout optimizations. -
ENABLE_ALL
Enable all available optimizations.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
value
public int value()Returns the ORT integer code.- Returns:
- the ORT integer code.
-