Skip to content
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

Update Python-Cuda-Publishing-Pipeline #23253

Merged
merged 11 commits into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,39 @@ stages:
python_wheel_suffix: '_gpu'
timeout: 480
docker_base_image: onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda11_x64_almalinux8_gcc11:20241120.3
trt_version: '10.7.0.23-1.cuda11.8'
cuda_version: '11.8'

- stage: Republish_Wheels
dependsOn:
jobs:
- job: Python_Publishing_GPU
pool: 'onnxruntime-Ubuntu2204-AMD-CPU'
steps:
- checkout: none
- download: build
displayName: 'Download Pipeline Artifact - onnxruntime_gpu'
artifact: 'onnxruntime_gpu'
patterns: '*.whl'
- download: build
displayName: 'Download Pipeline Artifact - Win GPU 3.10'
artifact: 'win_gpu_wheel_3.10'
patterns: '*.whl'
- download: build
displayName: 'Download Pipeline Artifact - Win GPU 3.11'
artifact: 'win_gpu_wheel_3.11'
patterns: '*.whl'
- download: build
displayName: 'Download Pipeline Artifact - Win GPU 3.12'
artifact: 'win_gpu_wheel_3.12'
patterns: '*.whl'
- download: build
displayName: 'Download Pipeline Artifact - Win GPU 3.13'
artifact: 'win_gpu_wheel_3.13'
patterns: '*.whl'

- script: find $(Pipeline.Workspace) -name \*win_amd64.whl -exec mv {} $(Pipeline.Workspace)/build/onnxruntime_gpu \;
displayName: 'Merge files together'

- publish: $(Pipeline.Workspace)/build/onnxruntime_gpu
artifact: whl
displayName: Republish artifacts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ extends:
template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines
parameters:
sdl:
componentgovernance:
ignoreDirectories: '$(Build.Repository.LocalPath)/cmake/external/emsdk/upstream/emscripten/tests,$(Build.Repository.LocalPath)/cmake/external/onnx/third_party/benchmark,$(Build.Repository.LocalPath)/cmake/external/onnx/third_party/pybind11,$(Build.Repository.LocalPath)/cmake/external/onnx/third_party/pybind11/tests,$(Build.Repository.LocalPath)/cmake/external/onnxruntime-extensions,$(Build.Repository.LocalPath)/js/react_native/e2e/node_modules,$(Build.Repository.LocalPath)/js/node_modules,$(Build.Repository.LocalPath)/onnxruntime-inference-examples,$(Build.SourcesDirectory)/cmake/external/emsdk/upstream/emscripten/tests,$(Build.SourcesDirectory)/cmake/external/onnx/third_party/benchmark,$(Build.SourcesDirectory)/cmake/external/onnx/third_party/pybind11,$(Build.SourcesDirectory)/cmake/external/onnx/third_party/pybind11/tests,$(Build.SourcesDirectory)/cmake/external/onnxruntime-extensions,$(Build.SourcesDirectory)/js/react_native/e2e/node_modules,$(Build.SourcesDirectory)/js/node_modules,$(Build.SourcesDirectory)/onnxruntime-inference-examples,$(Build.BinariesDirectory)'
alertWarningLevel: High
failOnAlert: false
verbosity: Normal
timeout: 3600
tsa:
enabled: true
codeSignValidation:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,37 @@ stages:
docker_base_image: onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda12_x64_ubi8_gcc12:20241120.3
cuda_version: '12.2'

