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.
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.
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