Skip to content

Commit ab2eaed

Browse files
authored
Install ONNX by buildling source code in Windows DML stage (#20079)
### Description In #20073, I use pin onnx version to unblock the whole PR CI. In fact, we could use the onnx that installed by building source code, that the onnx version is controlled by deps.txt. For some history reason, DML stage installed onnx from pypi. Now, the onnx can be installed as other stages. add an option to skip installing onnx in win-ci-prebuild-step
1 parent 4df9d16 commit ab2eaed

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

tools/ci_build/build.py

-7
Original file line numberDiff line numberDiff line change
@@ -2083,13 +2083,6 @@ def run_onnxruntime_tests(args, source_dir, ctest_path, build_dir, configs):
20832083
# For CUDA or DML enabled builds test IOBinding feature
20842084
if args.use_cuda or args.use_dml:
20852085
log.info("Testing IOBinding feature")
2086-
if args.use_dml:
2087-
run_subprocess(
2088-
[sys.executable, "-m", "pip", "uninstall", "--yes", "onnx"], cwd=cwd, dll_path=dll_path
2089-
)
2090-
run_subprocess(
2091-
[sys.executable, "-m", "pip", "install", "-q", "onnx==1.15.0"], cwd=cwd, dll_path=dll_path
2092-
)
20932086
run_subprocess([sys.executable, "onnxruntime_test_python_iobinding.py"], cwd=cwd, dll_path=dll_path)
20942087

20952088
if args.use_cuda:

tools/ci_build/github/azure-pipelines/templates/jobs/win-ci-prebuild-steps.yml

+5
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ parameters:
1313
type: boolean
1414
default: false
1515

16+
- name: InstallONNX
17+
type: boolean
18+
default: true
19+
1620
- name: WITHCACHE
1721
type: boolean
1822
default: false
@@ -106,6 +110,7 @@ steps:
106110
107111
displayName: Install ccache and update PATH to use linked versions of gcc, cc, etc
108112
113+
- ${{ if eq(parameters.InstallONNX, true) }}:
109114
- ${{ if eq(parameters.WITHCACHE, true) }}:
110115
- task: Cache@2
111116
# machinepool is used to ensure the compiler is same

tools/ci_build/github/azure-pipelines/win-ci-pipeline.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ stages:
6868
BuildConfig: Debug
6969
MachinePool: 'onnxruntime-Win-CPU-2022'
7070
WithCache: false
71+
InstallONNX: false
7172
Today: $(TODAY)
7273

7374
- task: PythonScript@0
@@ -155,7 +156,7 @@ stages:
155156
GenerateDocumentation: false
156157
WITH_CACHE: false
157158
MachinePool: 'onnxruntime-Win-CPU-2022'
158-
159+
159160
- stage: x86_release
160161
dependsOn: []
161162
jobs:
@@ -256,5 +257,3 @@ stages:
256257
GenerateDocumentation: false
257258
WITH_CACHE: false
258259
MachinePool: 'onnxruntime-Win-CPU-2022'
259-
260-

0 commit comments

Comments
 (0)