- stage: Republish_Wheels
dependsOn:
jobs:
- job: Python_Publishing_GPU
pool: 'onnxruntime-Ubuntu2204-AMD-CPU'
steps:
- checkout: none
- download: build
displayName: 'Download Pipeline Artifact - onnxruntime_gpu'
artifact: 'onnxruntime_gpu'
patterns: '*.whl'
- download: build
displayName: 'Download Pipeline Artifact - Win GPU 3.10'
artifact: 'win_gpu_wheel_3.10'
patterns: '*.whl'
- download: build
displayName: 'Download Pipeline Artifact - Win GPU 3.11'
artifact: 'win_gpu_wheel_3.11'
patterns: '*.whl'
- download: build
displayName: 'Download Pipeline Artifact - Win GPU 3.12'
artifact: 'win_gpu_wheel_3.12'
patterns: '*.whl'
- download: build
displayName: 'Download Pipeline Artifact - Win GPU 3.13'
artifact: 'win_gpu_wheel_3.13'
patterns: '*.whl'

- script: find $(Pipeline.Workspace) -name \*win_amd64.whl -exec mv {} $(Pipeline.Workspace)/build/onnxruntime_gpu \;
displayName: 'Merge files together'

- publish: $(Pipeline.Workspace)/build/onnxruntime_gpu
artifact: whl
displayName: Republish artifacts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ extends:
template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines
parameters:
sdl:
componentgovernance:
ignoreDirectories: '$(Build.Repository.LocalPath)/cmake/external/emsdk/upstream/emscripten/tests,$(Build.Repository.LocalPath)/cmake/external/onnx/third_party/benchmark,$(Build.Repository.LocalPath)/cmake/external/onnx/third_party/pybind11,$(Build.Repository.LocalPath)/cmake/external/onnx/third_party/pybind11/tests,$(Build.Repository.LocalPath)/cmake/external/onnxruntime-extensions,$(Build.Repository.LocalPath)/js/react_native/e2e/node_modules,$(Build.Repository.LocalPath)/js/node_modules,$(Build.Repository.LocalPath)/onnxruntime-inference-examples,$(Build.SourcesDirectory)/cmake/external/emsdk/upstream/emscripten/tests,$(Build.SourcesDirectory)/cmake/external/onnx/third_party/benchmark,$(Build.SourcesDirectory)/cmake/external/onnx/third_party/pybind11,$(Build.SourcesDirectory)/cmake/external/onnx/third_party/pybind11/tests,$(Build.SourcesDirectory)/cmake/external/onnxruntime-extensions,$(Build.SourcesDirectory)/js/react_native/e2e/node_modules,$(Build.SourcesDirectory)/js/node_modules,$(Build.SourcesDirectory)/onnxruntime-inference-examples,$(Build.BinariesDirectory)'
alertWarningLevel: High
failOnAlert: false
verbosity: Normal
timeout: 3600
tsa:
enabled: true
codeSignValidation:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
resources:
pipelines:
- pipeline: build
source: 'Python-CUDA-Packaging-Pipeline'
source: 'Python CUDA12 Package Test Pipeline'
trigger:
branches:
include:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,21 @@ stages:
steps:
- checkout: none
- download: build
displayName: 'Download Pipeline Artifact - onnxruntime_gpu'
artifact: 'onnxruntime_gpu'
displayName: 'Download Pipeline Artifact'
artifact: 'whl'

- task: UsePythonVersion@0
inputs:
versionSpec: '3.13'
displayName: 'Use Python 3.x'
- script: 'pip install twine==3.4.2'
- script: 'pip install twine==6.0.1'
displayName: 'Install Twine'
- task: TwineAuthenticate@1
displayName: 'Twine Authenticate '
inputs:
artifactFeed: PublicPackages/${{ parameters.artifact_feed }}
- script: 'python -m twine upload -r ${{ parameters.artifact_feed }} --config-file $(PYPIRC_PATH) --non-interactive --skip-existing *.whl'
workingDirectory: '$(Pipeline.Workspace)/build/onnxruntime_gpu'

