Class 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 long ComputeAllGradients
      The option to compute all gradients during graph compilation.
      static long DebugLayers
      The option to debug layers during graph compilation.
      static long DisableLayerFusion
      The option to disable layer fusion during graph compilation.
      static long LinkGraphs
      The option to link graphs during graph compilation.
      static long None
      No graph compilation options.
    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • 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