Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CoreML ML Program] support acclerators selector #22383

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

wejoncy
Copy link
Contributor

@wejoncy wejoncy commented Oct 10, 2024

Description

For no, CoreML only support run mlmodels on CPU/ALL, However, sometimes CPU_GPU would be faster a lot.

We support the option to select different hardware to boost performance in this PR.

Motivation and Context

@wejoncy wejoncy marked this pull request as ready for review October 10, 2024 04:51
// Create an MLProgram. By default it will create a NeuralNetwork model. Requires Core ML 5 or later.
COREML_FLAG_CREATE_MLPROGRAM = 0x010,
COREML_FLAG_CREATE_MLPROGRAM = 0x100,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't change any existing flag as that will break any current usage of the EP.

Could we maybe just add a new 'no ANE' flag if the problem we're trying to solve is that large data sizes run less efficiently if CoreML attempts to use the ANE?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we could.

But the flag's value shouldn't be really matter given that we are using this enum variable.
Please Correct me if I am wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants