From 351edab773b01e8b6f748b9c2be6f4f93767fa1a Mon Sep 17 00:00:00 2001 From: Yi-Hong Lyu Date: Sun, 23 Feb 2025 10:07:34 -0800 Subject: [PATCH 01/27] Use win-qnn-ci-pipeline.yml as the base --- .../templates/jobs/download_win_openvino.yml | 30 +++++ .../win-openvino-ci-pipeline.yml | 112 ++++++++++++++++++ 2 files changed, 142 insertions(+) create mode 100644 tools/ci_build/github/azure-pipelines/templates/jobs/download_win_openvino.yml create mode 100644 tools/ci_build/github/azure-pipelines/win-openvino-ci-pipeline.yml diff --git a/tools/ci_build/github/azure-pipelines/templates/jobs/download_win_openvino.yml b/tools/ci_build/github/azure-pipelines/templates/jobs/download_win_openvino.yml new file mode 100644 index 0000000000000..66793592a6be5 --- /dev/null +++ b/tools/ci_build/github/azure-pipelines/templates/jobs/download_win_openvino.yml @@ -0,0 +1,30 @@ +parameters: + - name: QnnSDKVersion + type: string + default: '2.31.0.250130' + +steps: + - powershell: | + azcopy.exe cp --recursive https://lotusscus.blob.core.windows.net/models/qnnsdk/qnn-v${{ parameters.QnnSDKVersion }} $(Agent.TempDirectory) + displayName: 'Download QNN SDK v${{ parameters.QnnSDKVersion }}' + + - powershell: | + echo "##vso[task.setvariable variable=QnnSDKRootDir]$(Agent.TempDirectory)\qnn-v${{ parameters.QnnSDKVersion }}" + displayName: Set QnnSDKRootDir + + - task: CmdLine@2 + inputs: + script: | + echo $(QnnSDKRootDir) + displayName: 'Print QnnSDKRootDir after downloading QNN SDK' + + - powershell: | + azcopy.exe cp --recursive 'https://lotusscus.blob.core.windows.net/models/qnnsdk/Qualcomm AI Hub Proprietary License.pdf' $(QnnSDKRootDir) + displayName: 'Download Qualcomm AI Hub license' + + - task: CmdLine@2 + displayName: 'Print contents of QNN SDK' + inputs: + script: | + dir $(QnnSDKRootDir) + diff --git a/tools/ci_build/github/azure-pipelines/win-openvino-ci-pipeline.yml b/tools/ci_build/github/azure-pipelines/win-openvino-ci-pipeline.yml new file mode 100644 index 0000000000000..81de3335a07d2 --- /dev/null +++ b/tools/ci_build/github/azure-pipelines/win-openvino-ci-pipeline.yml @@ -0,0 +1,112 @@ +##### 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 #### + +parameters: + +- name: QnnSdk + displayName: QNN SDK version + type: string + default: 2.31.0.250130 + +jobs: +- job: 'BUILD_QNN_EP' + pool: 'Onnxruntime-QNNEP-Windows-2022-CPU' + 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: 120 + workspace: + clean: all + strategy: + matrix: + SHARED_LIB: + QnnLibKind: 'shared_lib' + STATIC_LIB: + QnnLibKind: 'static_lib' + steps: + + - task: UsePythonVersion@0 + inputs: + versionSpec: '3.12' + addToPath: true + architecture: $(buildArch) + + - template: templates/jobs/download_win_qnn_sdk.yml + parameters: + QnnSDKVersion: ${{ parameters.QnnSdk }} + + - template: templates/jobs/win-ci-build-steps.yml + parameters: + WithCache: True + Today: $(TODAY) + AdditionalKey: "win-qnn | $(BuildConfig)" + BuildPyArguments: >- + --config $(BuildConfig) + --build_dir $(Build.BinariesDirectory) + --cmake_generator "Visual Studio 17 2022" + --build_java + --build_shared_lib + --use_qnn $(QnnLibKind) + --qnn_home $(QnnSDKRootDir) + --use_binskim_compliant_compile_flags + --update --parallel + MsbuildArguments: $(MsbuildArguments) + BuildArch: $(buildArch) + Platform: 'x64' + BuildConfig: $(BuildConfig) + + - script: | + python $(Build.SourcesDirectory)\tools\ci_build\build.py ^ + --config $(BuildConfig) ^ + --build_dir $(Build.BinariesDirectory) ^ + --cmake_generator "Visual Studio 17 2022" ^ + --build_java ^ + --build_shared_lib ^ + --use_qnn $(QnnLibKind) ^ + --qnn_home $(QnnSDKRootDir) ^ + --use_binskim_compliant_compile_flags ^ + --test --enable_onnx_tests + displayName: 'Run unit tests' + + - script: | + .\$(BuildConfig)\onnx_test_runner -j 1 -e qnn -i "backend_path|$(QnnSDKRootDir)\lib\x86_64-windows-msvc\QnnCpu.dll" $(Build.SourcesDirectory)\cmake\external\onnx\onnx\backend\test\data\node + workingDirectory: '$(Build.BinariesDirectory)\$(BuildConfig)' + displayName: 'Run ONNX Tests' + + - script: | + .\$(BuildConfig)\onnx_test_runner -j 1 -e qnn -i "backend_path|$(QnnSDKRootDir)\lib\x86_64-windows-msvc\QnnCpu.dll" C:\data\float32_models + workingDirectory: '$(Build.BinariesDirectory)\$(BuildConfig)' + displayName: 'Run float32 model tests' From 23111a8cdebadeefa6bc6e78eabb0e25a471b08b Mon Sep 17 00:00:00 2001 From: Yi-Hong Lyu Date: Sun, 23 Feb 2025 10:10:52 -0800 Subject: [PATCH 02/27] Amend for win-openvino-ci-pipeline.yml accordingly --- .../templates/jobs/download_win_openvino.yml | 24 +++++------ .../win-openvino-ci-pipeline.yml | 42 +++++++++---------- 2 files changed, 30 insertions(+), 36 deletions(-) diff --git a/tools/ci_build/github/azure-pipelines/templates/jobs/download_win_openvino.yml b/tools/ci_build/github/azure-pipelines/templates/jobs/download_win_openvino.yml index 66793592a6be5..d2b30ba236b97 100644 --- a/tools/ci_build/github/azure-pipelines/templates/jobs/download_win_openvino.yml +++ b/tools/ci_build/github/azure-pipelines/templates/jobs/download_win_openvino.yml @@ -1,30 +1,26 @@ parameters: - - name: QnnSDKVersion + - name: OpenVINOVersion type: string - default: '2.31.0.250130' + default: '2025.0.0' steps: - powershell: | - azcopy.exe cp --recursive https://lotusscus.blob.core.windows.net/models/qnnsdk/qnn-v${{ parameters.QnnSDKVersion }} $(Agent.TempDirectory) - displayName: 'Download QNN SDK v${{ parameters.QnnSDKVersion }}' + azcopy.exe cp --recursive https://lotusscus.blob.core.windows.net/models/openvino/openvino-v${{ parameters.OpenVINOVersion }} $(Agent.TempDirectory) + displayName: 'Download OpenVINO Toolkit v${{ parameters.OpenVINOVersion }}' - powershell: | - echo "##vso[task.setvariable variable=QnnSDKRootDir]$(Agent.TempDirectory)\qnn-v${{ parameters.QnnSDKVersion }}" - displayName: Set QnnSDKRootDir + echo "##vso[task.setvariable variable=OpenVINORootDir]$(Agent.TempDirectory)\openvino-v${{ parameters.OpenVINOVersion }}" + displayName: 'Set OpenVINORootDir' - task: CmdLine@2 inputs: script: | - echo $(QnnSDKRootDir) - displayName: 'Print QnnSDKRootDir after downloading QNN SDK' - - - powershell: | - azcopy.exe cp --recursive 'https://lotusscus.blob.core.windows.net/models/qnnsdk/Qualcomm AI Hub Proprietary License.pdf' $(QnnSDKRootDir) - displayName: 'Download Qualcomm AI Hub license' + echo $(OpenVINORootDir) + displayName: 'Print OpenVINORootDir after downloading OpenVINO' - task: CmdLine@2 - displayName: 'Print contents of QNN SDK' + displayName: 'Print contents of OpenVINO Toolkit' inputs: script: | - dir $(QnnSDKRootDir) + dir $(OpenVINORootDir) diff --git a/tools/ci_build/github/azure-pipelines/win-openvino-ci-pipeline.yml b/tools/ci_build/github/azure-pipelines/win-openvino-ci-pipeline.yml index 81de3335a07d2..671019072c8de 100644 --- a/tools/ci_build/github/azure-pipelines/win-openvino-ci-pipeline.yml +++ b/tools/ci_build/github/azure-pipelines/win-openvino-ci-pipeline.yml @@ -30,14 +30,14 @@ pr: parameters: -- name: QnnSdk - displayName: QNN SDK version +- name: OpenVINO + displayName: OpenVINO Toolkit Version type: string - default: 2.31.0.250130 + default: 2025.0.0 jobs: -- job: 'BUILD_QNN_EP' - pool: 'Onnxruntime-QNNEP-Windows-2022-CPU' +- job: 'BUILD_OPENVINO_EP' + pool: 'Onnxruntime-QNNEP-Windows-2022-CPU' # 'Onnxruntime-OpenVINO-Windows-2022-CPU' variables: MsbuildArguments: '-detailedsummary -maxcpucount -consoleloggerparameters:PerformanceSummary' OnnxRuntimeBuildDirectory: '$(Build.BinariesDirectory)' @@ -50,12 +50,6 @@ jobs: timeoutInMinutes: 120 workspace: clean: all - strategy: - matrix: - SHARED_LIB: - QnnLibKind: 'shared_lib' - STATIC_LIB: - QnnLibKind: 'static_lib' steps: - task: UsePythonVersion@0 @@ -64,23 +58,27 @@ jobs: addToPath: true architecture: $(buildArch) - - template: templates/jobs/download_win_qnn_sdk.yml + - template: templates/jobs/download_win_openvino.yml parameters: - QnnSDKVersion: ${{ parameters.QnnSdk }} + OpenVINOVersion: ${{ parameters.OpenVINO }} + + - powershell: | + Write-Output "Setting up OpenVINO environment variables" + . "$(OpenVINORootDir)\setupvars.ps1" + displayName: 'Set up OpenVINO environment' - template: templates/jobs/win-ci-build-steps.yml parameters: WithCache: True Today: $(TODAY) - AdditionalKey: "win-qnn | $(BuildConfig)" + AdditionalKey: "win-openvino | $(BuildConfig)" BuildPyArguments: >- --config $(BuildConfig) --build_dir $(Build.BinariesDirectory) --cmake_generator "Visual Studio 17 2022" - --build_java --build_shared_lib - --use_qnn $(QnnLibKind) - --qnn_home $(QnnSDKRootDir) + --build_wheel + --use_openvino CPU --use_binskim_compliant_compile_flags --update --parallel MsbuildArguments: $(MsbuildArguments) @@ -93,20 +91,20 @@ jobs: --config $(BuildConfig) ^ --build_dir $(Build.BinariesDirectory) ^ --cmake_generator "Visual Studio 17 2022" ^ - --build_java ^ --build_shared_lib ^ - --use_qnn $(QnnLibKind) ^ - --qnn_home $(QnnSDKRootDir) ^ + --build_wheel ^ + --use_openvino CPU ^ --use_binskim_compliant_compile_flags ^ --test --enable_onnx_tests displayName: 'Run unit tests' - script: | - .\$(BuildConfig)\onnx_test_runner -j 1 -e qnn -i "backend_path|$(QnnSDKRootDir)\lib\x86_64-windows-msvc\QnnCpu.dll" $(Build.SourcesDirectory)\cmake\external\onnx\onnx\backend\test\data\node + .\$(BuildConfig)\onnx_test_runner -j 1 -e openvino $(Build.SourcesDirectory)\cmake\external\onnx\onnx\backend\test\data\node workingDirectory: '$(Build.BinariesDirectory)\$(BuildConfig)' displayName: 'Run ONNX Tests' - script: | - .\$(BuildConfig)\onnx_test_runner -j 1 -e qnn -i "backend_path|$(QnnSDKRootDir)\lib\x86_64-windows-msvc\QnnCpu.dll" C:\data\float32_models + .\$(BuildConfig)\onnx_test_runner -j 1 -e openvino C:\data\float32_models workingDirectory: '$(Build.BinariesDirectory)\$(BuildConfig)' displayName: 'Run float32 model tests' + From a620cc4450c0f165466103efdb071c5ede425b6c Mon Sep 17 00:00:00 2001 From: Yi-Hong Lyu Date: Mon, 24 Feb 2025 12:19:23 -0800 Subject: [PATCH 03/27] [Temp] Debug environment variables --- .../github/azure-pipelines/win-openvino-ci-pipeline.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/ci_build/github/azure-pipelines/win-openvino-ci-pipeline.yml b/tools/ci_build/github/azure-pipelines/win-openvino-ci-pipeline.yml index 671019072c8de..00c8b101adab3 100644 --- a/tools/ci_build/github/azure-pipelines/win-openvino-ci-pipeline.yml +++ b/tools/ci_build/github/azure-pipelines/win-openvino-ci-pipeline.yml @@ -63,10 +63,16 @@ jobs: OpenVINOVersion: ${{ parameters.OpenVINO }} - powershell: | + Get-ChildItem Env: Write-Output "Setting up OpenVINO environment variables" . "$(OpenVINORootDir)\setupvars.ps1" + Get-ChildItem Env: displayName: 'Set up OpenVINO environment' + - powershell: | + Get-ChildItem Env: + displayName: 'Dump environment' + - template: templates/jobs/win-ci-build-steps.yml parameters: WithCache: True From b531d24fa424d259b6d18af643c331e9544a6881 Mon Sep 17 00:00:00 2001 From: Yi-Hong Lyu Date: Mon, 24 Feb 2025 12:57:58 -0800 Subject: [PATCH 04/27] [Draft] Exporting environment variables to pipeline --- .../win-openvino-ci-pipeline.yml | 30 +++++++++++++++---- 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/tools/ci_build/github/azure-pipelines/win-openvino-ci-pipeline.yml b/tools/ci_build/github/azure-pipelines/win-openvino-ci-pipeline.yml index 00c8b101adab3..020aabd25dbe7 100644 --- a/tools/ci_build/github/azure-pipelines/win-openvino-ci-pipeline.yml +++ b/tools/ci_build/github/azure-pipelines/win-openvino-ci-pipeline.yml @@ -63,15 +63,33 @@ jobs: OpenVINOVersion: ${{ parameters.OpenVINO }} - powershell: | - Get-ChildItem Env: Write-Output "Setting up OpenVINO environment variables" . "$(OpenVINORootDir)\setupvars.ps1" - Get-ChildItem Env: - displayName: 'Set up OpenVINO environment' - - powershell: | - Get-ChildItem Env: - displayName: 'Dump environment' + 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: From c5e1c16bd8de64265b9c7bef32646a37db5d2531 Mon Sep 17 00:00:00 2001 From: Yi-Hong Lyu Date: Mon, 24 Feb 2025 15:44:37 -0800 Subject: [PATCH 05/27] [Temp] Make timeoutInMinutes longer and add OpenVINO debug message --- cmake/onnxruntime_unittests.cmake | 4 ++-- .../core/providers/openvino/openvino_execution_provider.cc | 1 + .../github/azure-pipelines/win-openvino-ci-pipeline.yml | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cmake/onnxruntime_unittests.cmake b/cmake/onnxruntime_unittests.cmake index 2ed7923941643..c36f7cdbaae8c 100644 --- a/cmake/onnxruntime_unittests.cmake +++ b/cmake/onnxruntime_unittests.cmake @@ -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 72000) else() add_test(NAME ${_UT_TARGET} COMMAND ${_UT_TARGET} ${TEST_ARGS} WORKING_DIRECTORY $ ) # Set test timeout to 3 hours. - set_tests_properties(${_UT_TARGET} PROPERTIES TIMEOUT 7200) + set_tests_properties(${_UT_TARGET} PROPERTIES TIMEOUT 72000) endif() endif() endfunction(AddTest) diff --git a/onnxruntime/core/providers/openvino/openvino_execution_provider.cc b/onnxruntime/core/providers/openvino/openvino_execution_provider.cc index 12c16e9c9b8f6..8bfe4a3b93e0c 100644 --- a/onnxruntime/core/providers/openvino/openvino_execution_provider.cc +++ b/onnxruntime/core/providers/openvino/openvino_execution_provider.cc @@ -127,6 +127,7 @@ OpenVINOExecutionProvider::GetCapability(const GraphViewer& graph_viewer, common::Status OpenVINOExecutionProvider::Compile( const std::vector& fused_nodes, std::vector& node_compute_funcs) { + std::cerr << "[Log] Enter OpenVINOExecutionProvider::Compile()\n"; auto& logger = *GetLogger(); Status status = Status::OK(); diff --git a/tools/ci_build/github/azure-pipelines/win-openvino-ci-pipeline.yml b/tools/ci_build/github/azure-pipelines/win-openvino-ci-pipeline.yml index 020aabd25dbe7..60ea5e5d9002c 100644 --- a/tools/ci_build/github/azure-pipelines/win-openvino-ci-pipeline.yml +++ b/tools/ci_build/github/azure-pipelines/win-openvino-ci-pipeline.yml @@ -47,7 +47,7 @@ jobs: BuildConfig: 'RelWithDebInfo' ALLOW_RELEASED_ONNX_OPSET_ONLY: '1' TODAY: $[format('{0:dd}{0:MM}{0:yyyy}', pipeline.startTime)] - timeoutInMinutes: 120 + timeoutInMinutes: 1200 workspace: clean: all steps: From 99db3e09e63b4a6d8a6b112ead274c9973544fe8 Mon Sep 17 00:00:00 2001 From: Yi-Hong Lyu Date: Tue, 25 Feb 2025 10:39:04 -0800 Subject: [PATCH 06/27] [Draft] Use powershell to run unit test --- .../win-openvino-ci-pipeline.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tools/ci_build/github/azure-pipelines/win-openvino-ci-pipeline.yml b/tools/ci_build/github/azure-pipelines/win-openvino-ci-pipeline.yml index 60ea5e5d9002c..8ee871f8a8d51 100644 --- a/tools/ci_build/github/azure-pipelines/win-openvino-ci-pipeline.yml +++ b/tools/ci_build/github/azure-pipelines/win-openvino-ci-pipeline.yml @@ -110,15 +110,15 @@ jobs: Platform: 'x64' BuildConfig: $(BuildConfig) - - script: | - python $(Build.SourcesDirectory)\tools\ci_build\build.py ^ - --config $(BuildConfig) ^ - --build_dir $(Build.BinariesDirectory) ^ - --cmake_generator "Visual Studio 17 2022" ^ - --build_shared_lib ^ - --build_wheel ^ - --use_openvino CPU ^ - --use_binskim_compliant_compile_flags ^ + - powershell: | + python "$(Build.SourcesDirectory)\tools\ci_build\build.py" ` + --config "$(BuildConfig)" ` + --build_dir "$(Build.BinariesDirectory)" ` + --cmake_generator "Visual Studio 17 2022" ` + --build_shared_lib ` + --build_wheel ` + --use_openvino CPU ` + --use_binskim_compliant_compile_flags ` --test --enable_onnx_tests displayName: 'Run unit tests' From 01699274e41dbdb6a8b45d7b181b592c757a47c1 Mon Sep 17 00:00:00 2001 From: Yi-Hong Lyu Date: Wed, 26 Feb 2025 11:22:48 -0800 Subject: [PATCH 07/27] [Tmp] Skip test_register_custom_ops_library and test_register_custom_e_ps_library --- onnxruntime/test/python/onnxruntime_test_python.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/onnxruntime/test/python/onnxruntime_test_python.py b/onnxruntime/test/python/onnxruntime_test_python.py index 3af6e8ccacfb8..61e7935a93c4c 100644 --- a/onnxruntime/test/python/onnxruntime_test_python.py +++ b/onnxruntime/test/python/onnxruntime_test_python.py @@ -1306,6 +1306,11 @@ def test_session_options_add_external_initializers(self): ) def test_register_custom_ops_library(self): + available_eps = C.get_available_providers() + # FIXME: Enable OpenVINOExecutionProvider build + if "OpenVINOExecutionProvider" in available_eps: + return + if sys.platform.startswith("win"): shared_library = "custom_op_library.dll" if not os.path.exists(shared_library): @@ -1720,7 +1725,8 @@ def check_failure(providers, provider_options): def test_register_custom_e_ps_library(self): available_eps = C.get_available_providers() # skip amd gpu build - if "ROCMExecutionProvider" in available_eps: + # FIXME: Enable OpenVINOExecutionProvider build + if "ROCMExecutionProvider" in available_eps or "OpenVINOExecutionProvider" in available_eps: return if sys.platform.startswith("win"): From 6fd864ef2d499227778e7212351a017a3c74645d Mon Sep 17 00:00:00 2001 From: Yi-Hong Lyu Date: Tue, 25 Feb 2025 13:08:48 -0800 Subject: [PATCH 08/27] [Tmp] Disable 'Run float32 model tests' and 'Run float32 model tests' --- .../azure-pipelines/win-openvino-ci-pipeline.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tools/ci_build/github/azure-pipelines/win-openvino-ci-pipeline.yml b/tools/ci_build/github/azure-pipelines/win-openvino-ci-pipeline.yml index 8ee871f8a8d51..fab58cfc8ff25 100644 --- a/tools/ci_build/github/azure-pipelines/win-openvino-ci-pipeline.yml +++ b/tools/ci_build/github/azure-pipelines/win-openvino-ci-pipeline.yml @@ -122,13 +122,13 @@ jobs: --test --enable_onnx_tests displayName: 'Run unit tests' - - script: | - .\$(BuildConfig)\onnx_test_runner -j 1 -e openvino $(Build.SourcesDirectory)\cmake\external\onnx\onnx\backend\test\data\node - workingDirectory: '$(Build.BinariesDirectory)\$(BuildConfig)' - displayName: 'Run ONNX Tests' +# - powershell: | +# & ".\$(BuildConfig)\onnx_test_runner" -j 1 -e openvino "$(Build.SourcesDirectory)\cmake\external\onnx\onnx\backend\test\data\node" +# workingDirectory: '$(Build.BinariesDirectory)\$(BuildConfig)' +# displayName: 'Run ONNX Tests' - - script: | - .\$(BuildConfig)\onnx_test_runner -j 1 -e openvino C:\data\float32_models - workingDirectory: '$(Build.BinariesDirectory)\$(BuildConfig)' - displayName: 'Run float32 model tests' +# - powershell: | +# & ".\$(BuildConfig)\onnx_test_runner" -j 1 -e openvino "C:\data\float32_models" +# workingDirectory: '$(Build.BinariesDirectory)\$(BuildConfig)' +# displayName: 'Run float32 model tests' From a92762ad1b7e8fba99e7d5588c030b9ef9244891 Mon Sep 17 00:00:00 2001 From: Yi-Hong Lyu Date: Tue, 4 Mar 2025 14:33:18 -0800 Subject: [PATCH 09/27] Remove --build_wheel --- .../github/azure-pipelines/win-openvino-ci-pipeline.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/ci_build/github/azure-pipelines/win-openvino-ci-pipeline.yml b/tools/ci_build/github/azure-pipelines/win-openvino-ci-pipeline.yml index fab58cfc8ff25..e0963df5e54f5 100644 --- a/tools/ci_build/github/azure-pipelines/win-openvino-ci-pipeline.yml +++ b/tools/ci_build/github/azure-pipelines/win-openvino-ci-pipeline.yml @@ -101,7 +101,6 @@ jobs: --build_dir $(Build.BinariesDirectory) --cmake_generator "Visual Studio 17 2022" --build_shared_lib - --build_wheel --use_openvino CPU --use_binskim_compliant_compile_flags --update --parallel @@ -116,7 +115,6 @@ jobs: --build_dir "$(Build.BinariesDirectory)" ` --cmake_generator "Visual Studio 17 2022" ` --build_shared_lib ` - --build_wheel ` --use_openvino CPU ` --use_binskim_compliant_compile_flags ` --test --enable_onnx_tests From 255c109f19d0fe82cfcd84ad2ce20c722a151635 Mon Sep 17 00:00:00 2001 From: Yi-Hong Lyu Date: Tue, 4 Mar 2025 14:34:11 -0800 Subject: [PATCH 10/27] Revert "[Tmp] Skip test_register_custom_ops_library and test_register_custom_e_ps_library" This reverts commit 22681f1f862c7c88f6b111955c8a6d1379a96f91. --- onnxruntime/test/python/onnxruntime_test_python.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/onnxruntime/test/python/onnxruntime_test_python.py b/onnxruntime/test/python/onnxruntime_test_python.py index 61e7935a93c4c..3af6e8ccacfb8 100644 --- a/onnxruntime/test/python/onnxruntime_test_python.py +++ b/onnxruntime/test/python/onnxruntime_test_python.py @@ -1306,11 +1306,6 @@ def test_session_options_add_external_initializers(self): ) def test_register_custom_ops_library(self): - available_eps = C.get_available_providers() - # FIXME: Enable OpenVINOExecutionProvider build - if "OpenVINOExecutionProvider" in available_eps: - return - if sys.platform.startswith("win"): shared_library = "custom_op_library.dll" if not os.path.exists(shared_library): @@ -1725,8 +1720,7 @@ def check_failure(providers, provider_options): def test_register_custom_e_ps_library(self): available_eps = C.get_available_providers() # skip amd gpu build - # FIXME: Enable OpenVINOExecutionProvider build - if "ROCMExecutionProvider" in available_eps or "OpenVINOExecutionProvider" in available_eps: + if "ROCMExecutionProvider" in available_eps: return if sys.platform.startswith("win"): From 925156a28e2dcf0a0935da2c3622bab66570be63 Mon Sep 17 00:00:00 2001 From: Yi-Hong Lyu Date: Tue, 4 Mar 2025 14:37:53 -0800 Subject: [PATCH 11/27] Remove log message --- .../core/providers/openvino/openvino_execution_provider.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onnxruntime/core/providers/openvino/openvino_execution_provider.cc b/onnxruntime/core/providers/openvino/openvino_execution_provider.cc index 8bfe4a3b93e0c..908e688363457 100644 --- a/onnxruntime/core/providers/openvino/openvino_execution_provider.cc +++ b/onnxruntime/core/providers/openvino/openvino_execution_provider.cc @@ -127,7 +127,7 @@ OpenVINOExecutionProvider::GetCapability(const GraphViewer& graph_viewer, common::Status OpenVINOExecutionProvider::Compile( const std::vector& fused_nodes, std::vector& node_compute_funcs) { - std::cerr << "[Log] Enter OpenVINOExecutionProvider::Compile()\n"; + //std::cerr << "[Log] Enter OpenVINOExecutionProvider::Compile()\n"; auto& logger = *GetLogger(); Status status = Status::OK(); From 842d8f19991a7b1fd413594b4ab7facc6a635749 Mon Sep 17 00:00:00 2001 From: Yi-Hong Lyu Date: Wed, 5 Mar 2025 01:50:22 -0800 Subject: [PATCH 12/27] [Tmp] Get CPU information --- .../github/azure-pipelines/win-openvino-ci-pipeline.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/ci_build/github/azure-pipelines/win-openvino-ci-pipeline.yml b/tools/ci_build/github/azure-pipelines/win-openvino-ci-pipeline.yml index e0963df5e54f5..01c6b7aaabd2a 100644 --- a/tools/ci_build/github/azure-pipelines/win-openvino-ci-pipeline.yml +++ b/tools/ci_build/github/azure-pipelines/win-openvino-ci-pipeline.yml @@ -58,6 +58,10 @@ jobs: addToPath: true architecture: $(buildArch) + - powershell: | + Get-WmiObject Win32_Processor | Select-Object Name, NumberOfCores, NumberOfLogicalProcessors, Architecture + displayName: "Get CPU Information" + - template: templates/jobs/download_win_openvino.yml parameters: OpenVINOVersion: ${{ parameters.OpenVINO }} From cc4fd69f357f903c212f4fbbc57144df221fe99a Mon Sep 17 00:00:00 2001 From: Yi-Hong Lyu Date: Wed, 5 Mar 2025 03:40:20 -0800 Subject: [PATCH 13/27] [Tmp] Use onnxruntime-Win2022-Intel-CPU for pool --- .../github/azure-pipelines/win-openvino-ci-pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/ci_build/github/azure-pipelines/win-openvino-ci-pipeline.yml b/tools/ci_build/github/azure-pipelines/win-openvino-ci-pipeline.yml index 01c6b7aaabd2a..d59a9db24bb86 100644 --- a/tools/ci_build/github/azure-pipelines/win-openvino-ci-pipeline.yml +++ b/tools/ci_build/github/azure-pipelines/win-openvino-ci-pipeline.yml @@ -37,7 +37,7 @@ parameters: jobs: - job: 'BUILD_OPENVINO_EP' - pool: 'Onnxruntime-QNNEP-Windows-2022-CPU' # 'Onnxruntime-OpenVINO-Windows-2022-CPU' + pool: 'onnxruntime-Win2022-Intel-CPU' # 'Onnxruntime-OpenVINO-Windows-2022-CPU' variables: MsbuildArguments: '-detailedsummary -maxcpucount -consoleloggerparameters:PerformanceSummary' OnnxRuntimeBuildDirectory: '$(Build.BinariesDirectory)' From 80d2a964b8331cb56c3af9db9169091d2f6c4eda Mon Sep 17 00:00:00 2001 From: Yi-Hong Lyu Date: Wed, 5 Mar 2025 06:29:36 -0800 Subject: [PATCH 14/27] [Temp] Download OpenVINO externally --- .../templates/jobs/download_win_openvino.yml | 36 ++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/tools/ci_build/github/azure-pipelines/templates/jobs/download_win_openvino.yml b/tools/ci_build/github/azure-pipelines/templates/jobs/download_win_openvino.yml index d2b30ba236b97..be8833af7703a 100644 --- a/tools/ci_build/github/azure-pipelines/templates/jobs/download_win_openvino.yml +++ b/tools/ci_build/github/azure-pipelines/templates/jobs/download_win_openvino.yml @@ -5,7 +5,41 @@ parameters: steps: - powershell: | - azcopy.exe cp --recursive https://lotusscus.blob.core.windows.net/models/openvino/openvino-v${{ parameters.OpenVINOVersion }} $(Agent.TempDirectory) + # Define variables + $Url = "https://storage.openvinotoolkit.org/repositories/openvino/packages/2025.0/windows/openvino_toolkit_windows_2025.0.0.17942.1f68be9f594_x86_64.zip" + $OutputPath = $(Agent.TempDirectory)\openvino.zip + $ExtractPath = $(Agent.TempDirectory)\openvino-v${{ parameters.OpenVINOVersion }} + $TempExtractPath = $(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 + + if ($InnerFolder) { + Write-Output "Moving extracted files to final destination..." + Move-Item -Path "$($InnerFolder.FullName)\*" -Destination $ExtractPath -Force + } + + # 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 }}' - powershell: | From 27b4658a048b6163bd875f22baf283f6367180e3 Mon Sep 17 00:00:00 2001 From: Yi-Hong Lyu Date: Wed, 5 Mar 2025 07:00:50 -0800 Subject: [PATCH 15/27] [Tmp] Fix syntax error --- .../templates/jobs/download_win_openvino.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/ci_build/github/azure-pipelines/templates/jobs/download_win_openvino.yml b/tools/ci_build/github/azure-pipelines/templates/jobs/download_win_openvino.yml index be8833af7703a..8e6e3cfa3021e 100644 --- a/tools/ci_build/github/azure-pipelines/templates/jobs/download_win_openvino.yml +++ b/tools/ci_build/github/azure-pipelines/templates/jobs/download_win_openvino.yml @@ -7,9 +7,9 @@ steps: - powershell: | # Define variables $Url = "https://storage.openvinotoolkit.org/repositories/openvino/packages/2025.0/windows/openvino_toolkit_windows_2025.0.0.17942.1f68be9f594_x86_64.zip" - $OutputPath = $(Agent.TempDirectory)\openvino.zip - $ExtractPath = $(Agent.TempDirectory)\openvino-v${{ parameters.OpenVINOVersion }} - $TempExtractPath = $(Agent.TempDirectory)\openvino_temp + $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) { @@ -41,6 +41,8 @@ steps: # 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 }}" From f5e0e0ed752d21c3bd508b095e334b07cd8ef8d8 Mon Sep 17 00:00:00 2001 From: Yi-Hong Lyu Date: Wed, 5 Mar 2025 07:34:06 -0800 Subject: [PATCH 16/27] [Tmp] Get CPU info in 'Run unit tests' stage --- .../github/azure-pipelines/win-openvino-ci-pipeline.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/ci_build/github/azure-pipelines/win-openvino-ci-pipeline.yml b/tools/ci_build/github/azure-pipelines/win-openvino-ci-pipeline.yml index d59a9db24bb86..698cfbfcac284 100644 --- a/tools/ci_build/github/azure-pipelines/win-openvino-ci-pipeline.yml +++ b/tools/ci_build/github/azure-pipelines/win-openvino-ci-pipeline.yml @@ -114,6 +114,10 @@ jobs: 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)" ` From 0b37582e2418260c4b8efac7316eb331724941c8 Mon Sep 17 00:00:00 2001 From: Yi-Hong Lyu Date: Wed, 5 Mar 2025 11:29:26 -0800 Subject: [PATCH 17/27] Polish log message of download_win_openvino.yml --- .../templates/jobs/download_win_openvino.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/ci_build/github/azure-pipelines/templates/jobs/download_win_openvino.yml b/tools/ci_build/github/azure-pipelines/templates/jobs/download_win_openvino.yml index 8e6e3cfa3021e..99fdaefadde39 100644 --- a/tools/ci_build/github/azure-pipelines/templates/jobs/download_win_openvino.yml +++ b/tools/ci_build/github/azure-pipelines/templates/jobs/download_win_openvino.yml @@ -5,7 +5,6 @@ parameters: steps: - powershell: | - # Define variables $Url = "https://storage.openvinotoolkit.org/repositories/openvino/packages/2025.0/windows/openvino_toolkit_windows_2025.0.0.17942.1f68be9f594_x86_64.zip" $OutputPath = "$env:Agent_TempDirectory\openvino.zip" $ExtractPath = "$env:Agent_TempDirectory\openvino-v$env:OpenVINOVersion" @@ -19,18 +18,18 @@ steps: New-Item -ItemType Directory -Path $TempExtractPath | Out-Null # Download OpenVINO ZIP - Write-Output "Downloading OpenVINO..." + Write-Output "Downloading OpenVINO" Invoke-WebRequest -Uri $Url -OutFile $OutputPath # Extract to temporary directory first - Write-Output "Extracting OpenVINO to a temporary directory..." + 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 if ($InnerFolder) { - Write-Output "Moving extracted files to final destination..." + Write-Output "Moving extracted files to final destination" Move-Item -Path "$($InnerFolder.FullName)\*" -Destination $ExtractPath -Force } From 49712b23a02d31194fa5614be5741fa3001e3bd1 Mon Sep 17 00:00:00 2001 From: Yi-Hong Lyu Date: Wed, 5 Mar 2025 12:09:18 -0800 Subject: [PATCH 18/27] Remove log message --- .../core/providers/openvino/openvino_execution_provider.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/onnxruntime/core/providers/openvino/openvino_execution_provider.cc b/onnxruntime/core/providers/openvino/openvino_execution_provider.cc index 908e688363457..12c16e9c9b8f6 100644 --- a/onnxruntime/core/providers/openvino/openvino_execution_provider.cc +++ b/onnxruntime/core/providers/openvino/openvino_execution_provider.cc @@ -127,7 +127,6 @@ OpenVINOExecutionProvider::GetCapability(const GraphViewer& graph_viewer, common::Status OpenVINOExecutionProvider::Compile( const std::vector& fused_nodes, std::vector& node_compute_funcs) { - //std::cerr << "[Log] Enter OpenVINOExecutionProvider::Compile()\n"; auto& logger = *GetLogger(); Status status = Status::OK(); From dd019087c075542e01654f3a6247bcc6af7a2316 Mon Sep 17 00:00:00 2001 From: Yi-Hong Lyu Date: Wed, 5 Mar 2025 12:13:43 -0800 Subject: [PATCH 19/27] [Draft] Revert cmake/onnxruntime_unittests.cmake --- cmake/onnxruntime_unittests.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/onnxruntime_unittests.cmake b/cmake/onnxruntime_unittests.cmake index c36f7cdbaae8c..2ed7923941643 100644 --- a/cmake/onnxruntime_unittests.cmake +++ b/cmake/onnxruntime_unittests.cmake @@ -236,14 +236,14 @@ function(AddTest) ) endif() # Set test timeout to 3 hours. - set_tests_properties(${_UT_TARGET} PROPERTIES TIMEOUT 72000) + set_tests_properties(${_UT_TARGET} PROPERTIES TIMEOUT 7200) else() add_test(NAME ${_UT_TARGET} COMMAND ${_UT_TARGET} ${TEST_ARGS} WORKING_DIRECTORY $ ) # Set test timeout to 3 hours. - set_tests_properties(${_UT_TARGET} PROPERTIES TIMEOUT 72000) + set_tests_properties(${_UT_TARGET} PROPERTIES TIMEOUT 7200) endif() endif() endfunction(AddTest) From 4c51f100b79154f678306df44021f85316bcbecd Mon Sep 17 00:00:00 2001 From: Yi-Hong Lyu Date: Wed, 5 Mar 2025 12:14:12 -0800 Subject: [PATCH 20/27] [Draft] Remove parameters ... etc - Use pool onnxruntime-Win-CPU-2022 - Revert timeoutInMinutes - Remove 'Get CPU Information' task - Remove parameters for download_win_openvino.yml - Remove 'Run ONNX Tests' task - Remove 'Run float32 model tests' task --- .../win-openvino-ci-pipeline.yml | 28 ++----------------- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/tools/ci_build/github/azure-pipelines/win-openvino-ci-pipeline.yml b/tools/ci_build/github/azure-pipelines/win-openvino-ci-pipeline.yml index 698cfbfcac284..761228515d18d 100644 --- a/tools/ci_build/github/azure-pipelines/win-openvino-ci-pipeline.yml +++ b/tools/ci_build/github/azure-pipelines/win-openvino-ci-pipeline.yml @@ -28,16 +28,9 @@ pr: - 'onnxruntime/core/providers/js' #### end trigger #### -parameters: - -- name: OpenVINO - displayName: OpenVINO Toolkit Version - type: string - default: 2025.0.0 - jobs: - job: 'BUILD_OPENVINO_EP' - pool: 'onnxruntime-Win2022-Intel-CPU' # 'Onnxruntime-OpenVINO-Windows-2022-CPU' + pool: 'onnxruntime-Win-CPU-2022' variables: MsbuildArguments: '-detailedsummary -maxcpucount -consoleloggerparameters:PerformanceSummary' OnnxRuntimeBuildDirectory: '$(Build.BinariesDirectory)' @@ -47,7 +40,7 @@ jobs: BuildConfig: 'RelWithDebInfo' ALLOW_RELEASED_ONNX_OPSET_ONLY: '1' TODAY: $[format('{0:dd}{0:MM}{0:yyyy}', pipeline.startTime)] - timeoutInMinutes: 1200 + timeoutInMinutes: 120 workspace: clean: all steps: @@ -58,13 +51,7 @@ jobs: addToPath: true architecture: $(buildArch) - - powershell: | - Get-WmiObject Win32_Processor | Select-Object Name, NumberOfCores, NumberOfLogicalProcessors, Architecture - displayName: "Get CPU Information" - - template: templates/jobs/download_win_openvino.yml - parameters: - OpenVINOVersion: ${{ parameters.OpenVINO }} - powershell: | Write-Output "Setting up OpenVINO environment variables" @@ -127,14 +114,3 @@ jobs: --use_binskim_compliant_compile_flags ` --test --enable_onnx_tests displayName: 'Run unit tests' - -# - powershell: | -# & ".\$(BuildConfig)\onnx_test_runner" -j 1 -e openvino "$(Build.SourcesDirectory)\cmake\external\onnx\onnx\backend\test\data\node" -# workingDirectory: '$(Build.BinariesDirectory)\$(BuildConfig)' -# displayName: 'Run ONNX Tests' - -# - powershell: | -# & ".\$(BuildConfig)\onnx_test_runner" -j 1 -e openvino "C:\data\float32_models" -# workingDirectory: '$(Build.BinariesDirectory)\$(BuildConfig)' -# displayName: 'Run float32 model tests' - From 909947f1cb7341721f217238e8108309e888fdae Mon Sep 17 00:00:00 2001 From: Yi-Hong Lyu Date: Wed, 5 Mar 2025 17:33:39 -0800 Subject: [PATCH 21/27] [Draft] Enlarge timeoutInMinutes --- .../github/azure-pipelines/win-openvino-ci-pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/ci_build/github/azure-pipelines/win-openvino-ci-pipeline.yml b/tools/ci_build/github/azure-pipelines/win-openvino-ci-pipeline.yml index 761228515d18d..f95ac526886fa 100644 --- a/tools/ci_build/github/azure-pipelines/win-openvino-ci-pipeline.yml +++ b/tools/ci_build/github/azure-pipelines/win-openvino-ci-pipeline.yml @@ -40,7 +40,7 @@ jobs: BuildConfig: 'RelWithDebInfo' ALLOW_RELEASED_ONNX_OPSET_ONLY: '1' TODAY: $[format('{0:dd}{0:MM}{0:yyyy}', pipeline.startTime)] - timeoutInMinutes: 120 + timeoutInMinutes: 240 workspace: clean: all steps: From a97b715df0224edf9ed7ed3c23e23a412450cac4 Mon Sep 17 00:00:00 2001 From: Yi-Hong Lyu Date: Wed, 5 Mar 2025 21:58:54 -0800 Subject: [PATCH 22/27] [Draft] Enlarge TIMEOUT --- cmake/onnxruntime_unittests.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/onnxruntime_unittests.cmake b/cmake/onnxruntime_unittests.cmake index 2ed7923941643..87aee2a174fab 100644 --- a/cmake/onnxruntime_unittests.cmake +++ b/cmake/onnxruntime_unittests.cmake @@ -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 $ ) # 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) From 0134ad6e6d3bce324fdc757be89f15454d3e3eed Mon Sep 17 00:00:00 2001 From: Yi-Hong Lyu Date: Thu, 6 Mar 2025 10:03:09 -0800 Subject: [PATCH 23/27] Amend set-trigger-rules.py --- tools/ci_build/set-trigger-rules.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/ci_build/set-trigger-rules.py b/tools/ci_build/set-trigger-rules.py index 78f59452d1284..0703767bc2e69 100644 --- a/tools/ci_build/set-trigger-rules.py +++ b/tools/ci_build/set-trigger-rules.py @@ -36,6 +36,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", ] From f80b5e0d534eee42f8e1d45b4312e43d572c09dd Mon Sep 17 00:00:00 2001 From: Yi-Hong Lyu Date: Thu, 6 Mar 2025 10:50:31 -0800 Subject: [PATCH 24/27] Remove unavailable yml in set-trigger-rules.py --- tools/ci_build/set-trigger-rules.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/ci_build/set-trigger-rules.py b/tools/ci_build/set-trigger-rules.py index 0703767bc2e69..899aaaa95216a 100644 --- a/tools/ci_build/set-trigger-rules.py +++ b/tools/ci_build/set-trigger-rules.py @@ -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", From 2c0701c09891f0eedc66f00c49168aa3f10171d2 Mon Sep 17 00:00:00 2001 From: Yi-Hong Lyu Date: Thu, 6 Mar 2025 11:02:57 -0800 Subject: [PATCH 25/27] Add error handling when $InnerFolder is not found --- .../templates/jobs/download_win_openvino.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/ci_build/github/azure-pipelines/templates/jobs/download_win_openvino.yml b/tools/ci_build/github/azure-pipelines/templates/jobs/download_win_openvino.yml index 99fdaefadde39..e1682e507de0a 100644 --- a/tools/ci_build/github/azure-pipelines/templates/jobs/download_win_openvino.yml +++ b/tools/ci_build/github/azure-pipelines/templates/jobs/download_win_openvino.yml @@ -31,6 +31,12 @@ steps: 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. + The archive may not have extracted correctly, or its structure is different than expected. + "@ + exit 1 # Exit with an error status to indicate failure } # Clean up temporary files @@ -58,4 +64,3 @@ steps: inputs: script: | dir $(OpenVINORootDir) - From 3c8a0d50d3df284e8a232c27dcab14e790ece32b Mon Sep 17 00:00:00 2001 From: Yi-Hong Lyu Date: Thu, 6 Mar 2025 11:27:43 -0800 Subject: [PATCH 26/27] Try to fix PowerShell Write-Error @" error --- .../templates/jobs/download_win_openvino.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/ci_build/github/azure-pipelines/templates/jobs/download_win_openvino.yml b/tools/ci_build/github/azure-pipelines/templates/jobs/download_win_openvino.yml index e1682e507de0a..22c78264d16ae 100644 --- a/tools/ci_build/github/azure-pipelines/templates/jobs/download_win_openvino.yml +++ b/tools/ci_build/github/azure-pipelines/templates/jobs/download_win_openvino.yml @@ -33,9 +33,9 @@ steps: Move-Item -Path "$($InnerFolder.FullName)\*" -Destination $ExtractPath -Force } else { Write-Error @" - Extraction failed: No expected subdirectory found in $TempExtractPath. - The archive may not have extracted correctly, or its structure is different than expected. - "@ +Extraction failed: No expected subdirectory found in $TempExtractPath. +The archive may not have extracted correctly, or its structure is different than expected. +"@ exit 1 # Exit with an error status to indicate failure } From e08214656276ecfe2a8d67c54aa09c9b8273bf44 Mon Sep 17 00:00:00 2001 From: Yi-Hong Lyu Date: Thu, 6 Mar 2025 11:36:37 -0800 Subject: [PATCH 27/27] Try to fix PowerShell Write-Error error --- .../templates/jobs/download_win_openvino.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tools/ci_build/github/azure-pipelines/templates/jobs/download_win_openvino.yml b/tools/ci_build/github/azure-pipelines/templates/jobs/download_win_openvino.yml index 22c78264d16ae..f6956b426ddfc 100644 --- a/tools/ci_build/github/azure-pipelines/templates/jobs/download_win_openvino.yml +++ b/tools/ci_build/github/azure-pipelines/templates/jobs/download_win_openvino.yml @@ -32,11 +32,9 @@ steps: 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. -The archive may not have extracted correctly, or its structure is different than expected. -"@ - exit 1 # Exit with an error status to indicate failure + 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