onnxruntime/tools/ci_build/github/azure-pipelines/win-ci-pipeline.yml
George Wu 4005d12ed4
add vitisai ep build stage to Windows CPU Pipeline (#21361)
We need to prevent VitisAI EP build breaks, add a stage in Windows CPU
CI Pipeline to build Vitis AI EP on Windows.
There are no external dependencies for builds. Tests have to be disabled
though as the EP has external SW/HW dependencies.
This will at least allow us to prevent build breaks which has happened
on multiple occasions recently.

tested
https://dev.azure.com/onnxruntime/onnxruntime/_build/results?buildId=1432346&view=results
and it seems to run fine.
2024-07-15 19:34:08 -07:00

278 lines
8.7 KiB
YAML

##### start trigger Don't edit it manually, Please do edit set-trigger-rules.py ####
trigger:
branches:
include:
- main
- rel-*
paths:
exclude:
- docs/**
- README.md
- CONTRIBUTING.md
- BUILD.md
- 'js/web'
- 'onnxruntime/core/providers/js'
pr:
branches:
include:
- main
- rel-*
paths:
exclude:
- docs/**
- README.md
- CONTRIBUTING.md
- BUILD.md
- 'js/web'
- 'onnxruntime/core/providers/js'
#### end trigger ####
parameters:
- name: RunOnnxRuntimeTests
displayName: Run Tests?
type: boolean
default: true
stages:
- stage: x64_debug
dependsOn: []
jobs:
- template: templates/jobs/win-ci-vs-2022-job.yml
parameters:
BuildConfig: 'Debug'
buildArch: x64
additionalBuildFlags: --build_java --build_nodejs --build_wheel --disable_memleak_checker
msbuildPlatform: x64
isX86: false
job_name_suffix: x64_debug
RunOnnxRuntimeTests: ${{ parameters.RunOnnxRuntimeTests }}
isTraining: false
ORT_EP_NAME: CPU
GenerateDocumentation: false
WITH_CACHE: false
MachinePool: 'onnxruntime-Win-CPU-2022'
- job: build_x64_asan
pool: 'onnxruntime-Win-CPU-2022'
timeoutInMinutes: 300
steps:
- checkout: self
clean: true
submodules: none
- template: templates/jobs/win-ci-prebuild-steps.yml
parameters:
EnvSetupScript: setup_env.bat
DownloadCUDA: false
BuildArch: x64
BuildConfig: Debug
MachinePool: 'onnxruntime-Win-CPU-2022'
WithCache: false
InstallONNX: false
Today: $(TODAY)
- task: PythonScript@0
displayName: 'Build and Test'
inputs:
scriptPath: '$(Build.SourcesDirectory)\tools\ci_build\build.py'
arguments: --config Debug --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --parallel --use_binskim_compliant_compile_flags --cmake_generator "Visual Studio 17 2022" --disable_memleak_checker --enable_address_sanitizer
workingDirectory: '$(Build.BinariesDirectory)'
- stage: x64_release
dependsOn: []
jobs:
- template: templates/jobs/win-ci-vs-2022-job.yml
parameters:
BuildConfig: 'RelWithDebInfo'
buildArch: x64
# Compare to our Nuget packaging pipeline, this job has "--build_wheel" but doesn't have "--enable_lto --disable_rtti --use_telemetry --enable_wcos"
# Python bindings use typeid so I can't disable RTTI here. If it causes a problem, we will need to split this job to two jobs.
additionalBuildFlags: --build_wheel --build_java --build_nodejs
msbuildPlatform: x64
isX86: false
job_name_suffix: x64_release
RunOnnxRuntimeTests: ${{ parameters.RunOnnxRuntimeTests }}
isTraining: false
ORT_EP_NAME: CPU
GenerateDocumentation: false
WITH_CACHE: false
MachinePool: 'onnxruntime-Win-CPU-2022'
- stage: x64_release_dnnl
dependsOn: []
jobs:
- template: templates/jobs/win-ci-vs-2022-job.yml
parameters:
BuildConfig: 'RelWithDebInfo'
buildArch: x64
additionalBuildFlags: --build_wheel --use_dnnl --build_java
msbuildPlatform: x64
isX86: false
job_name_suffix: x64_release
RunOnnxRuntimeTests: ${{ parameters.RunOnnxRuntimeTests }}
isTraining: false
ORT_EP_NAME: DNNL
GenerateDocumentation: false
WITH_CACHE: false
# Intel EPs require Intel CPUs
MachinePool: 'onnxruntime-Win2022-Intel-CPU'
# Tests doesn't work on AMD CPUs
- stage: x64_release_xnnpack
dependsOn: []
jobs:
- template: templates/jobs/win-ci-vs-2022-job.yml
parameters:
BuildConfig: 'RelWithDebInfo'
buildArch: x64
additionalBuildFlags: --build_wheel --use_xnnpack
msbuildPlatform: x64
isX86: false
job_name_suffix: x64_release
RunOnnxRuntimeTests: true
isTraining: false
ORT_EP_NAME: XNNPACK
GenerateDocumentation: false
WITH_CACHE: false
MachinePool: 'onnxruntime-Win-CPU-2022'
# Build only. Does not run any tests.
- stage: x64_release_vitisai
dependsOn: []
jobs:
- template: templates/jobs/win-ci-vs-2022-job.yml
parameters:
BuildConfig: 'RelWithDebInfo'
buildArch: x64
additionalBuildFlags: --build_wheel --use_vitisai
msbuildPlatform: x64
isX86: false
job_name_suffix: x64_release
RunOnnxRuntimeTests: false
isTraining: false
ORT_EP_NAME: VITISAI
GenerateDocumentation: false
WITH_CACHE: false
MachinePool: 'onnxruntime-Win-CPU-2022'
- stage: x64_release_winml
dependsOn: []
jobs:
- template: templates/jobs/win-ci-vs-2022-job.yml
parameters:
BuildConfig: 'RelWithDebInfo'
buildArch: x64
additionalBuildFlags: --use_winml --enable_wcos --disable_rtti --cmake_extra_defines CMAKE_SYSTEM_VERSION=10.0.22000.0
msbuildPlatform: x64
isX86: false
job_name_suffix: x64_release_winml
RunOnnxRuntimeTests: ${{ parameters.RunOnnxRuntimeTests }}
# WinML has many warnings
EnablePython: false
isTraining: false
ORT_EP_NAME: CPU
GenerateDocumentation: false
WITH_CACHE: false
MachinePool: 'onnxruntime-Win-CPU-2022'
- stage: x86_release
dependsOn: []
jobs:
- template: templates/jobs/win-ci-vs-2022-job.yml
parameters:
BuildConfig: 'RelWithDebInfo'
EnvSetupScript: setup_env_x86.bat
buildArch: x86
additionalBuildFlags: --build_wheel
msbuildPlatform: Win32
isX86: true
job_name_suffix: x86_release
RunOnnxRuntimeTests: ${{ parameters.RunOnnxRuntimeTests }}
isTraining: false
ORT_EP_NAME: CPU
GenerateDocumentation: false
WITH_CACHE: false
MachinePool: 'onnxruntime-Win-CPU-2022'
- stage: training_x64_debug
dependsOn: []
jobs:
- template: templates/jobs/win-ci-vs-2022-job.yml
parameters:
BuildConfig: 'Debug'
buildArch: x64
additionalBuildFlags: --enable_training --build_wheel --disable_memleak_checker
msbuildPlatform: x64
isX86: false
job_name_suffix: training_x64_debug
RunOnnxRuntimeTests: ${{ parameters.RunOnnxRuntimeTests }}
isTraining: true
ORT_EP_NAME: CPU
GenerateDocumentation: false
WITH_CACHE: false
MachinePool: 'onnxruntime-Win2022-CPU-training-AMD'
- stage: training_x64_release
dependsOn: []
jobs:
- template: templates/jobs/win-ci-vs-2022-job.yml
parameters:
BuildConfig: 'RelWithDebInfo'
buildArch: x64
additionalBuildFlags: --enable_training --build_wheel
msbuildPlatform: x64
isX86: false
job_name_suffix: training_x64_release
RunOnnxRuntimeTests: ${{ parameters.RunOnnxRuntimeTests }}
isTraining: true
ORT_EP_NAME: CPU
GenerateDocumentation: false
WITH_CACHE: false
MachinePool: 'onnxruntime-Win2022-CPU-training-AMD'
- stage: ort_training_apis_x64_release
dependsOn: []
jobs:
- template: templates/jobs/win-ci-vs-2022-job.yml
parameters:
BuildConfig: 'RelWithDebInfo'
buildArch: x64
additionalBuildFlags: --enable_training_apis
msbuildPlatform: x64
isX86: false
job_name_suffix: ort_training_apis_x64_release
RunOnnxRuntimeTests: ${{ parameters.RunOnnxRuntimeTests }}
EnablePython: false
isTraining: true
ORT_EP_NAME: CPU
GenerateDocumentation: false
WITH_CACHE: false
MachinePool: 'onnxruntime-Win2022-CPU-training-AMD'
- stage: x64_release_azure
dependsOn: []
jobs:
- job: x64_release_azure
steps:
- powershell: |
Write-Host "##vso[task.prependpath]$(Build.BinariesDirectory)\RelWithDebInfo\_deps\vcpkg-src\installed\x86-windows\bin"
$env:PATH
Write-Host "##vso[task.prependpath]$(Build.BinariesDirectory)\RelWithDebInfo\_deps\vcpkg-src\installed\x64-windows\bin"
$env:PATH
displayName: 'Append x64-windows and x86-windows to PATH'
- template: templates/jobs/win-ci-vs-2022-job.yml
parameters:
BuildConfig: 'RelWithDebInfo'
buildArch: x64
additionalBuildFlags: --use_azure --use_lock_free_queue
msbuildPlatform: x64
isX86: false
job_name_suffix: x64_release_azure
RunOnnxRuntimeTests: ${{ parameters.RunOnnxRuntimeTests }}
EnablePython: false
isTraining: false
ORT_EP_NAME: CPU
GenerateDocumentation: false
WITH_CACHE: false
MachinePool: 'onnxruntime-Win-CPU-2022'