-
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
Expose provider factory C API, especially for CUDA users #1461
Expose provider factory C API, especially for CUDA users #1461
Conversation
…th structure, which is ugly
…o dev/shahasad/fix-missing-header-file-for-win-gpu-build
…r. Package them in the root include folder
Why did we have to move the provider factory header files to session? |
They need to refer to the onnxruntime_c_api.h without sourc-tree path. I think these headers are not included in any of the .cc files, so build won't currently break if I do this. However, if someone tries to include them in any source file, the build will break. |
include_directories(${ONNXRUNTIME_INCLUDE_DIR}) | ||
include_directories( | ||
${ONNXRUNTIME_INCLUDE_DIR} | ||
${REPO_ROOT}/include/onnxruntime/core/session |
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.
Why this change is needed?
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.
Unless we refactor the provider_factory headers, they need to include the onnxruntime_c_api.h. we don't want to export all the path structure in the package, rather put header files under the root. So they need to include the c_api.h without path. To get the current build working, we thus need to put the core/session in the include path.
Cleaner option would be to completely separate out the c_api.h and provider_factory headers in the root of the include similar to what we export. Would defer that to some change that refactors the providers.
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.
This is a hack. It's ok for now, but we should fix it at a later time.
Description: Describe your changes.
Motivation and Context
Missing cuda_provider_factory.h file in release for windows gpu #1373