mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-25 19:48:11 +00:00
### Description 1. Enable VCPKG flag in Windows CPU CI build pipelines. 2. Increased the min supported cmake version from 3.26 to 3.28. Because of it, drop the support for the old way of finding python by "find_package(PythonLibs)". Therefore, in build.py we no longer set "PYTHON_EXECUTABLE" cmake var when doing cmake configure. 3. Added "xnnpack-ep" as a feature for ORT's vcpkg config. 4. Added asset cache support for ORT's vcpkg build 5. Added VCPKG triplet files for Android build. 6. Set VCPKG triplet to "universal2-osx" if CMAKE_OSX_ARCHITECTURES was found in cmake extra defines. 7. Removed a small piece of code in build.py, which was for support CUDA version < 11.8. 8. Fixed an issue that CMAKE_OSX_ARCHITECTURES sometimes got specified twice when build.py invoked cmake. 9. Added more model tests to Android build. After this change, we will test all ONNX versions instead of just the latest one. 10. Fixed issues that are related to build.py's "--build_nuget" parameter. Also, enable the flag in most Windows CPU CI build jobs. 11. Removed a restriction in build.py that disallowed cross-compiling Windows ARM64 nuget package on Windows x86. ### Motivation and Context Adopt vcpkg.
23 lines
No EOL
813 B
Text
23 lines
No EOL
813 B
Text
pybind11 provides CMake targets. There are two modes provided; classic, which is built on the old Python
|
|
discovery packages in CMake, or the new FindPython mode, which uses FindPython
|
|
from 3.12+ forward (3.15+ _highly_ recommended).
|
|
|
|
New FindPython mode:
|
|
|
|
find_package(Python COMPONENTS Interpreter Development)
|
|
find_package(pybind11 CONFIG)
|
|
|
|
# pybind11 method:
|
|
pybind11_add_module(MyModule1 src1.cpp)
|
|
|
|
# Python method:
|
|
Python_add_library(MyModule2 src2.cpp)
|
|
target_link_libraries(MyModule2 pybind11::headers)
|
|
set_target_properties(MyModule2 PROPERTIES
|
|
INTERPROCEDURAL_OPTIMIZATION ON
|
|
CXX_VISIBILITY_PRESET ON
|
|
VISIBILITY_INLINES_HIDDEN ON
|
|
)
|
|
|
|
For more information see here:
|
|
https://pybind11.readthedocs.io/en/latest/compiling.html#building-with-cmake |