Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
351edab
Use win-qnn-ci-pipeline.yml as the base
yihonglyu Feb 23, 2025
23111a8
Amend for win-openvino-ci-pipeline.yml accordingly
yihonglyu Feb 23, 2025
a620cc4
[Temp] Debug environment variables
yihonglyu Feb 24, 2025
b531d24
[Draft] Exporting environment variables to pipeline
yihonglyu Feb 24, 2025
c5e1c16
[Temp] Make timeoutInMinutes longer and add OpenVINO debug message
yihonglyu Feb 24, 2025
99db3e0
[Draft] Use powershell to run unit test
yihonglyu Feb 25, 2025
0169927
[Tmp] Skip test_register_custom_ops_library and test_register_custom_…
yihonglyu Feb 26, 2025
6fd864e
[Tmp] Disable 'Run float32 model tests' and 'Run float32 model tests'
yihonglyu Feb 25, 2025
a92762a
Remove --build_wheel
yihonglyu Mar 4, 2025
255c109
Revert "[Tmp] Skip test_register_custom_ops_library and test_register…
yihonglyu Mar 4, 2025
925156a
Remove log message
yihonglyu Mar 4, 2025
842d8f1
[Tmp] Get CPU information
yihonglyu Mar 5, 2025
cc4fd69
[Tmp] Use onnxruntime-Win2022-Intel-CPU for pool
yihonglyu Mar 5, 2025
80d2a96
[Temp] Download OpenVINO externally
yihonglyu Mar 5, 2025
27b4658
[Tmp] Fix syntax error
yihonglyu Mar 5, 2025
f5e0e0e
[Tmp] Get CPU info in 'Run unit tests' stage
yihonglyu Mar 5, 2025
0b37582
Polish log message of download_win_openvino.yml
yihonglyu Mar 5, 2025
49712b2
Remove log message
yihonglyu Mar 5, 2025
dd01908
[Draft] Revert cmake/onnxruntime_unittests.cmake
yihonglyu Mar 5, 2025
4c51f10
[Draft] Remove parameters ... etc
yihonglyu Mar 5, 2025
909947f
[Draft] Enlarge timeoutInMinutes
yihonglyu Mar 6, 2025
a97b715
[Draft] Enlarge TIMEOUT
yihonglyu Mar 6, 2025
0134ad6
Amend set-trigger-rules.py
yihonglyu Mar 6, 2025
f80b5e0
Remove unavailable yml in set-trigger-rules.py
yihonglyu Mar 6, 2025
2c0701c
Add error handling when $InnerFolder is not found
yihonglyu Mar 6, 2025
3c8a0d5
Try to fix PowerShell Write-Error @" error
yihonglyu Mar 6, 2025
e082146
Try to fix PowerShell Write-Error error
yihonglyu Mar 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cmake/onnxruntime_unittests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -236,14 +236,14 @@ function(AddTest)
)
endif()
# Set test timeout to 3 hours.
set_tests_properties(${_UT_TARGET} PROPERTIES TIMEOUT 7200)
set_tests_properties(${_UT_TARGET} PROPERTIES TIMEOUT 10800)
else()
add_test(NAME ${_UT_TARGET}
COMMAND ${_UT_TARGET} ${TEST_ARGS}
WORKING_DIRECTORY $<TARGET_FILE_DIR:${_UT_TARGET}>
)
# Set test timeout to 3 hours.
set_tests_properties(${_UT_TARGET} PROPERTIES TIMEOUT 7200)
set_tests_properties(${_UT_TARGET} PROPERTIES TIMEOUT 10800)
endif()
endif()
endfunction(AddTest)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
parameters:
- name: OpenVINOVersion
type: string
default: '2025.0.0'

steps:
- powershell: |
$Url = "https://storage.openvinotoolkit.org/repositories/openvino/packages/2025.0/windows/openvino_toolkit_windows_2025.0.0.17942.1f68be9f594_x86_64.zip"
Comment thread
yihonglyu marked this conversation as resolved.
$OutputPath = "$env:Agent_TempDirectory\openvino.zip"
$ExtractPath = "$env:Agent_TempDirectory\openvino-v$env:OpenVINOVersion"
$TempExtractPath = "$env:Agent_TempDirectory\openvino_temp"

# Ensure directories exist
if (Test-Path $ExtractPath) {
Remove-Item -Recurse -Force $ExtractPath
}
New-Item -ItemType Directory -Path $ExtractPath | Out-Null
New-Item -ItemType Directory -Path $TempExtractPath | Out-Null

# Download OpenVINO ZIP
Write-Output "Downloading OpenVINO"
Invoke-WebRequest -Uri $Url -OutFile $OutputPath

# Extract to temporary directory first
Write-Output "Extracting OpenVINO to a temporary directory"
Expand-Archive -Path $OutputPath -DestinationPath $TempExtractPath -Force

# Locate the nested subdirectory
$InnerFolder = Get-ChildItem -Path $TempExtractPath -Directory | Select-Object -First 1
Comment thread
yihonglyu marked this conversation as resolved.

