mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-30 20:18:08 +00:00
Enable VCPKG in more places
This commit is contained in:
parent
5f6a3158f8
commit
40ede3d3fc
21 changed files with 26 additions and 38 deletions
|
|
@ -93,7 +93,7 @@ def _build_aar(args):
|
|||
aar_dir = os.path.join(intermediates_dir, "aar", build_config)
|
||||
jnilibs_dir = os.path.join(intermediates_dir, "jnilibs", build_config)
|
||||
exe_dir = os.path.join(intermediates_dir, "executables", build_config)
|
||||
base_build_command = [sys.executable, BUILD_PY] + build_settings["build_params"] + ["--config=" + build_config]
|
||||
base_build_command = [sys.executable, BUILD_PY] + build_settings["build_params"] + ["--config=" + build_config, "--use_vcpkg"]
|
||||
header_files_path = ""
|
||||
|
||||
if qnn_android_build:
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ jobs:
|
|||
--android_ndk_path $ANDROID_NDK_HOME \
|
||||
--android_abi=x86_64 \
|
||||
--android_api=31 \
|
||||
--parallel \
|
||||
--parallel --use_vcpkg \
|
||||
--build_shared_lib \
|
||||
--use_qnn static_lib \
|
||||
--qnn_home $(QnnSDKRootDir) \
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ stages:
|
|||
--android_abi=x86_64 \
|
||||
--android_api=30 \
|
||||
--skip_submodule_sync \
|
||||
--parallel \
|
||||
--parallel --use_vcpkg \
|
||||
--cmake_generator=Ninja \
|
||||
--build_java
|
||||
displayName: CPU EP, Build and Test
|
||||
|
|
@ -158,7 +158,7 @@ stages:
|
|||
--android_abi=x86_64 \
|
||||
--android_api=29 \
|
||||
--skip_submodule_sync \
|
||||
--parallel \
|
||||
--parallel --use_vcpkg \
|
||||
--use_nnapi \
|
||||
--build_shared_lib \
|
||||
--cmake_generator=Ninja \
|
||||
|
|
@ -218,7 +218,7 @@ stages:
|
|||
--android_abi=x86_64 \
|
||||
--android_api=29 \
|
||||
--skip_submodule_sync \
|
||||
--parallel \
|
||||
--parallel --use_vcpkg \
|
||||
--use_nnapi \
|
||||
--build_shared_lib \
|
||||
--cmake_generator=Ninja \
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ stages:
|
|||
--config Release --update --build \
|
||||
--skip_submodule_sync \
|
||||
--build_shared_lib \
|
||||
--parallel \
|
||||
--parallel --use_vcpkg \
|
||||
--build_wheel \
|
||||
--enable_onnx_tests --use_cuda --cuda_version=11.8 --cuda_home=/usr/local/cuda-11.8 --cudnn_home=/usr/local/cuda-11.8 \
|
||||
--enable_cuda_profiling \
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ stages:
|
|||
--config Debug \
|
||||
--skip_submodule_sync \
|
||||
--build_shared_lib \
|
||||
--parallel \
|
||||
--parallel --use_vcpkg \
|
||||
--enable_onnx_tests --enable_address_sanitizer \
|
||||
--update --build;
|
||||
python3 /onnxruntime_src/tools/ci_build/build.py \
|
||||
|
|
@ -91,7 +91,7 @@ stages:
|
|||
--config Debug \
|
||||
--skip_submodule_sync \
|
||||
--build_shared_lib \
|
||||
--parallel \
|
||||
--parallel --use_vcpkg \
|
||||
--enable_onnx_tests --enable_address_sanitizer \
|
||||
--test;
|
||||
'
|
||||
|
|
@ -199,7 +199,7 @@ stages:
|
|||
--config Release \
|
||||
--skip_submodule_sync \
|
||||
--build_shared_lib \
|
||||
--parallel --use_binskim_compliant_compile_flags \
|
||||
--parallel --use_vcpkg --use_binskim_compliant_compile_flags \
|
||||
--build_wheel \
|
||||
--build_csharp \
|
||||
--enable_onnx_tests \
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ jobs:
|
|||
--config Debug Release \
|
||||
--skip_submodule_sync \
|
||||
--build_shared_lib \
|
||||
--parallel \
|
||||
--parallel --use_vcpkg \
|
||||
--enable_pybind \
|
||||
--enable_onnx_tests \
|
||||
--build_java \
|
||||
|
|
|
|||
|
|
@ -209,7 +209,7 @@ stages:
|
|||
cd /onnxruntime_src/java && /onnxruntime_src/java/gradlew cmakeCheck -DcmakeBuildDir=/build/Release -DUSE_CUDA=1; \
|
||||
cd /tmp; \
|
||||
python3 /onnxruntime_src/tools/ci_build/build.py \
|
||||
--build_dir /build --config Release --test --skip_submodule_sync --build_shared_lib --parallel --use_binskim_compliant_compile_flags --build_wheel --enable_onnx_tests \
|
||||
--build_dir /build --config Release --test --skip_submodule_sync --build_shared_lib --parallel --use_vcpkg --use_binskim_compliant_compile_flags --build_wheel --enable_onnx_tests \
|
||||
--enable_transformers_tool_test --use_cuda --cuda_version=${{parameters.CudaVersion}} --cuda_home=/usr/local/cuda --cudnn_home=/usr/local/cuda \
|
||||
--enable_pybind --build_java --ctest_path "" ; \
|
||||
'
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ jobs:
|
|||
--update \
|
||||
--build_dir /build \
|
||||
--build \
|
||||
--parallel \
|
||||
--parallel --use_vcpkg \
|
||||
--build_wheel \
|
||||
--skip_submodule_sync \
|
||||
--use_cache \
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ jobs:
|
|||
--use_qnn $(QnnLibKind) \
|
||||
--qnn_home $(QnnSDKRootDir) \
|
||||
--cmake_generator=Ninja \
|
||||
--update --build --parallel
|
||||
--update --build --parallel --use_vcpkg
|
||||
displayName: Build QNN EP
|
||||
|
||||
- script: |
|
||||
|
|
@ -87,7 +87,7 @@ jobs:
|
|||
--use_qnn $(QnnLibKind) \
|
||||
--qnn_home $(QnnSDKRootDir) \
|
||||
--cmake_generator=Ninja \
|
||||
--test
|
||||
--test --use_vcpkg
|
||||
displayName: Run unit tests
|
||||
|
||||
- task: CmdLine@2
|
||||
|
|
|
|||
|
|
@ -197,7 +197,7 @@ jobs:
|
|||
--enable_nccl \
|
||||
--build_dir /build \
|
||||
--build_shared_lib \
|
||||
--parallel \
|
||||
--parallel --use_vcpkg \
|
||||
--build_wheel \
|
||||
--skip_submodule_sync \
|
||||
--test --enable_onnx_tests --enable_transformers_tool_test \
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ jobs:
|
|||
--build_dir build \
|
||||
--skip_submodule_sync \
|
||||
--cmake_generator=Ninja \
|
||||
--parallel --use_binskim_compliant_compile_flags \
|
||||
--parallel --use_vcpkg --use_binskim_compliant_compile_flags \
|
||||
--build_shared_lib \
|
||||
--config Debug \
|
||||
--use_cache \
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ stages:
|
|||
|
||||
- ${{ else }}:
|
||||
- powershell: |
|
||||
python tools\ci_build\build.py ${{ parameters.BuildCommand }} --use_binskim_compliant_compile_flags --parallel --build_csharp --build --update --config $(BuildConfig) --build_nuget --msbuild_extra_options IncludeMobileTargets=false ${{ variables.build_py_lto_flag }}
|
||||
python tools\ci_build\build.py ${{ parameters.BuildCommand }} --use_binskim_compliant_compile_flags --parallel --use_vcpkg --build_csharp --build --update --config $(BuildConfig) --build_nuget --msbuild_extra_options IncludeMobileTargets=false ${{ variables.build_py_lto_flag }}
|
||||
|
||||
- ${{ if notIn(parameters['sln_platform'], 'Win32', 'x64') }}:
|
||||
# Use cross-compiled protoc
|
||||
|
|
|
|||
|
|
@ -229,7 +229,7 @@ stages:
|
|||
set -e -x
|
||||
export _PYTHON_HOST_PLATFORM=macosx-${{variables.MACOSX_DEPLOYMENT_TARGET}}-universal2
|
||||
python3 -m pip install -r '$(Build.SourcesDirectory)/tools/ci_build/github/linux/docker/scripts/requirements.txt'
|
||||
python3 $(Build.SourcesDirectory)/tools/ci_build/build.py --build_dir $(Build.BinariesDirectory) --use_coreml --skip_submodule_sync --parallel --use_binskim_compliant_compile_flags --config Release --build_wheel ${{ parameters.build_py_parameters }} --use_coreml --cmake_extra_defines CMAKE_OSX_ARCHITECTURES="arm64;x86_64" --update --build
|
||||
python3 $(Build.SourcesDirectory)/tools/ci_build/build.py --build_dir $(Build.BinariesDirectory) --use_coreml --skip_submodule_sync --parallel --use_vcpkg --use_binskim_compliant_compile_flags --config Release --build_wheel ${{ parameters.build_py_parameters }} --use_coreml --cmake_extra_defines CMAKE_OSX_ARCHITECTURES="arm64;x86_64" --update --build
|
||||
displayName: 'Command Line Script'
|
||||
|
||||
- script: |
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ stages:
|
|||
--cmake_generator "$(VSGenerator)"
|
||||
--enable_pybind
|
||||
--enable_onnx_tests
|
||||
--parallel 8 --use_binskim_compliant_compile_flags --update --build --msvc_toolset 14.40
|
||||
--parallel 8 --use_vcpkg --use_binskim_compliant_compile_flags --update --build --msvc_toolset 14.40
|
||||
$(TelemetryOption) ${{ parameters.BUILD_PY_PARAMETERS }} ${{ parameters.EP_BUILD_FLAGS }} ${{ variables.trt_build_flag }}
|
||||
workingDirectory: '$(Build.BinariesDirectory)'
|
||||
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ jobs:
|
|||
docker run --rm --volume /data/onnx:/data/onnx:ro --volume $(Build.SourcesDirectory):/onnxruntime_src --volume $(Build.BinariesDirectory):/build \
|
||||
--volume $HOME/.onnx:/home/onnxruntimedev/.onnx -e NIGHTLY_BUILD onnxruntimecpubuildcentos8${{parameters.OnnxruntimeArch}}_packaging /bin/bash -c "python3 \
|
||||
/onnxruntime_src/tools/ci_build/build.py --enable_lto --build_java --build_nodejs --build_dir /build --config Release \
|
||||
--skip_submodule_sync --parallel --use_binskim_compliant_compile_flags --use_vcpkg --build_shared_lib ${{ parameters.AdditionalBuildFlags }} && cd /build/Release && make install DESTDIR=/build/installed"
|
||||
--skip_submodule_sync --parallel --use_vcpkg --use_binskim_compliant_compile_flags --use_vcpkg --build_shared_lib ${{ parameters.AdditionalBuildFlags }} && cd /build/Release && make install DESTDIR=/build/installed"
|
||||
mkdir $(Build.ArtifactStagingDirectory)/testdata
|
||||
cp $(Build.BinariesDirectory)/Release/libcustom_op_library.so* $(Build.ArtifactStagingDirectory)/testdata
|
||||
ls -al $(Build.ArtifactStagingDirectory)
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ steps:
|
|||
- script: |
|
||||
set -e -x
|
||||
rm -rf $(Build.BinariesDirectory)/Release
|
||||
python3 $(Build.SourcesDirectory)/tools/ci_build/build.py --update --build ${{ parameters.AdditionalBuildFlags }} --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --parallel --use_binskim_compliant_compile_flags --build_shared_lib --config Release --use_vcpkg
|
||||
python3 $(Build.SourcesDirectory)/tools/ci_build/build.py --update --build ${{ parameters.AdditionalBuildFlags }} --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --parallel --use_vcpkg --use_binskim_compliant_compile_flags --build_shared_lib --config Release --use_vcpkg
|
||||
cd $(Build.BinariesDirectory)/Release
|
||||
make install DESTDIR=$(Build.BinariesDirectory)/installed
|
||||
displayName: 'Build ${{ parameters.MacosArch }}'
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ jobs:
|
|||
--use_qnn
|
||||
--qnn_home $(QnnSDKRootDir)
|
||||
--enable_pybind
|
||||
--parallel --update
|
||||
--parallel --use_vcpkg --update
|
||||
$(TelemetryOption) ${{ parameters.BUILD_PY_PARAMETERS }}
|
||||
workingDirectory: '$(Build.BinariesDirectory)'
|
||||
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ jobs:
|
|||
--use_qnn
|
||||
--qnn_home $(QnnSDKRootDir)
|
||||
--enable_pybind
|
||||
--parallel --update --arm64ec
|
||||
--parallel --use_vcpkg --update --arm64ec
|
||||
$(TelemetryOption) ${{ parameters.BUILD_PY_PARAMETERS }}
|
||||
workingDirectory: '$(Build.BinariesDirectory)'
|
||||
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ jobs:
|
|||
--use_qnn
|
||||
--qnn_home $(QnnSDKRootDir)
|
||||
--enable_pybind
|
||||
--parallel --update
|
||||
--parallel --use_vcpkg --update
|
||||
$(TelemetryOption) ${{ parameters.BUILD_PY_PARAMETERS }}
|
||||
workingDirectory: '$(Build.BinariesDirectory)'
|
||||
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ jobs:
|
|||
--rocm_home=/opt/rocm \
|
||||
--nccl_home=/opt/rocm \
|
||||
--update \
|
||||
--parallel \
|
||||
--parallel --use_vcpkg \
|
||||
--build_dir /build \
|
||||
--build \
|
||||
--build_wheel \
|
||||
|
|
|
|||
|
|
@ -161,22 +161,10 @@ stages:
|
|||
displayName: 'Generate cmake config'
|
||||
inputs:
|
||||
scriptPath: '$(Build.SourcesDirectory)\tools\ci_build\build.py'
|
||||
arguments: '--config RelWithDebInfo --use_binskim_compliant_compile_flags --enable_lto --disable_rtti --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --build_shared_lib --update --cmake_generator "$(VSGenerator)" --enable_onnx_tests $(TelemetryOption) ${{ parameters.buildparameter }} $(timeoutParameter) $(buildJavaParameter)'
|
||||
arguments: '--config RelWithDebInfo --use_binskim_compliant_compile_flags --enable_lto --disable_rtti --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --build_shared_lib --update --build --use_vcpkg --cmake_generator "$(VSGenerator)" --enable_onnx_tests $(TelemetryOption) ${{ parameters.buildparameter }} $(timeoutParameter) $(buildJavaParameter)'
|
||||
workingDirectory: '$(Build.BinariesDirectory)'
|
||||
|
||||
|
||||
- task: VSBuild@1
|
||||
displayName: 'Build'
|
||||
inputs:
|
||||
solution: '$(Build.BinariesDirectory)\RelWithDebInfo\onnxruntime.sln'
|
||||
platform: ${{ parameters.msbuildPlatform }}
|
||||
configuration: RelWithDebInfo
|
||||
msbuildArchitecture: ${{ parameters.buildArch }}
|
||||
maximumCpuCount: true # default is num logical cores worth of projects building concurrently
|
||||
logProjectEvents: true
|
||||
workingFolder: '$(Build.BinariesDirectory)\RelWithDebInfo'
|
||||
createLogFile: true
|
||||
|
||||
# For CPU job, tests are run in the same machine as building
|
||||
- ${{ if eq(parameters.buildJava, 'true') }}:
|
||||
- template: make_java_win_binaries.yml
|
||||
|
|
|
|||
Loading…
Reference in a new issue