From deee48002cf63edc078c4a50ac6e9ac0b069ae85 Mon Sep 17 00:00:00 2001 From: Jian Chen Date: Tue, 5 Nov 2024 19:26:50 -0500 Subject: [PATCH] Enable CUDA Python Test (#22717) ### Description ### Motivation and Context --- .../onnx_backend_test_series_filters.jsonc | 5 +++ .../py-cuda-packaging-pipeline.yml | 1 + .../stages/py-gpu-packaging-stage.yml | 1 - .../stages/py-win-gpu-stage.yml | 32 ++++++++----------- 4 files changed, 19 insertions(+), 20 deletions(-) diff --git a/onnxruntime/test/testdata/onnx_backend_test_series_filters.jsonc b/onnxruntime/test/testdata/onnx_backend_test_series_filters.jsonc index 401e9f9f5c5b3..f083ab14ad133 100644 --- a/onnxruntime/test/testdata/onnx_backend_test_series_filters.jsonc +++ b/onnxruntime/test/testdata/onnx_backend_test_series_filters.jsonc @@ -306,6 +306,11 @@ "^test_qlinearmatmul_3D_int8_float32_cuda", "^test_qlinearmatmul_3D_uint8_float16_cuda", "^test_qlinearmatmul_3D_uint8_float32_cuda", + // Tests that failed on CUDA 12.2. + "^test_Conv3d_dilated_cuda", + "^test_Conv3d_dilated_strided_cuda", + "^test_Conv3d_stride_cuda", + "^test_Conv3d_stride_padding_cuda", // Size(21) from ONNX 1.16.0 is not implemented in cuda. "^test_size_cuda", "^test_size_example_cuda", diff --git a/tools/ci_build/github/azure-pipelines/py-cuda-packaging-pipeline.yml b/tools/ci_build/github/azure-pipelines/py-cuda-packaging-pipeline.yml index 898ff6b6c33d4..2e040698fad2a 100644 --- a/tools/ci_build/github/azure-pipelines/py-cuda-packaging-pipeline.yml +++ b/tools/ci_build/github/azure-pipelines/py-cuda-packaging-pipeline.yml @@ -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. diff --git a/tools/ci_build/github/azure-pipelines/stages/py-gpu-packaging-stage.yml b/tools/ci_build/github/azure-pipelines/stages/py-gpu-packaging-stage.yml index da4cd625b546b..a5684be0f0eac 100644 --- a/tools/ci_build/github/azure-pipelines/stages/py-gpu-packaging-stage.yml +++ b/tools/ci_build/github/azure-pipelines/stages/py-gpu-packaging-stage.yml @@ -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 }} \ No newline at end of file diff --git a/tools/ci_build/github/azure-pipelines/stages/py-win-gpu-stage.yml b/tools/ci_build/github/azure-pipelines/stages/py-win-gpu-stage.yml index 02ecb4585a0c0..aa7f2845fc0fa 100644 --- a/tools/ci_build/github/azure-pipelines/stages/py-win-gpu-stage.yml +++ b/tools/ci_build/github/azure-pipelines/stages/py-win-gpu-stage.yml @@ -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. @@ -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' @@ -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: