-
Notifications
You must be signed in to change notification settings - Fork 3.8k
[QNN EP] set up py packaging pipeline for Linux x64 #22132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
98c5739
adding linux x64 qnn python job
jywu-msft 4619070
format
jywu-msft 115f832
fix
jywu-msft c547e0a
test
jywu-msft c586b4c
test
jywu-msft 06b813b
escape
jywu-msft 1c98152
escape
jywu-msft 3e8a728
fix
jywu-msft bd70e16
add qnn_ctx_gen tool
jywu-msft aee669d
add setup.py
jywu-msft a4ff9e3
fix
jywu-msft afe3621
fix
jywu-msft 7f1bfb6
fix
jywu-msft 452e26b
fix
jywu-msft 412207c
try 2.34
jywu-msft 42a5358
exclude qnn bins
jywu-msft b2ab191
skip qnn audit
jywu-msft 2281b6e
fix ordering
jywu-msft d67ea95
fix lib list
jywu-msft f270240
lint
jywu-msft cfacc7c
Merge branch 'main' of https://github.com/microsoft/onnxruntime into …
jywu-msft File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.