if ($InnerFolder) {
Write-Output "Moving extracted files to final destination"
Move-Item -Path "$($InnerFolder.FullName)\*" -Destination $ExtractPath -Force
} else {
Write-Error "Extraction failed: No expected subdirectory found in $TempExtractPath."
Write-Error "The archive may not have extracted correctly, or its structure is different than expected."
exit 1
}

# Clean up temporary files
Remove-Item -Recurse -Force $TempExtractPath
Remove-Item -Force $OutputPath

# Confirm success
Write-Output "OpenVINO extracted to $ExtractPath"
displayName: 'Download OpenVINO Toolkit v${{ parameters.OpenVINOVersion }}'
env:
OpenVINOVersion: ${{ parameters.OpenVINOVersion }}

- powershell: |
echo "##vso[task.setvariable variable=OpenVINORootDir]$(Agent.TempDirectory)\openvino-v${{ parameters.OpenVINOVersion }}"
displayName: 'Set OpenVINORootDir'

- task: CmdLine@2
inputs:
script: |
echo $(OpenVINORootDir)
displayName: 'Print OpenVINORootDir after downloading OpenVINO'

- task: CmdLine@2
displayName: 'Print contents of OpenVINO Toolkit'
inputs:
script: |
dir $(OpenVINORootDir)
116 changes: 116 additions & 0 deletions tools/ci_build/github/azure-pipelines/win-openvino-ci-pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
##### start trigger Don't edit it manually, Please do edit set-trigger-rules.py ####
### please do rerun 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 ####

jobs:
- job: 'BUILD_OPENVINO_EP'
pool: 'onnxruntime-Win-CPU-2022'
variables:
MsbuildArguments: '-detailedsummary -maxcpucount -consoleloggerparameters:PerformanceSummary'
OnnxRuntimeBuildDirectory: '$(Build.BinariesDirectory)'
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
buildArch: x64
setVcvars: true
BuildConfig: 'RelWithDebInfo'
ALLOW_RELEASED_ONNX_OPSET_ONLY: '1'
TODAY: $[format('{0:dd}{0:MM}{0:yyyy}', pipeline.startTime)]
timeoutInMinutes: 240
workspace:
clean: all
steps:

- task: UsePythonVersion@0
inputs:
versionSpec: '3.12'
addToPath: true
architecture: $(buildArch)

- template: templates/jobs/download_win_openvino.yml

- powershell: |
Write-Output "Setting up OpenVINO environment variables"
. "$(OpenVINORootDir)\setupvars.ps1"

Write-Output "Exporting selected environment variables to pipeline"

$vars = @(
"INTEL_OPENVINO_DIR",
"OpenVINO_DIR",
"OpenVINOGenAI_DIR",
"OPENVINO_LIB_PATHS",
"TBB_DIR",
"PATH",
"PYTHONPATH"
)

foreach ($var in $vars) {
if (Test-Path "Env:$var") {
$value = [System.Environment]::GetEnvironmentVariable($var, "Process")
Write-Output "Setting $var"
Write-Output "##vso[task.setvariable variable=$var;]$value"
} else {
Write-Output "Warning: $var is not set."
}
}

Write-Output "Selected environment variables exported successfully"
displayName: 'Set up OpenVINO environment'

- template: templates/jobs/win-ci-build-steps.yml
parameters:
WithCache: True
Today: $(TODAY)
AdditionalKey: "win-openvino | $(BuildConfig)"
BuildPyArguments: >-
--config $(BuildConfig)
--build_dir $(Build.BinariesDirectory)
--cmake_generator "Visual Studio 17 2022"
--build_shared_lib
--use_openvino CPU
--use_binskim_compliant_compile_flags
--update --parallel
MsbuildArguments: $(MsbuildArguments)
BuildArch: $(buildArch)
Platform: 'x64'
BuildConfig: $(BuildConfig)

- powershell: |
Write-Output "Getting CPU information"
Get-WmiObject Win32_Processor | Select-Object Name, NumberOfCores, NumberOfLogicalProcessors, Architecture | Format-Table -AutoSize

Write-Output "Starting unit tests"
python "$(Build.SourcesDirectory)\tools\ci_build\build.py" `
--config "$(BuildConfig)" `
--build_dir "$(Build.BinariesDirectory)" `
--cmake_generator "Visual Studio 17 2022" `
--build_shared_lib `
--use_openvino CPU `
--use_binskim_compliant_compile_flags `
--test --enable_onnx_tests
displayName: 'Run unit tests'
3 changes: 1 addition & 2 deletions tools/ci_build/set-trigger-rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
"android-x86_64-crosscompile-ci-pipeline.yml",
"bigmodels-ci-pipeline.yml",
"linux-ci-pipeline.yml",
"linux-cpu-aten-pipeline.yml",
"linux-cpu-eager-pipeline.yml",
"linux-dnnl-ci-pipeline.yml",
"linux-gpu-ci-pipeline.yml",
"linux-gpu-tensorrt-ci-pipeline.yml",
Expand All @@ -36,6 +34,7 @@
"win-gpu-doc-gen-ci-pipeline.yml",
"win-gpu-tensorrt-ci-pipeline.yml",
"win-gpu-webgpu-ci-pipeline.yml",
"win-openvino-ci-pipeline.yml",
"win-qnn-arm64-ci-pipeline.yml",
"win-qnn-ci-pipeline.yml",
]
Expand Down