-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add initial support for CoreML ML Program to the CoreML EP. (#19347)
### Description <!-- Describe your changes. --> Adds infrastructure to create an ML Package containing the Model using ML Program. Updated coremltools files to v7.1 to bring in new protobuf definitions along with the tools to write the weight.bin file and create an ML Package correctly. Enables building a CoreML Model on all platforms which means all the operator builder code can be debugged anywhere. Execution of the generated CoreML model is obviously limited to Apple platforms. The Conv operator builder has been updated to be able to generate an ML Program Operation. ### Motivation and Context <!-- - Why is this change required? What problem does it solve? - If it fixes an open issue, please link to the issue here. --> NeuralNetwork is no longer being developed and ML Program is the replacement going forward.
- Loading branch information
1 parent
944d8f8
commit 4e51197
Showing
54 changed files
with
2,131 additions
and
1,037 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
4e51197
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much for your efforts @skottmckay !
once again I was about to "give up" but I thought let's make another build, and I had messed up one of the files you very recently updated.
Amazing.
It is worth mentioning that onnxruntime is one of the very few, that build on first attempt -when following documentation.
And for this main reason, I kept coming back, it is a very well engineered assembly, and, diplomaticly saying, it was quite surprising to see it was using an old coreml version.
But technically, it is positive: it's been nearly 6 years that the onnx and coreml adventures started, but we are still at the infancy/rise of it all!
OpenAI h helped propel Machine Learning in the spotlight, making it known, bringing more and more men and women with all kinds of backgrounds, into the sector.
I waited end of 2023 - I thought ChatGPT was just a chatbot like those fake hotties of tinder, or those annoying popups from a random website, so very wrong.
Machine Learning, much more than a chatbot, and much more than ChatGPT, it is an extraordinary technology.
A life-changing, groundbreaking, one-in-a-century, kind of invention.
For so many sectors it brings new, powerful tools.
But for research and education, it is a revolution, like the inventions of printing press for information, telegraph for communication, railways for transportation, internet for communication, etc. (and for the lolz, uber for transportation, ).
Onnx is on, I believe, the right path, the path of interoperability.
There can't be a "one global winner" imposing his format: we so much need performance, efficiency and reliability that they all converge in the same direction
I am glad that as soon as you were made aware, you dedicated some time for this.
Apple's MPS documentation is so massive, it's a blessing CoreML natively taps into it. And Apple provides a converter for DirectX shaders.
As sidenotes, with updating CoreML, the roadmap can be updated to support fp16!
Also: mimalloc ram allocator brings massive stability in MacOS while inferring. Seems it betters MacO's particular management of swapL
It runs very well, once again a straightforward build (!!!) and only involves an environment variable before running python, and results are visible immediately.
I'll keep an eye on that roadmap, it'd be a pleasure to contribute in the same direction!
Again, thank you.