microsoft / microsoft/onnxruntime

[Feature Request] Offline optimization for CoreML

Open
#20,897 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request platform:mobile
Dominant language
C++
Stars
21.9k
Forks
4.2k
Avg merge
4d 11h
Merged PRs (30d)
184

Description

### Describe the feature request

When you load a model using CoreMLExecutionProvider it takes a very long time, even minutes for big models. If you look at the logging of onnxruntime you can see that it is saving .mlpackage files in a temp folder. Can the possibility of loading saved compiled model, with offline optimization, like as in other EPs be added to CoreML EP?

### Describe scenario use case

To speedup model loading when using CoreML provider.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the CoreMLExecutionProvider implementation and compare how other execution providers support loading saved compiled models. Done means CoreML can reuse an offline-optimized compiled model instead of recompiling during model loading, with the behavior verified for the stated model-loading scenario.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
machine-learning, mobile-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.