-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[QNN EP] set up py packaging pipeline for Linux x64 (#22132)
set up a pipeline to produce nightly Linux x64 whls for onnxruntime-qnn this can be used for offline context binary generation.
- Loading branch information
Showing
9 changed files
with
152 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
97 changes: 97 additions & 0 deletions
97
tools/ci_build/github/azure-pipelines/templates/py-linux-qnn.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
parameters: | ||
- name: machine_pool | ||
type: string | ||
|
||
- name: cmake_build_type | ||
type: string | ||
default: 'Release' | ||
values: | ||
- Debug | ||
- Release | ||
- RelWithDebInfo | ||
- MinSizeRel | ||
|
||
- name: device | ||
type: string | ||
default: 'NPU' | ||
|
||
- name: with_cache | ||
type: boolean | ||
default: false | ||
|
||
- name: extra_build_arg | ||
type: string | ||
default: '' | ||
|
||
- name: QnnSdk | ||
displayName: QNN SDK version | ||
type: string | ||
default: 2.26.0.240828 | ||
|
||
jobs: | ||
- job: Linux_py_qnn_Wheels_x64 | ||
timeoutInMinutes: 240 | ||
workspace: | ||
clean: all | ||
pool: ${{ parameters.machine_pool }} | ||
variables: | ||
# The build machine pool doesn't have dotnet, so it can't run CG. | ||
- name: skipComponentGovernanceDetection | ||
value: true | ||
- name: ORT_CACHE_DIR | ||
value: $(Agent.TempDirectory)/ort_ccache | ||
- name: TODAY | ||
value: $[format('{0:dd}{0:MM}{0:yyyy}', pipeline.startTime)] | ||
- name: extra_build_args | ||
${{ if ne(parameters.extra_build_arg, '') }}: | ||
value: -x ${{ parameters.extra_build_arg }} | ||
${{ if eq(parameters.extra_build_arg, '') }}: | ||
value: '' | ||
steps: | ||
- task: mspremier.PostBuildCleanup.PostBuildCleanup-task.PostBuildCleanup@3 | ||
displayName: 'Clean Agent Directories' | ||
condition: always() | ||
|
||
- checkout: self | ||
clean: true | ||
submodules: none | ||
|
||
- template: jobs/download_linux_qnn_sdk.yml | ||
parameters: | ||
QnnSDKVersion: ${{ parameters.QnnSdk }} | ||
|
||
- template: set-nightly-build-option-variable-step.yml | ||
|
||
- template: get-docker-image-steps.yml | ||
parameters: | ||
Dockerfile: tools/ci_build/github/linux/docker/inference/x86_64/python/cpu/Dockerfile | ||
Context: tools/ci_build/github/linux/docker/inference/x86_64/python/cpu | ||
DockerBuildArgs: "--build-arg BUILD_UID=$( id -u )" | ||
Repository: onnxruntimecpubuildpythonx86_64_qnn | ||
|
||
- template: linux-build-step-with-cache.yml | ||
parameters: | ||
WithCache: ${{parameters.with_cache}} | ||
Today: $(TODAY) | ||
AdditionalKey: Linux_py_qnn_Wheels_x64 | ||
CacheDir: $(ORT_CACHE_DIR) | ||
ChangeEveryCommit: true | ||
BuildStep: | ||
- task: Bash@3 | ||
displayName: 'Build Python Wheel' | ||
inputs: | ||
targetType: filePath | ||
filePath: tools/ci_build/github/linux/run_python_dockerbuild.sh | ||
arguments: -i onnxruntimecpubuildpythonx86_64_qnn -d "${{ parameters.device }}" -c ${{ parameters.cmake_build_type }} $(extra_build_args) | ||
env: | ||
ADDITIONAL_DOCKER_PARAMETER: "--volume $(QnnSDKRootDir):/qnn_sdk" | ||
|
||
- task: PublishBuildArtifacts@1 | ||
displayName: 'Publish Artifact: Linux ONNXRuntime QNN python wheel' | ||
inputs: | ||
PathtoPublish: '$(Build.BinariesDirectory)/dist' | ||
ArtifactName: onnxruntime-linux-qnn-x64 | ||
|
||
- template: component-governance-component-detection-steps.yml | ||
parameters : | ||
condition : 'succeeded' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters