interface CoreMLExecutionProviderOption {
    coreMlFlags?: number;
    enableOnSubgraph?: boolean;
    name: "coreml";
    onlyEnableDeviceWithANE?: boolean;
    useCPUAndGPU?: boolean;
    useCPUOnly?: boolean;
}

继承关系 (查看完整)

属性

coreMlFlags?: number

CoreML execution provider 的位标志。

COREML_FLAG_USE_CPU_ONLY = 0x001
COREML_FLAG_ENABLE_ON_SUBGRAPH = 0x002
COREML_FLAG_ONLY_ENABLE_DEVICE_WITH_ANE = 0x004
COREML_FLAG_ONLY_ALLOW_STATIC_INPUT_SHAPES = 0x008
COREML_FLAG_CREATE_MLPROGRAM = 0x010
COREML_FLAG_USE_CPU_AND_GPU = 0x020

详见 include/onnxruntime/core/providers/coreml/coreml_provider_factory.h。

此标志仅在 ONNX Runtime (Node.js binding) 中可用。

enableOnSubgraph?: boolean

指定是否在子图中启用 CoreML EP。

此设置仅在 ONNX Runtime (react-native) 中可用。

name: "coreml"
onlyEnableDeviceWithANE?: boolean

指定是否仅针对配备 ANE(Apple Neural Engine)的 Apple 设备启用 CoreML EP。

此设置仅在 ONNX Runtime (react-native) 中可用。

useCPUAndGPU?: boolean
useCPUOnly?: boolean

指定 CoreML EP 是否仅使用 CPU。

此设置仅在 ONNX Runtime (react-native) 中可用。

使用 TypeDoc 生成