Class MLCInferenceGraph

  • All Implemented Interfaces:
    NSObject

    @Deprecated
    public class MLCInferenceGraph
    extends MLCGraph
    Deprecated.
    MLCInferenceGraph An inference graph created from one or more MLCGraph objects plus additional layers added directly to the inference graph. API-Since: 14.0 Deprecated-Since: 100000.0 Deprecated-Message: Use Metal Performance Shaders Graph or BNNS instead.
    • Constructor Detail

      • MLCInferenceGraph

        protected MLCInferenceGraph​(org.moe.natj.general.Pointer peer)
        Deprecated.
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
        Deprecated.
      • addInputs

        public boolean addInputs​(@NotNull
                                 @NotNull NSDictionary<java.lang.String,​? extends MLCTensor> inputs)
        Deprecated.
        Add the list of inputs to the inference graph
        Parameters:
        inputs - The inputs
        Returns:
        A boolean indicating success or failure
      • addInputsLossLabelsLossLabelWeights

        public boolean addInputsLossLabelsLossLabelWeights​(@NotNull
                                                           @NotNull NSDictionary<java.lang.String,​? extends MLCTensor> inputs,
                                                           @Nullable
                                                           @Nullable NSDictionary<java.lang.String,​? extends MLCTensor> lossLabels,
                                                           @Nullable
                                                           @Nullable NSDictionary<java.lang.String,​? extends MLCTensor> lossLabelWeights)
        Deprecated.
        Add the list of inputs to the inference graph Each input, loss label or label weights tensor is identified by a NSString. When the inference graph is executed, this NSString is used to identify which data object should be as input data for each tensor whose device memory needs to be updated before the graph is executed.
        Parameters:
        inputs - The inputs
        lossLabels - The loss label inputs
        lossLabelWeights - The loss label weights
        Returns:
        A boolean indicating success or failure
      • addOutputs

        public boolean addOutputs​(@NotNull
                                  @NotNull NSDictionary<java.lang.String,​? extends MLCTensor> outputs)
        Deprecated.
        Add the list of outputs to the inference graph
        Parameters:
        outputs - The outputs
        Returns:
        A boolean indicating success or failure
      • allocWithZone

        public static MLCInferenceGraph allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
        Deprecated.
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(@NotNull
                                                                   @NotNull java.lang.String key)
        Deprecated.
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(@NotNull
                                                                   @NotNull java.lang.Object aTarget)
        Deprecated.
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(@NotNull
                                                                                 @NotNull java.lang.Object aTarget,
                                                                                 @NotNull
                                                                                 @NotNull org.moe.natj.objc.SEL aSelector,
                                                                                 @Nullable
                                                                                 @Nullable java.lang.Object anArgument)
        Deprecated.
      • classFallbacksForKeyedArchiver

        @NotNull
        public static @NotNull NSArray<java.lang.String> classFallbacksForKeyedArchiver()
        Deprecated.
      • classForKeyedUnarchiver

        @NotNull
        public static @NotNull org.moe.natj.objc.Class classForKeyedUnarchiver()
        Deprecated.
      • compileWithOptionsDevice

        public boolean compileWithOptionsDevice​(long options,
                                                @NotNull
                                                @NotNull MLCDevice device)
        Deprecated.
        Compile the training graph for a device.
        Parameters:
        options - The compiler options to use when compiling the training graph
        device - The MLCDevice object
        Returns:
        A boolean indicating success or failure
      • compileWithOptionsDeviceInputTensorsInputTensorsData

        public boolean compileWithOptionsDeviceInputTensorsInputTensorsData​(long options,
                                                                            @NotNull
                                                                            @NotNull MLCDevice device,
                                                                            @Nullable
                                                                            @Nullable NSDictionary<java.lang.String,​? extends MLCTensor> inputTensors,
                                                                            @Nullable
                                                                            @Nullable NSDictionary<java.lang.String,​? extends MLCTensorData> inputTensorsData)
        Deprecated.
        Compile the inference graph for a device. Specifying the list of constant tensors when we compile the graph allows MLCompute to perform additional optimizations at compile time.
        Parameters:
        options - The compiler options to use when compiling the inference graph
        device - The MLCDevice object
        inputTensors - The list of input tensors that are constants
        inputTensorsData - The tensor data to be used with these constant input tensors
        Returns:
        A boolean indicating success or failure API-Since: 14.5
      • debugDescription_static

        public static java.lang.String debugDescription_static()
        Deprecated.
      • description_static

        public static java.lang.String description_static()
        Deprecated.
      • deviceMemorySize

        public long deviceMemorySize()
        Deprecated.
        [@property] The device memory size used by the inference graph Returns the total size in bytes of device memory used by all intermediate tensors in the inference graph
        Returns:
        A NSUInteger value
      • executeWithInputsDataBatchSizeOptionsCompletionHandler

        public boolean executeWithInputsDataBatchSizeOptionsCompletionHandler​(@NotNull
                                                                              @NotNull NSDictionary<java.lang.String,​? extends MLCTensorData> inputsData,
                                                                              long batchSize,
                                                                              long options,
                                                                              @Nullable
                                                                              @Nullable MLCInferenceGraph.Block_executeWithInputsDataBatchSizeOptionsCompletionHandler completionHandler)
        Deprecated.
        Execute the inference graph with given input data Execute the inference graph given input data. If MLCExecutionOptionsSynchronous is specified in 'options', this method returns after the graph has been executed. Otherwise, this method returns after the graph has been queued for execution. The completion handler is called after the graph has finished execution.
        Parameters:
        inputsData - The data objects to use for inputs
        batchSize - The batch size to use. For a graph where batch size changes between layers this value must be 0.
        options - The execution options
        completionHandler - The completion handler
        Returns:
        A boolean indicating success or failure
      • executeWithInputsDataLossLabelsDataLossLabelWeightsDataBatchSizeOptionsCompletionHandler

        public boolean executeWithInputsDataLossLabelsDataLossLabelWeightsDataBatchSizeOptionsCompletionHandler​(@NotNull
                                                                                                                @NotNull NSDictionary<java.lang.String,​? extends MLCTensorData> inputsData,
                                                                                                                @Nullable
                                                                                                                @Nullable NSDictionary<java.lang.String,​? extends MLCTensorData> lossLabelsData,
                                                                                                                @Nullable
                                                                                                                @Nullable NSDictionary<java.lang.String,​? extends MLCTensorData> lossLabelWeightsData,
                                                                                                                long batchSize,
                                                                                                                long options,
                                                                                                                @Nullable
                                                                                                                @Nullable MLCInferenceGraph.Block_executeWithInputsDataLossLabelsDataLossLabelWeightsDataBatchSizeOptionsCompletionHandler completionHandler)
        Deprecated.
        Execute the inference graph with given input data Execute the inference graph given input data. If MLCExecutionOptionsSynchronous is specified in 'options', this method returns after the graph has been executed. Otherwise, this method returns after the graph has been queued for execution. The completion handler is called after the graph has finished execution.
        Parameters:
        inputsData - The data objects to use for inputs
        lossLabelsData - The data objects to use for loss labels
        lossLabelWeightsData - The data objects to use for loss label weights
        batchSize - The batch size to use. For a graph where batch size changes between layers this value must be 0.
        options - The execution options
        completionHandler - The completion handler
        Returns:
        A boolean indicating success or failure
      • executeWithInputsDataLossLabelsDataLossLabelWeightsDataOutputsDataBatchSizeOptionsCompletionHandler

        public boolean executeWithInputsDataLossLabelsDataLossLabelWeightsDataOutputsDataBatchSizeOptionsCompletionHandler​(@NotNull
                                                                                                                           @NotNull NSDictionary<java.lang.String,​? extends MLCTensorData> inputsData,
                                                                                                                           @Nullable
                                                                                                                           @Nullable NSDictionary<java.lang.String,​? extends MLCTensorData> lossLabelsData,
                                                                                                                           @Nullable
                                                                                                                           @Nullable NSDictionary<java.lang.String,​? extends MLCTensorData> lossLabelWeightsData,
                                                                                                                           @Nullable
                                                                                                                           @Nullable NSDictionary<java.lang.String,​? extends MLCTensorData> outputsData,
                                                                                                                           long batchSize,
                                                                                                                           long options,
                                                                                                                           @Nullable
                                                                                                                           @Nullable MLCInferenceGraph.Block_executeWithInputsDataLossLabelsDataLossLabelWeightsDataOutputsDataBatchSizeOptionsCompletionHandler completionHandler)
        Deprecated.
        Execute the inference graph with given input data Execute the inference graph given input data. If MLCExecutionOptionsSynchronous is specified in 'options', this method returns after the graph has been executed. Otherwise, this method returns after the graph has been queued for execution. The completion handler is called after the graph has finished execution.
        Parameters:
        inputsData - The data objects to use for inputs
        lossLabelsData - The data objects to use for loss labels
        lossLabelWeightsData - The data objects to use for loss label weights
        outputsData - The data objects to use for outputs
        batchSize - The batch size to use. For a graph where batch size changes between layers this value must be 0.
        options - The execution options
        completionHandler - The completion handler
        Returns:
        A boolean indicating success or failure
      • executeWithInputsDataOutputsDataBatchSizeOptionsCompletionHandler

        public boolean executeWithInputsDataOutputsDataBatchSizeOptionsCompletionHandler​(@NotNull
                                                                                         @NotNull NSDictionary<java.lang.String,​? extends MLCTensorData> inputsData,
                                                                                         @Nullable
                                                                                         @Nullable NSDictionary<java.lang.String,​? extends MLCTensorData> outputsData,
                                                                                         long batchSize,
                                                                                         long options,
                                                                                         @Nullable
                                                                                         @Nullable MLCInferenceGraph.Block_executeWithInputsDataOutputsDataBatchSizeOptionsCompletionHandler completionHandler)
        Deprecated.
        Execute the inference graph with given input data Execute the inference graph given input data. If MLCExecutionOptionsSynchronous is specified in 'options', this method returns after the graph has been executed. Otherwise, this method returns after the graph has been queued for execution. The completion handler is called after the graph has finished execution.
        Parameters:
        inputsData - The data objects to use for inputs
        outputsData - The data objects to use for outputs
        batchSize - The batch size to use. For a graph where batch size changes between layers this value must be 0.
        options - The execution options
        completionHandler - The completion handler
        Returns:
        A boolean indicating success or failure
      • graphWithGraphObjects

        public static MLCInferenceGraph graphWithGraphObjects​(@NotNull
                                                              @NotNull NSArray<? extends MLCGraph> graphObjects)
        Deprecated.
        Create an inference graph
        Parameters:
        graphObjects - The layers from these graph objects will be added to the training graph
        Returns:
        A new inference graph object
      • hash_static

        public static long hash_static()
        Deprecated.
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
        Deprecated.
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
        Deprecated.
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
        Deprecated.
      • keyPathsForValuesAffectingValueForKey

        @NotNull
        public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(@NotNull
                                                                                             @NotNull java.lang.String key)
        Deprecated.
      • linkWithGraphs

        public boolean linkWithGraphs​(@NotNull
                                      @NotNull NSArray<? extends MLCInferenceGraph> graphs)
        Deprecated.
        Link mutiple inference graphs This is used to link subsequent inference graphs with first inference sub-graph. This method should be used when we have tensors shared by one or more layers in multiple sub-graphs
        Parameters:
        graphs - The list of inference graphs to link
        Returns:
        A boolean indicating success or failure
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
        Deprecated.
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
        Deprecated.
      • setVersion_static

        public static void setVersion_static​(long aVersion)
        Deprecated.
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
        Deprecated.
      • version_static

        public static long version_static()
        Deprecated.
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.