ort-builder
ort-builder copied to clipboard
MSVC Debug Build, Win Build System & opt. onnxruntime v1.6.2
Hey, thank you very much for the repository, has been really helpful!
Since the static linking of minSizeRelease to a debug build doesn't work for MSVC, I've been working on a Debug Build for Windows. and created a build system for windows which automates all required steps and additionally provides options to build:
- 1.16.2 / 1.14.1 in MinSizeRel or Debug
It also:
- Checks if the Python version is compatible with the selected ONNX Runtime version and, if not, prompts the user for an alternative Python path.
- Downloads and extracts the chosen ONNX Runtime version, if not already present.
- Creates and activates a Python virtual environment for the build process.
- Then triggers the build process for the chosen ONNX Runtime version, with the specified build type (Debug or MinSizeRel).
For the build process itself, I've created an additional build-win_debug.bat and renamed build_win.bat to build-win_minSizeRel.bat.
Since different files will be created depending on the ONNX Runtime version and build type:
- Instead of extracting to /onnxruntime/, I extract to /onnxruntime-1.16.2/ so users can test different onnxruntime versions.
- And export the libraries to: .\win-libs\%ONNXRT_FOLDER%-win-x86_64_%CMAKE_BUILD_TYPE%.lib (ONNXRT_FOLDER being either onnxruntime-1.14.1 or onnxruntime-1.16.2)
This makes switching the onnxruntime.lib version in the Plugin CMake pretty easy, but differs from the way you have set up the onnxruntime folder/output libraries currently.
I thought I'd check in about how you would approach this or prefer it to be set up, before I make a pull request.
This all sounds good to me! Please make a PR and we'll take it from there
Excellent! Im pretty busy with work right now, but will try to make a pr next week :)
as you probably saw i just updated the macOS scrips
Perhaps a single script with an argument for the CMake build config would be preferable than two.
Hey, I think i've actually done most of the needed stuff here:
https://github.com/olilarkin/ort-builder/commit/75941a43af10985c3dd0ce37b3a90a37a6207509