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

Wrong header included for CoreML provider factory #11973

Closed
carsonswope opened this issue Jun 23, 2022 · 3 comments · Fixed by #12138
Closed

Wrong header included for CoreML provider factory #11973

carsonswope opened this issue Jun 23, 2022 · 3 comments · Fixed by #12138
Labels
contributions welcome lower priority issues for the core ORT teams

Comments

@carsonswope
Copy link
Contributor

In the latest macOS release (onnxruntime-osx-arm64-1.11.1) the header coreml_execution_provider.h is included. I think that the correct header to include is coreml_provider_factory.h.

Apologies if this is totally wrong, I'm pretty new to onnx-runtime. Anyway, here's my reasoning:

I needed to call OrtSessionOptionsAppendExecutionProvider_CoreML to add the CoreML EP to my session options pointer. Indeed the function is exported from libonnxruntime.dylib (i.e. run nm -gU libonnxruntime.dylib), but the only header it is declared in is coreml_provider_factory.h. I had to add #include <coreml_provider_factory.h>, then I could call the function because I was already linking to libonnxruntime.dylib. Also, coreml_execution_provider.h includes header files that seem to be internal to onnxruntime and not part of the public API.

I guess this would be a change to copy_strip_binary.sh, like what happened in #10675 , but just a different file name. Happy to make a PR for this, just would like some confirmation that it's correct first.

Thanks!

@faxu
Copy link
Contributor

faxu commented Jul 8, 2022

CC @edgchen1

@edgchen1
Copy link
Contributor

edgchen1 commented Jul 8, 2022

@carsonswope I think you are right. coreml_provider_factory.h should be in the released header files instead of coreml_execution_provider.h. Thanks for the find! PRs are welcome.

@carsonswope
Copy link
Contributor Author

Thanks for the review @edgchen1 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributions welcome lower priority issues for the core ORT teams
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants