ORTCoreMLExecutionProviderOptions

Objective-C

@interface ORTCoreMLExecutionProviderOptions : NSObject

Swift

class ORTCoreMLExecutionProviderOptions : NSObject

Options for configuring the CoreML execution provider.

  • Whether the CoreML execution provider should run on CPU only.

    Declaration

    Objective-C

    @property BOOL useCPUOnly;

    Swift

    var useCPUOnly: Bool { get set }
  • Whether the CoreML execution provider is enabled on subgraphs.

    Declaration

    Objective-C

    @property BOOL enableOnSubgraphs;

    Swift

    var enableOnSubgraphs: Bool { get set }
  • Whether the CoreML execution provider is only enabled for devices with Apple Neural Engine (ANE).

    Declaration

    Objective-C

    @property BOOL onlyEnableForDevicesWithANE;

    Swift

    var onlyEnableForDevicesWithANE: Bool { get set }
  • Only allow CoreML EP to take nodes with inputs with static shapes. By default it will also allow inputs with dynamic shapes. However, the performance may be negatively impacted if inputs have dynamic shapes.

    Declaration

    Objective-C

    @property BOOL onlyAllowStaticInputShapes;

    Swift

    var onlyAllowStaticInputShapes: Bool { get set }
  • Create an MLProgram. By default it will create a NeuralNetwork model. Requires Core ML 5 or later.

    Declaration

    Objective-C

    @property BOOL createMLProgram;

    Swift

    var createMLProgram: Bool { get set }