mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-23 19:32:23 +00:00
Add python 3.8/3.9 support for Windows GPU and Linux ARM64 Delete jemalloc from cgmanifest.json. Add onnx node test to Nuphar pipeline. Change $ANDROID_HOME/ndk-bundle to $ANDROID_NDK_HOME. The later one is more accurate. Delete Java GPU packaging pipeline Remove test data download step in Nuget Mac OS pipeline. Because these machines are out of control and out of our network, it's hard to make it reliable and the data secure. Fix a doc problem in c-api-artifacts-package-and-publish-steps-windows.yml. It shouldn't copy C_API.md, because the file has been moved into a different branch. Delete the CI build docker file for Ubuntu cuda 9.x and Ubuntu x86 32 bits And, due to some internal restrictions, I need to rename some of the agent pools
88 lines
4.1 KiB
YAML
88 lines
4.1 KiB
YAML
jobs:
|
|
- job: 'build'
|
|
pool: 'Win-GPU-2019'
|
|
variables:
|
|
OrtPackageId: 'Microsoft.ML.OnnxRuntime'
|
|
MsbuildArguments: '-detailedsummary -maxcpucount -consoleloggerparameters:PerformanceSummary'
|
|
OnnxRuntimeBuildDirectory: '$(Build.BinariesDirectory)'
|
|
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
|
|
EnvSetupScript: setup_env_trt.bat
|
|
buildArch: x64
|
|
setVcvars: true
|
|
BuildConfig: 'RelWithDebInfo'
|
|
ALLOW_RELEASED_ONNX_OPSET_ONLY: '1'
|
|
timeoutInMinutes: 120
|
|
workspace:
|
|
clean: all
|
|
steps:
|
|
- task: UsePythonVersion@0
|
|
inputs:
|
|
versionSpec: '3.7'
|
|
addToPath: true
|
|
architecture: $(buildArch)
|
|
|
|
- task: BatchScript@1
|
|
displayName: 'setup env'
|
|
inputs:
|
|
filename: '$(Build.SourcesDirectory)\tools\ci_build\github\windows\$(EnvSetupScript)'
|
|
modifyEnvironment: true
|
|
workingFolder: '$(Build.BinariesDirectory)'
|
|
|
|
- script: |
|
|
python -m pip install -q pyopenssl setuptools wheel numpy flake8
|
|
workingDirectory: '$(Build.BinariesDirectory)'
|
|
displayName: 'Install python modules'
|
|
|
|
- powershell: |
|
|
$Env:USE_MSVC_STATIC_RUNTIME=1
|
|
$Env:ONNX_ML=1
|
|
$Env:CMAKE_ARGS="-DONNX_USE_PROTOBUF_SHARED_LIBS=OFF -DProtobuf_USE_STATIC_LIBS=ON -DONNX_USE_LITE_PROTO=ON -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=$(buildArch)-windows-static"
|
|
python setup.py bdist_wheel
|
|
python -m pip uninstall -y onnx -qq
|
|
Get-ChildItem -Path dist/*.whl | foreach {pip --disable-pip-version-check install --upgrade $_.fullname}
|
|
workingDirectory: '$(Build.SourcesDirectory)\cmake\external\onnx'
|
|
displayName: 'Install ONNX'
|
|
|
|
- task: PythonScript@0
|
|
displayName: 'Generate cmake config'
|
|
inputs:
|
|
scriptPath: '$(Build.SourcesDirectory)\tools\ci_build\build.py'
|
|
arguments: '--config $(BuildConfig) --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --build_shared_lib --update --cmake_generator "Visual Studio 16 2019" --build_wheel --enable_onnx_tests --use_tensorrt --tensorrt_home="C:\local\TensorRT-7.1.3.4.cuda-11.0.cudnn8.0\TensorRT-7.1.3.4" --cuda_version=11.0 --cuda_home="C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.0" --cudnn_home="C:\local\cudnn-11.0-windows-x64-v8.0.2.39\cuda" --cmake_extra_defines CMAKE_SYSTEM_VERSION=10.0.18362.0'
|
|
workingDirectory: '$(Build.BinariesDirectory)'
|
|
|
|
- task: VSBuild@1
|
|
displayName: 'Build'
|
|
inputs:
|
|
solution: '$(Build.BinariesDirectory)\$(BuildConfig)\onnxruntime.sln'
|
|
platform: 'x64'
|
|
configuration: $(BuildConfig)
|
|
msbuildArgs: $(MsbuildArguments)
|
|
msbuildArchitecture: $(buildArch)
|
|
maximumCpuCount: true
|
|
logProjectEvents: false
|
|
workingFolder: '$(Build.BinariesDirectory)\$(BuildConfig)'
|
|
createLogFile: true
|
|
|
|
- task: PythonScript@0
|
|
displayName: 'Build wheel'
|
|
inputs:
|
|
scriptPath: '$(Build.SourcesDirectory)\setup.py'
|
|
arguments: 'bdist_wheel'
|
|
workingDirectory: '$(Build.BinariesDirectory)\$(BuildConfig)\$(BuildConfig)'
|
|
|
|
- script: |
|
|
mklink /D /J $(Build.BinariesDirectory)\$(BuildConfig)\models $(Build.BinariesDirectory)\models
|
|
DIR dist\ /S /B > wheel_filename_file
|
|
set /p WHEEL_FILENAME=<wheel_filename_file
|
|
del wheel_filename_file
|
|
python.exe -m pip install -q --upgrade %WHEEL_FILENAME%
|
|
set PATH=$(Build.BinariesDirectory)\$(BuildConfig)\$(BuildConfig);%PATH%
|
|
python $(Build.SourcesDirectory)\tools\ci_build\build.py --config $(BuildConfig) --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --build_shared_lib --test --cmake_generator "Visual Studio 16 2019" --build_wheel --enable_onnx_tests --use_tensorrt --tensorrt_home="C:\local\TensorRT-7.1.3.4.cuda-11.0.cudnn8.0\TensorRT-7.1.3.4" --cuda_version=11.0 --cuda_home="C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.0" --cudnn_home="C:\local\cudnn-11.0-windows-x64-v8.0.2.39\cuda" --cmake_extra_defines CMAKE_SYSTEM_VERSION=10.0.18362.0
|
|
|
|
workingDirectory: '$(Build.BinariesDirectory)\$(BuildConfig)\$(BuildConfig)'
|
|
displayName: 'Run tests'
|
|
|
|
|
|
- template: templates/component-governance-component-detection-steps.yml
|
|
parameters :
|
|
condition : 'succeeded'
|