Open LiuPeiqiCN opened 1 year ago
could you check if the sln file is generated correctly in {root of source}\build\Windows ?
Yes, .sln
file is generated correctly and I can build ONNXRuntime successful.
It seems that ONNXRuntime only generates the lib files in src\build\Windows\Release
, but it does not perform the installation action for the c++ package. If I manually open the .sln
file and execute the Install
project, there will be a lot of missing files in the generated bin/include/lib
folders.
Furthermore, even if I integrate CUDA/TensorRT/OpenVINO/DML/DNNL, the generated C# NuGet package only supports OpenVINO and lacks the relevant files for CUDA/TensorRT...
There is no formal installation step. ONNX Runtime is a library. To use it, you need:
You can copy out the files to somewhere then start to use them. You can also get a packed zip file from https://github.com/microsoft/onnxruntime/releases, then unzip it you will know what files from your build are necessary.
Hi @snnn
I tried to get files using cmake --install <>
command, but files installed seems not complete with what i find in release packages (https://github.com/microsoft/onnxruntime/releases).
Here what I tried for build:
.\build.bat --config RelWithDebInfo --build_shared_lib --parallel --compile_no_warning_as_error --skip_submodule_sync --use_mimalloc --update --build --cmake_generator "Visual Studio 17 2022"
cd build\Windows\RelWithDebInfo
cmake --install . --config RelWithDebInfo
And I got plenty of files in program files:
But comparing to what inside onnxruntime-win-x64-1.15.1.zip I understand that some files are missing. For example, cmake/
, include/onnxruntime_cxx_api.h
etc.
So adding to original question: How to pack build into package with all needed files like packages in releases page?
p.s. I tried to find more info in ci pipelines, but couldn't understand what option could affect behaviour in this script https://github.com/microsoft/onnxruntime/blob/main/tools/ci_build/build.py
Describe the issue
After compilation completed, I only found python whl and C# nuget package, but I canot found c++ library just like:
Urgency
No response
Target platform
Windows 11
Build script
.\build.bat --config Release --build_shared_lib --parallel --build --build_nuget --build_wheel --skip_tests --skip_onnx_tests --skip_winml_tests --skip_nodejs_tests --use_dnnl --use_dml --use_xnnpack --use_cuda --cuda_home "D:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.8" --cudnn_home "D:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.8" --cuda_version=11.8 --use_tensorrt --tensorrt_home "D:/vcpkgs/TensorRT/TensorRT-8.6.1.6" --use_openvino HETERO:GPU,CPU --use_azure --cmake_extra_defines BUILD_TESTING=OFF CMAKE_INSTALL_PREFIX="install" InferenceEngine_DIR="D:\vcpkgs\openvino\windows_2023.0.1.11005\runtime\cmake" ngraph_DIR="D:\vcpkgs\openvino\windows_2023.0.1.11005\runtime\cmake" onnxruntime_BUILD_UNIT_TESTS=OFF --cmake_generator "Visual Studio 17 2022" --update
Error / output
-
Visual Studio Version
VS2022
GCC / Compiler Version
No response