-
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
[Build] Better support for vcpkg #23158
Labels
build
build issues; typically submitted using template
ep:Xnnpack
issues related to XNNPACK EP
platform:mobile
issues related to ONNX Runtime mobile; typically submitted using template
platform:web
issues related to ONNX Runtime web; typically submitted using template
Comments
github-actions
bot
added
ep:Xnnpack
issues related to XNNPACK EP
platform:web
issues related to ONNX Runtime web; typically submitted using template
platform:mobile
issues related to ONNX Runtime mobile; typically submitted using template
labels
Dec 20, 2024
Appreciate your list!
I will check each of them with caution.
Should I open Pull Requests to your dev branch?
|
You may directly create the PRs to main. Meanwhile, I will also gradually migrate our pull request pipelines from Azure DevOps to Github. |
snnn
added a commit
that referenced
this issue
Dec 20, 2024
### Description CMake's [target_link_libraries](https://cmake.org/cmake/help/latest/command/target_link_libraries.html#id2) function accepts plain library name(like `re2`) or target name(like `re2::re2`) or some other kinds of names. "plain library names" are old-fashioned, for compatibility only. We should use target names. ### Motivation and Context To make vcpkg work with winml build. See #23158
This was referenced Jan 6, 2025
snnn
pushed a commit
that referenced
this issue
Jan 8, 2025
### Description Changes vcpkg manifest and configuration file (vcpkg.json & vcpkg-configuration.json) * Update vcpkg version to https://github.com/microsoft/vcpkg/releases/tag/2024.12.16 * Use protobuf 3.21.12(= `v21.12`) to sync with [cmake/deps.txt](https://github.com/microsoft/onnxruntime/blob/main/cmake/deps.txt) * Resolve #22750 * Add `onnx` to vcpkg manifest so `find_package(ONNX)` and `find_dependency(Protobuf)` can work as expected. * Currently, It uses 1.16.2 * v1.17.0 will become available after microsoft/vcpkg#42942 However, `onnx` in vcpkg doesn't configure `ONNX_DISABLE_STATIC_REGISTRATION` build option. * microsoft/vcpkg#38879 * Create "cmake/vcpkg-triplets/" folder and triplet files which use `VCPKG_CMAKE_CONFIGURE_OPTIONS` for the option * This requires `VCPKG_OVERLAY_TRIPLETS` environment variable for CI steps, which is a bit inconvenient. I will try to find simple way to get same result ### Motivation and Context * Help #23158 * "ONNX is not consumed from vcpkg" * "Mismatch protobuf version. When vcpkg is enabled , we should not fetch protoc from Github which may cause version mismatches." * microsoft/vcpkg#43126 * #21348
snnn
pushed a commit
that referenced
this issue
Jan 8, 2025
### Description Changes vcpkg manifest and configuration file (vcpkg.json & vcpkg-configuration.json) * Update vcpkg version to https://github.com/microsoft/vcpkg/releases/tag/2024.12.16 * Use protobuf 3.21.12(= `v21.12`) to sync with [cmake/deps.txt](https://github.com/microsoft/onnxruntime/blob/main/cmake/deps.txt) * Resolve #22750 * Add `onnx` to vcpkg manifest so `find_package(ONNX)` and `find_dependency(Protobuf)` can work as expected. * Currently, It uses 1.16.2 * v1.17.0 will become available after microsoft/vcpkg#42942 However, `onnx` in vcpkg doesn't configure `ONNX_DISABLE_STATIC_REGISTRATION` build option. * microsoft/vcpkg#38879 * Create "cmake/vcpkg-triplets/" folder and triplet files which use `VCPKG_CMAKE_CONFIGURE_OPTIONS` for the option * This requires `VCPKG_OVERLAY_TRIPLETS` environment variable for CI steps, which is a bit inconvenient. I will try to find simple way to get same result ### Motivation and Context * Help #23158 * "ONNX is not consumed from vcpkg" * "Mismatch protobuf version. When vcpkg is enabled , we should not fetch protoc from Github which may cause version mismatches." * microsoft/vcpkg#43126 * #21348
VCPKG's toolchain file scripts/toolchains/windows.cmake doesn't support ARM64EC. not , it is not true. actually it just for the opencv:arm64ec-windows-static, many others arm64ec-windows is passed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
build
build issues; typically submitted using template
ep:Xnnpack
issues related to XNNPACK EP
platform:mobile
issues related to ONNX Runtime mobile; typically submitted using template
platform:web
issues related to ONNX Runtime web; typically submitted using template
Describe the issue
Thanks @luncliff for adding the support for vcpkg. Now it works for a very basic build. This issue is created for tracking the remaining issues when --use_vcpkg is enabled.
scripts/toolchains/windows.cmake
doesn't support ARM64EC. [opencv4] Build error on arm64ec-windows-static , because Compiler doesn't support baseline optimization flags: /arch:SSE /arch:SSE2 vcpkg#43181vcpkg install
in classic mode first. Need to explore.libXNNPACK.a
not built when building withvcpkg
andonnxruntime_BUILD_UNIT_TESTS=off
#22789re2
instead ofre2::re2
(Fix a tiny problem in winml.cmake #23173)- onnxruntime_ENABLE_WEBASSEMBLY_DEBUG_INFO
- onnxruntime_ENABLE_WEBASSEMBLY_SIMD
- onnxruntime_ENABLE_WEBASSEMBLY_EXCEPTION_CATCHING
- onnxruntime_ENABLE_WEBASSEMBLY_MEMORY64
- onnxruntime_ENABLE_WEBASSEMBLY_THREADS
It leads to 2^5 = 32 different combinations. We will need to create 32 triplets for them.
Contributions are welcomed. Or if you have any ideas or suggestions, please let us know. This issue is created for listening your feedbacks and suggestions.
Here is my dev branch: https://github.com/microsoft/onnxruntime/tree/snnn/vcpkg
The text was updated successfully, but these errors were encountered: