Skip to content

[Mobile] CoreML Execution Provider not listed in supported values #25869

@hpx2939

Description

@hpx2939

Describe the issue

Hi,

I’m trying to add the CoreML Execution Provider with custom options:

std::unordered_map<std::string, std::string> provider_options;
provider_options["ModelFormat"] = "MLProgram";         
provider_options["MLComputeUnits"] = "ALL";           
provider_options["RequireStaticShapes"] = "0";          
provider_options["EnableSubgraphs"] = "0";            

session_options.AppendExecutionProvider("CoreML", provider_options);

But I got an error saying:

Currently supported values are 'OPENVINO', 'SNPE', 'XNNPACK', 'QNN', 'WEBNN' and 'AZURE'

Questions:
Is CoreML EP still supported in the latest version of ONNX Runtime?
If yes, what is the correct way to enable it (and what string should I use in AppendExecutionProvider)?
Are the provider options I’m using still valid for CoreML EP?

Thanks!

To reproduce

  1. Build ONNX Runtime for iOS using CoreML support (or use the latest prebuilt version).
  2. Create a Ort::SessionOptions object.
  3. Call AppendExecutionProvider("CoreML", provider_options) with the options above.
  4. Observe the error about unsupported execution provider.

Urgency

No response

Platform

iOS

OS Version

18.3.1

ONNX Runtime Installation

Built from Source

Compiler Version (if 'Built from Source')

No response

Package Name (if 'Released Package')

None

ONNX Runtime Version or Commit ID

1.20.0

ONNX Runtime API

C++/C

Architecture

ARM64

Execution Provider

CoreML

Execution Provider Library Version

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    ep:CoreMLissues related to CoreML execution providerplatform:mobileissues related to ONNX Runtime mobile; typically submitted using template

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions