-
Notifications
You must be signed in to change notification settings - Fork 2.9k
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Adding execution providers as shared library? #2818
Comments
As of now execution providers can be linked only statically. We're working on dynamic linking as we speak. fyi @RyanUnderhill |
ok thanks. How to use the added provider? Do I need to copy the libonnxruntime_providers.a and libonnxruntime_providers_x.a to the release folder? Do I need to modify the app code (CXXapi_sample.cc)? How to build the app (since there's dynamic link with libonnxruntime.so and static link with providers)? |
Ok I see, the 'Using the execution provider' section. Looks like I need to modify the CXXapi_sample.cc. This looks weird to me, which execution provider to use should be decided by onnxruntime, not by application. |
@pranavsharma any roadmap/project or possibly branch publicly available of this... i.e. potentially help out with the effort? basically it would be nice to be able to use onnxruntime API (c/c++) to check whether a backend is available and then use it. since now if the library has not been compiled with a given backend, one cannot even check via API which backend is available (runtime) |
This feature is being worked on in a private branch and not at a stage where it can be opened up for community contributions due to multiple conflicting internal pieces. Once we've achieved this for one execution provider, we can open it up to the community. Stay tuned! |
This issue has been automatically marked as stale due to inactivity and will be closed in 7 days if no further activity occurs. If further support is needed, please provide an update and/or more details. |
@RyanUnderhill is working on this. |
This issue has been automatically marked as stale due to inactivity and will be closed in 7 days if no further activity occurs. If further support is needed, please provide an update and/or more details. |
This issue has been automatically closed due to inactivity. Please reactivate if further support is needed. |
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Hello, from this link it says "Build it as a static lib."
https://github.com/microsoft/onnxruntime/blob/master/docs/AddingExecutionProvider.md
I added my own execution provider ("X"), and I see libonnxruntime_providers_x.a is built.
However I would like it to be a shared .so, just like libonnxruntime.so
For test I compile and link CXXapi_sample.cc with libonnxruntime.so and currently the new provider is not there (e.g. the number of providers is 1).
Would like to know why it needs to be static and if possible to be shared so?
System information
building on ubuntu for cpu and also my customized execution provider.
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: