Skip to content

Commit

Permalink
Enable CUDA Python Test (microsoft#22717)
Browse files Browse the repository at this point in the history
### Description
<!-- Describe your changes. -->



### 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. -->
  • Loading branch information
jchen351 authored and ankitm3k committed Dec 11, 2024
1 parent 601a6f9 commit 0714259
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ parameters:
- RelWithDebInfo
- MinSizeRel


extends:
# The pipeline extends the 1ES PT which will inject different SDL and compliance tasks.
# For non-production pipelines, use "Unofficial" as defined below.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,5 @@ stages:
MACHINE_POOL: 'onnxruntime-Win2022-GPU-dml-A10'
PYTHON_VERSION: ${{ python_version }}
EP_BUILD_FLAGS: --use_dml --cmake_extra_defines CMAKE_SYSTEM_VERSION=10.0.18362.0 --enable_wcos
ENV_SETUP_SCRIPT: setup_env.bat
EP_NAME: directml
cmake_build_type: ${{ parameters.cmake_build_type }}
32 changes: 13 additions & 19 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 @@ -12,10 +12,6 @@ parameters:
- name: EP_BUILD_FLAGS
type: string

- name: ENV_SETUP_SCRIPT
type: string
default: ''

- name: BUILD_PY_PARAMETERS
displayName: >
Extra parameters to pass to build.py. Don't put newlines in here.
Expand Down Expand Up @@ -111,21 +107,12 @@ stages:

- template: ../templates/download-deps.yml

- ${{ if ne(parameters.ENV_SETUP_SCRIPT, '') }}:
- template: ../templates/jobs/set-winenv.yml
parameters:
EnvSetupScript: ${{ parameters.ENV_SETUP_SCRIPT }}
${{ if or(contains(parameters.EP_BUILD_FLAGS, 'use_cuda'), eq(parameters.use_tensorrt, true)) }}:
DownloadCUDA: true
DownloadTRT: ${{ parameters.use_tensorrt }}

- ${{ if eq(parameters.ENV_SETUP_SCRIPT, '') }}:
- template: ../templates/jobs/download_win_gpu_library.yml
parameters:
CudaVersion: ${{ parameters.CudaVersion }}
${{ if or(contains(parameters.EP_BUILD_FLAGS, 'use_cuda'), eq(parameters.use_tensorrt, true)) }}:
DownloadCUDA: true
DownloadTRT: ${{ parameters.use_tensorrt }}
- template: ../templates/jobs/download_win_gpu_library.yml
parameters:
CudaVersion: ${{ parameters.CudaVersion }}
${{ if or(contains(parameters.EP_BUILD_FLAGS, 'use_cuda'), eq(parameters.use_tensorrt, true)) }}:
DownloadCUDA: true
DownloadTRT: ${{ parameters.use_tensorrt }}

- task: PythonScript@0
displayName: 'Update deps.txt'
Expand Down Expand Up @@ -211,6 +198,13 @@ stages:
StepName: 'Download Pipeline Artifact - Windows GPU Build'
TargetPath: '$(Build.ArtifactStagingDirectory)'

- template: ../templates/jobs/download_win_gpu_library.yml
parameters:
CudaVersion: ${{ parameters.CudaVersion }}
${{ if or(contains(parameters.EP_BUILD_FLAGS, 'use_cuda'), eq(parameters.use_tensorrt, true)) }}:
DownloadCUDA: true
DownloadTRT: ${{ parameters.use_tensorrt }}

- task: PowerShell@2
displayName: 'Install ONNX'
inputs:
Expand Down

0 comments on commit 0714259

Please sign in to comment.