Skip to content

Commit 5630b08

Browse files
ORT 1.22.2 cherry-pick PR 25552 (#25720)
### Description Cherry-pick PR #25552, which allows building python wheels for ORT 1.22.2 ### Motivation and Context <!-- - Why is this change required? What problem does it solve? - If it fixes an open issue, please link to the issue here. --> Co-authored-by: Changming Sun <[email protected]>
1 parent 19f37d7 commit 5630b08

File tree

3 files changed

+25
-34
lines changed

3 files changed

+25
-34
lines changed

tools/ci_build/github/azure-pipelines/stages/py-cpu-packaging-stage.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,23 @@ stages:
301301
MACHINE_POOL: 'onnxruntime-qnn-windows-vs-2022-arm64'
302302
QNN_SDK: ${{ parameters.qnn_sdk_version }}
303303
BUILD_PY_PARAMETERS: ${{ parameters.build_py_parameters }}
304+
PYTHON_VERSION: '3.11'
305+
is1ES: true
306+
307+
- template: ../templates/py-win-arm64-qnn.yml
308+
parameters:
309+
MACHINE_POOL: 'onnxruntime-qnn-windows-vs-2022-arm64'
310+
QNN_SDK: ${{ parameters.qnn_sdk_version }}
311+
BUILD_PY_PARAMETERS: ${{ parameters.build_py_parameters }}
312+
PYTHON_VERSION: '3.12'
313+
is1ES: true
314+
315+
- template: ../templates/py-win-arm64-qnn.yml
316+
parameters:
317+
MACHINE_POOL: 'onnxruntime-qnn-windows-vs-2022-arm64'
318+
QNN_SDK: ${{ parameters.qnn_sdk_version }}
319+
BUILD_PY_PARAMETERS: ${{ parameters.build_py_parameters }}
320+
PYTHON_VERSION: '3.13'
304321
is1ES: true
305322

306323
- ${{ if eq(parameters.enable_windows_arm64ec_qnn, true) }}:

tools/ci_build/github/azure-pipelines/templates/py-win-arm64-qnn.yml

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ parameters:
44
type: string
55
default: 'onnxruntime-qnn-windows-vs-2022-arm64'
66

7+
- name: PYTHON_VERSION
8+
type: string
9+
default: '3.11'
10+
711
- name: QNN_SDK
812
displayName: QNN SDK Version
913
type: string
@@ -25,25 +29,14 @@ parameters:
2529
default: false
2630

2731
jobs:
28-
- job: Win_py_arm64_qnn_Wheels
32+
- job: Win_py_arm64_qnn_Wheels_${{ replace(parameters.PYTHON_VERSION,'.','_') }}
2933
timeoutInMinutes: 210
3034
workspace:
3135
clean: all
3236
pool:
3337
name: ${{ parameters.MACHINE_POOL }}
3438
os: windows
3539
hostArchitecture: Arm64
36-
strategy:
37-
matrix:
38-
Python311_arm64:
39-
PythonVersion: '3.11.0'
40-
LocalPythonDir: 'C:\Python\Python311'
41-
Python312_arm64:
42-
PythonVersion: '3.12.6'
43-
LocalPythonDir: 'C:\Python\Python312'
44-
Python313_arm64:
45-
PythonVersion: '3.13.2'
46-
LocalPythonDir: 'C:\Python\Python313'
4740
variables:
4841
GRADLE_OPTS: '-Dorg.gradle.daemon=false'
4942
VSGenerator: 'Visual Studio 17 2022'
@@ -54,18 +47,9 @@ jobs:
5447

5548
- template: telemetry-steps.yml
5649

57-
- script: |
58-
MKDIR $(Agent.ToolsDirectory)\Python\$(PythonVersion)\arm64
59-
XCOPY /s /y /h /e /c /q "$(LocalPythonDir)\*.*" $(Agent.ToolsDirectory)\Python\$(PythonVersion)\arm64\
60-
COPY NUL $(Agent.ToolsDirectory)\Python\$(PythonVersion)\arm64.complete
61-
DIR $(Agent.ToolsDirectory)\Python
62-
DIR $(Agent.ToolsDirectory)\Python\$(PythonVersion)
63-
DIR $(Agent.ToolsDirectory)\Python\$(PythonVersion)\arm64
64-
displayName: Copy python $(PythonVersion) version to agent tools directory
65-
6650
- task: UsePythonVersion@0
6751
inputs:
68-
versionSpec: $(PythonVersion)
52+
versionSpec: ${{ parameters.PYTHON_VERSION }}
6953
addToPath: true
7054
architecture: 'arm64'
7155

@@ -150,13 +134,13 @@ jobs:
150134
- task: 1ES.PublishPipelineArtifact@1
151135
displayName: 'Publish Artifact: ONNXRuntime python wheel'
152136
inputs:
153-
artifactName: onnxruntime_qnn_arm64_$(PythonVersion)
137+
artifactName: onnxruntime_qnn_arm64_${{ parameters.PYTHON_VERSION }}
154138
targetPath: '$(Build.ArtifactStagingDirectory)'
155139
- ${{ if eq(parameters.is1ES, false) }}:
156140
- task: PublishPipelineArtifact@1
157141
displayName: 'Publish Artifact: ONNXRuntime python wheel'
158142
input:
159-
artifactName: onnxruntime_qnn_arm64_$(PythonVersion)
143+
artifactName: onnxruntime_qnn_arm64_${{ parameters.PYTHON_VERSION }}
160144
targetPath: '$(Build.ArtifactStagingDirectory)'
161145

162146
- script: |

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

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,6 @@ jobs:
6161
# because the python bindings also use the USE_<EP>_PROVIDER_INTERFACE preprocessor macros.
6262
ExtraQnnBuildArgs: '--enable_generic_interface --build_wheel'
6363
steps:
64-
65-
- script: |
66-
MKDIR $(Agent.ToolsDirectory)\Python\3.11.0\arm64
67-
XCOPY /s /y /h /e /c /q "C:\Python\Python311\*.*" $(Agent.ToolsDirectory)\Python\3.11.0\arm64\
68-
COPY NUL $(Agent.ToolsDirectory)\Python\3.11.0\arm64.complete
69-
DIR $(Agent.ToolsDirectory)\Python
70-
DIR $(Agent.ToolsDirectory)\Python\3.11.0
71-
DIR $(Agent.ToolsDirectory)\Python\3.11.0\arm64
72-
displayName: Copy python 3.11.0 version to agent tools directory
73-
7464
- task: UsePythonVersion@0
7565
inputs:
7666
versionSpec: '3.x'

0 commit comments

Comments
 (0)