-
Notifications
You must be signed in to change notification settings - Fork 3k
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] support coreml model cache #23065
Conversation
5bfc8eb
to
fc9db07
Compare
d539da2
to
1d1c874
Compare
81c2b9e
to
7b11848
Compare
include/onnxruntime/core/providers/coreml/coreml_provider_factory.h
Outdated
Show resolved
Hide resolved
include/onnxruntime/core/providers/coreml/coreml_provider_factory.h
Outdated
Show resolved
Hide resolved
include/onnxruntime/core/providers/coreml/coreml_provider_factory.h
Outdated
Show resolved
Hide resolved
Co-authored-by: Scott McKay <skottmckay@gmail.com>
include/onnxruntime/core/providers/coreml/coreml_provider_factory.h
Outdated
Show resolved
Hide resolved
include/onnxruntime/core/providers/coreml/coreml_provider_factory.h
Outdated
Show resolved
Hide resolved
include/onnxruntime/core/providers/coreml/coreml_provider_factory.h
Outdated
Show resolved
Hide resolved
…ory.h Co-authored-by: Scott McKay <skottmckay@gmail.com>
…ory.h Co-authored-by: Scott McKay <skottmckay@gmail.com>
include/onnxruntime/core/providers/coreml/coreml_provider_factory.h
Outdated
Show resolved
Hide resolved
Co-authored-by: Scott McKay <skottmckay@gmail.com>
Are there any unit tests for the new code? We should be able to test that the expected cache files are created in the right places and that things like invalid cache key values are rejected. |
Co-authored-by: Scott McKay <skottmckay@gmail.com>
Added unit test for three cases where hash is valid or invalid. |
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.
,
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.
### Description Refactor compute plan profiling Support cache coreml model to speed up session initialization. this is only support by user provided entry and user responsible to manage the cache With the cache, session initialization time can be reduced by 50% or more: |model| before| after| |--|--|--| |yolo11.onnx| 0.6s|0.1s| |yolo11-fp16.onnx|1.8s|0.1s| ### 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. --> --------- Co-authored-by: wejoncy <wejoncy@.com> Co-authored-by: Scott McKay <skottmckay@gmail.com>
### Description Refactor compute plan profiling Support cache coreml model to speed up session initialization. this is only support by user provided entry and user responsible to manage the cache With the cache, session initialization time can be reduced by 50% or more: |model| before| after| |--|--|--| |yolo11.onnx| 0.6s|0.1s| |yolo11-fp16.onnx|1.8s|0.1s| ### 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. --> --------- Co-authored-by: wejoncy <wejoncy@.com> Co-authored-by: Scott McKay <skottmckay@gmail.com>
Description
Refactor compute plan profiling
Support cache coreml model to speed up session initialization. this is only support by user provided entry and user responsible to manage the cache
With the cache, session initialization time can be reduced by 50% or more:
Motivation and Context