- script: 'python -m twine upload -r ${{ parameters.artifact_feed }} --config-file $(PYPIRC_PATH) --non-interactive *.whl'
workingDirectory: '$(Pipeline.Workspace)/build/whl'
displayName: 'Uploading wheels to ${{ parameters.artifact_feed }}'
retryCountOnTaskFailure: 3
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)

Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,6 @@ stages:
name: ${{ parameters.machine_pool }}
os: linux
templateContext:
codeSignValidation:
enabled: true
break: true
psscriptanalyzer:
enabled: true
sdl:
binskim:
enabled: true
scanOutputDirectoryOnly: true
targetPathPattern: '\".*.so\"'
outputs:
- output: pipelineArtifact
targetPath: $(Build.ArtifactStagingDirectory)/dist
Expand All @@ -57,9 +47,6 @@ stages:
targetPath: $(Build.ArtifactStagingDirectory)/${{ parameters.cmake_build_type }}
artifactName: linux_gpu_wheel_${{ parameters.arch }}
variables:
# The build machine pool doesn't have dotnet, so it can't run CG.
- name: skipComponentGovernanceDetection
value: true
- name: extra_build_args
${{ if ne(parameters.extra_build_arg, '') }}:
value: -x ${{ parameters.extra_build_arg }}
Expand Down
24 changes: 12 additions & 12 deletions tools/ci_build/github/azure-pipelines/stages/py-win-gpu-stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,19 @@ stages:
name: onnxruntime-Win-CPU-2022
os: windows
templateContext:
codeSignValidation:
enabled: true
break: true
psscriptanalyzer:
enabled: true
sdl:
codeSignValidation:
enabled: true
# TODO: check why pyd file was not signed
break: false
additionalTargetsGlobPattern: f|**\*.pyd
psscriptanalyzer:
enabled: true
binskim:
preReleaseVersion: '4.3.1'
enabled: true
scanOutputDirectoryOnly: true
targetPathPattern: '+:file|*.dll;-:file|DirectML.dll'
analyzeTargetGlob: '+:file|$(BUILD.STAGINGDIRECTORY)\**\*.pyd;+:file|$(BUILD.STAGINGDIRECTORY)\**\*.dll;-:file|DirectML.dll'
outputs:
- output: pipelineArtifact
targetPath: $(Build.ArtifactStagingDirectory)
Expand All @@ -86,7 +89,7 @@ stages:

- checkout: self
clean: true
submodules: recursive
submodules: none

- template: ../templates/telemetry-steps.yml

Expand Down Expand Up @@ -121,7 +124,7 @@ stages:
- template: ../templates/set-nightly-build-option-variable-step.yml

- task: PythonScript@0
displayName: 'Generate cmake config'
displayName: 'Build'
inputs:
scriptPath: '$(Build.SourcesDirectory)\tools\ci_build\build.py'
arguments: >
Expand All @@ -131,7 +134,7 @@ stages:
--cmake_generator "$(VSGenerator)"
--enable_pybind
--enable_onnx_tests
--parallel --use_binskim_compliant_compile_flags --update --build
--parallel 8 --use_binskim_compliant_compile_flags --update --build --msvc_toolset 14.40
$(TelemetryOption) ${{ parameters.BUILD_PY_PARAMETERS }} ${{ parameters.EP_BUILD_FLAGS }} ${{ variables.trt_build_flag }}
workingDirectory: '$(Build.BinariesDirectory)'

Expand Down Expand Up @@ -162,9 +165,6 @@ stages:
workingDirectory: '$(Build.ArtifactStagingDirectory)'
displayName: 'unzip the package'
- template: ../templates/component-governance-component-detection-steps.yml
parameters:
condition: 'succeeded'
- stage: Win_py_${{ parameters.EP_NAME }}_Wheels_${{ replace(parameters.PYTHON_VERSION,'.','_') }}_Tests
dependsOn: Win_py_${{ parameters.EP_NAME }}_Wheels_${{ replace(parameters.PYTHON_VERSION,'.','_') }}_Build
Expand Down
7 changes: 0 additions & 7 deletions tools/ci_build/github/windows/eager/requirements.txt

This file was deleted.

Loading