Package apple.mlcompute.enums
Class MLCGraphCompilationOptions
- java.lang.Object
-
- apple.mlcompute.enums.MLCGraphCompilationOptions
-
public final class MLCGraphCompilationOptions extends java.lang.Object[@enum] MLCGraphCompilationOptions A bitmask that specifies the options you use when compiling a graph. This is passed as an argument to the compileWithOptions method avalable on MLCTrainingGraph and MLCInferenceGraph
-
-
Field Summary
Fields Modifier and Type Field Description static longComputeAllGradientsThe option to compute all gradients during graph compilation.static longDebugLayersThe option to debug layers during graph compilation.static longDisableLayerFusionThe option to disable layer fusion during graph compilation.static longLinkGraphsThe option to link graphs during graph compilation.static longNoneNo graph compilation options.
-
-
-
Field Detail
-
None
public static final long None
No graph compilation options.- See Also:
- Constant Field Values
-
DebugLayers
public static final long DebugLayers
The option to debug layers during graph compilation. Include this option to disable various optimizations such as layer fusion, and ensure the framework synchronizes the resulting forward and gradients tensors host memory with device memory, for layers marked as debuggable.- See Also:
- Constant Field Values
-
DisableLayerFusion
public static final long DisableLayerFusion
The option to disable layer fusion during graph compilation. Include this option to disable fusion of layers, which is an important optimization that helps performance and memory footprint.- See Also:
- Constant Field Values
-
LinkGraphs
public static final long LinkGraphs
The option to link graphs during graph compilation. Include this option when you link together one or more sub-graphs when executing the forward, gradient, and optimizer update. For example, if the full computation graph includes a layer that the framework doesn’t support, you’ll need to create multiple sub-graphs and link them together using \p MLCGraphCompilationOptionsLinkGraphs. When doing so, include this option when you call \p -compileWithOptions: for graphs you want to link together.- See Also:
- Constant Field Values
-
ComputeAllGradients
public static final long ComputeAllGradients
The option to compute all gradients during graph compilation. Include this option to compute gradients for layers with or without parameters that only take input tensors. For example, if the first layer of a graph is a convolution layer, the framework only computes the gradients for weights and biases associated with the convolution layer, but not the gradients for the input. Include this option if you want to compute all gradients for the input.- See Also:
- Constant Field Values
-
-