Skip to content

Commit 1633299

Browse files
authored
[CUDA] Add nightly gpu package and publish pipelines for CUDA 13 (#26420)
Add nightly gpu pipelines for CUDA 13.
1 parent e8b054c commit 1633299

File tree

9 files changed

+163
-41
lines changed

9 files changed

+163
-41
lines changed

cmake/onnxruntime_providers_cuda.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@
222222

223223
if(MSVC)
224224
target_compile_options(${target} PRIVATE "$<$<COMPILE_LANGUAGE:CUDA>:SHELL:-Xcompiler /Zc:__cplusplus>")
225+
target_compile_options(${target} PRIVATE "$<$<COMPILE_LANGUAGE:CUDA>:SHELL:-Xcompiler /bigobj>")
225226
endif()
226227

227228
onnxruntime_add_include_to_target(${target} onnxruntime_common onnxruntime_framework onnx onnx_proto ${PROTOBUF_LIB} flatbuffers::flatbuffers)
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
trigger: none
2+
# The `resources` specify the location and version of the 1ES PT.
3+
resources:
4+
repositories:
5+
- repository: 1esPipelines
6+
type: git
7+
name: 1ESPipelineTemplates/1ESPipelineTemplates
8+
ref: refs/tags/release
9+
parameters:
10+
- name: cmake_build_type
11+
type: string
12+
default: 'Release'
13+
values:
14+
- Debug
15+
- Release
16+
- RelWithDebInfo
17+
- MinSizeRel
18+
19+
extends:
20+
# The pipeline extends the 1ES PT which will inject different SDL and compliance tasks.
21+
# For non-production pipelines, use "Unofficial" as defined below.
22+
# For productions pipelines, use "Official".
23+
template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines
24+
parameters:
25+
sdl:
26+
componentgovernance:
27+
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)'
28+
alertWarningLevel: High
29+
failOnAlert: false
30+
verbosity: Normal
31+
timeout: 3600
32+
tsa:
33+
enabled: true
34+
codeSignValidation:
35+
enabled: true
36+
break: true
37+
policheck:
38+
enabled: true
39+
exclusionsFile: '$(Build.SourcesDirectory)\tools\ci_build\policheck_exclusions.xml'
40+
codeql:
41+
compiled:
42+
enabled: false
43+
justificationForDisabling: 'CodeQL is taking nearly 6 hours resulting in timeouts in our production pipelines'
44+
pool:
45+
name: 'onnxruntime-Win-CPU-VS2022-Latest' # Name of your hosted pool
46+
os: windows # OS of the image. This value cannot be a variable. Allowed values: windows, linux, macOS
47+
48+
stages:
49+
- template: stages/py-gpu-packaging-stage.yml
50+
parameters:
51+
cmake_build_type: ${{ parameters.cmake_build_type }}
52+
cuda_version: '13.0'
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
resources:
2+
pipelines:
3+
- pipeline: build
4+
source: 'Python CUDA Package Test Pipeline'
5+
trigger:
6+
branches:
7+
include:
8+
- main
9+
branch: main
10+
repositories:
11+
- repository: 1esPipelines
12+
type: git
13+
name: 1ESPipelineTemplates/1ESPipelineTemplates
14+
ref: refs/tags/release
15+
parameters:
16+
- name: isReleaseBuild
17+
type: boolean
18+
default: false
19+
20+
variables:
21+
- name: ArtifactFeed
22+
${{ if eq(parameters.isReleaseBuild, false) }}:
23+
value: ort-cuda-13-nightly
24+
${{ else }}:
25+
value: onnxruntime-cuda-13
26+
27+
extends:
28+
# The pipeline extends the 1ES PT which will inject different SDL and compliance tasks.
29+
# For non-production pipelines, use "Unofficial" as defined below.
30+
# For productions pipelines, use "Official".
31+
template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines
32+
parameters:
33+
sdl:
34+
sourceAnalysisPool:
35+
name: onnxruntime-Win-CPU-VS2022-Latest
36+
os: windows
37+
stages:
38+
- template: stages/py-cuda-publishing-stage.yml
39+
parameters:
40+
artifact_feed: $(ArtifactFeed)

tools/ci_build/github/azure-pipelines/stages/py-gpu-packaging-stage.yml

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ parameters:
2222
default: '12.8'
2323
values:
2424
- 12.8
25+
- 13.0
26+
27+
- name: cudnn_folder
28+
type: string
29+
default: '9.13.0.50_cuda13'
2530

2631
- name: PythonVersions
2732
type: object
@@ -32,14 +37,25 @@ parameters:
3237
- '3.13'
3338

3439
stages:
35-
- ${{ each python_version in parameters.PythonVersions }}:
36-
- template: py-win-gpu-stage.yml
37-
parameters:
38-
PYTHON_VERSION: ${{ python_version }}
39-
EP_NAME: gpu
40-
CudaVersion: ${{ parameters.cuda_version }}
41-
EP_BUILD_FLAGS: --enable_lto --use_cuda --cuda_home=$(Agent.TempDirectory)\v${{ parameters.cuda_version }} --cmake_extra_defines "CMAKE_CUDA_ARCHITECTURES=52-real;61-real;75-real;86-real;89-real;90-virtual"
42-
use_tensorrt: True
40+
- ${{ if eq(parameters.cuda_version, '12.8') }}:
41+
- ${{ each python_version in parameters.PythonVersions }}:
42+
- template: py-win-gpu-stage.yml
43+
parameters:
44+
PYTHON_VERSION: ${{ python_version }}
45+
EP_NAME: gpu
46+
CudaVersion: ${{ parameters.cuda_version }}
47+
EP_BUILD_FLAGS: --enable_lto --use_cuda --cuda_home=$(Agent.TempDirectory)\v${{ parameters.cuda_version }} --cmake_extra_defines "CMAKE_CUDA_ARCHITECTURES=52-real;61-real;75-real;86-real;89-real;90-virtual"
48+
use_tensorrt: True
49+
50+
- ${{ if eq(parameters.cuda_version, '13.0') }}:
51+
- ${{ each python_version in parameters.PythonVersions }}:
52+
- template: py-win-gpu-stage.yml
53+
parameters:
54+
PYTHON_VERSION: ${{ python_version }}
55+
EP_NAME: gpu
56+
CudaVersion: ${{ parameters.cuda_version }}
57+
EP_BUILD_FLAGS: --enable_lto --use_cuda --cuda_home=$(Agent.TempDirectory)\v${{ parameters.cuda_version }} --cudnn_home=$(Agent.TempDirectory)\${{ parameters.cudnn_folder }} --cmake_extra_defines "CMAKE_CUDA_ARCHITECTURES=75-real;86-real;89-real;90-virtual"
58+
use_tensorrt: True
4359

4460
- template: py-linux-gpu-stage.yml
4561
parameters:

tools/ci_build/github/azure-pipelines/stages/py-linux-gpu-stage.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ parameters:
1717
- Release
1818
- RelWithDebInfo
1919
- MinSizeRel
20+
2021
- name: docker_base_image
2122
type: string
2223

@@ -25,6 +26,7 @@ parameters:
2526
default: '12.8'
2627
values:
2728
- 12.8
29+
- 13.0
2830

2931
stages:
3032
- stage: Linux_py_GPU_Wheels_${{ parameters.arch }}

tools/ci_build/github/azure-pipelines/stages/py-win-gpu-stage.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,13 @@ parameters:
1818
Extra parameters to pass to build.py. Don't put newlines in here.
1919
type: string
2020
default: ''
21+
2122
- name: CudaVersion
2223
type: string
2324
default: '12.8'
2425
values:
2526
- 12.8
27+
- 13.0
2628

2729
- name: cmake_build_type
2830
type: string

tools/ci_build/github/azure-pipelines/templates/common-variables.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ variables:
44
# As for Debian installation, replace '-1.' by '-1+' when assigning trt version below
55
linux_trt_version_cuda13: ${{ variables.cuda13_trt_version }}-1.cuda13.0
66
linux_trt_version_cuda12: ${{ variables.cuda12_trt_version }}-1.cuda12.8
7-
win_trt_folder_cuda13: TensorRT-${{ variables.cuda13_trt_version }}.Windows10.win10.cuda-13.0
7+
win_trt_folder_cuda13: TensorRT-${{ variables.cuda13_trt_version }}.Windows.win10.cuda-13.0
88
win_trt_folder_cuda12: TensorRT-${{ variables.cuda12_trt_version }}.Windows10.x86_64.cuda-12.8

tools/ci_build/github/azure-pipelines/templates/jobs/download_win_gpu_library.yml

Lines changed: 40 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,9 @@ parameters:
1111
values:
1212
- 13.0
1313
- 12.8
14-
- name: TrtVersion
14+
- name: CudnnFolder
1515
type: string
16-
default: '10.9.0.34'
17-
values:
18-
- 10.9.0.34
19-
- 10.13.3.9
16+
default: '9.13.0.50_cuda13'
2017

2118
steps:
2219
- ${{ if eq(parameters.DownloadCUDA, true) }}:
@@ -41,49 +38,60 @@ steps:
4138
dir $(Agent.TempDirectory)
4239
displayName: 'Print PATH after download CUDA SDK'
4340

44-
- ${{ if eq(parameters.DownloadTRT, true) }}:
4541
- ${{ if eq(parameters.CudaVersion, '13.0') }}:
46-
- powershell: |
47-
Write-Host "##vso[task.setvariable variable=trtCudaVersion;]13.0"
48-
displayName: Set trtCudaVersion
49-
- ${{ if and(eq(parameters.CudaVersion, '12.8'), eq(parameters.TrtVersion, '10.13.3.9')) }}:
50-
- powershell: |
51-
Write-Host "##vso[task.setvariable variable=trtCudaVersion;]12.9"
52-
displayName: Set trtCudaVersion
53-
- ${{ if and(eq(parameters.CudaVersion, '12.8'), eq(parameters.TrtVersion, '10.9.0.34')) }}:
54-
- powershell: |
55-
Write-Host "##vso[task.setvariable variable=trtCudaVersion;]12.8"
56-
displayName: Set trtCudaVersion
42+
- task: AzureCLI@2
43+
displayName: 'Download CUDNN ${{ parameters.CudnnFolder }}'
44+
inputs:
45+
azureSubscription: AIInfraBuildOnnxRuntimeOSS
46+
scriptType: 'batch'
47+
scriptLocation: 'inlineScript'
48+
inlineScript: |
49+
set AZCOPY_AUTO_LOGIN_TYPE=AZCLI
50+
azcopy.exe cp --recursive https://lotusscus.blob.core.windows.net/models/cudnn_sdk/${{ parameters.CudnnFolder }} $(Agent.TempDirectory)
5751
58-
- ${{ if eq(parameters.TrtVersion, '10.9.0.34') }}:
5952
- powershell: |
60-
Write-Host "##vso[task.setvariable variable=trtPlatformString;]Windows10.x86_64"
61-
displayName: 'Set TRT platform string for 10.9.0.34'
53+
Write-Host "##vso[task.prependpath]$(Agent.TempDirectory)\${{ parameters.CudnnFolder }}\bin"
54+
displayName: 'Append CUDNN Directory to PATH'
6255
63-
- ${{ if eq(parameters.TrtVersion, '10.13.3.9') }}:
64-
- powershell: |
65-
Write-Host "##vso[task.setvariable variable=trtPlatformString;]Windows.win10"
66-
displayName: 'Set TRT platform string for 10.13.3.9'
56+
- task: CmdLine@2
57+
inputs:
58+
script: |
59+
echo %PATH%
60+
dir $(Agent.TempDirectory)
61+
displayName: 'Print PATH after download CUDNN SDK'
6762

63+
- ${{ if eq(parameters.DownloadTRT, true) }}:
6864
- powershell: |
69-
$trtDirName = "TensorRT-${{ parameters.TrtVersion }}.$(trtPlatformString).cuda-$(trtCudaVersion)"
70-
Write-Host "TensorRT Directory Name: $trtDirName"
71-
Write-Host "##vso[task.setvariable variable=trtDirName;]$trtDirName"
72-
displayName: 'Construct TensorRT Directory Name'
65+
# These values are copied from common-variables.yml
66+
$cuda12_trt_version = '10.9.0.34'
67+
$cuda13_trt_version = '10.13.3.9'
68+
69+
$trtFolder = ""
70+
if ("${{ parameters.CudaVersion }}" -eq "13.0") {
71+
$trtFolder = "TensorRT-$cuda13_trt_version.Windows.win10.cuda-13.0"
72+
}
73+
elseif ("${{ parameters.CudaVersion }}" -eq "12.8") {
74+
$trtFolder = "TensorRT-$cuda12_trt_version.Windows10.x86_64.cuda-12.8"
75+
}
76+
77+
Write-Host "Setting TrtFolderRuntime variable to: $trtFolder"
78+
# This makes the variable available to subsequent steps in this job
79+
Write-Host "##vso[task.setvariable variable=TrtFolderRuntime;]$trtFolder"
80+
displayName: 'Set TensorRT Folder Variable'
7381
7482
- task: AzureCLI@2
75-
displayName: 'Download $(trtDirName)'
83+
displayName: 'Download TensorRT Directory'
7684
inputs:
7785
azureSubscription: AIInfraBuildOnnxRuntimeOSS
7886
scriptType: 'batch'
7987
scriptLocation: 'inlineScript'
8088
inlineScript: |
8189
set AZCOPY_AUTO_LOGIN_TYPE=AZCLI
82-
azcopy.exe cp --recursive https://lotusscus.blob.core.windows.net/models/local/$(trtDirName) $(Agent.TempDirectory)
90+
azcopy.exe cp --recursive https://lotusscus.blob.core.windows.net/models/local/$(TrtFolderRuntime) $(Agent.TempDirectory)
8391
8492
- powershell: |
85-
Write-Host "##vso[task.prependpath]$(Agent.TempDirectory)\$(trtDirName)\lib"
86-
displayName: 'Append $(trtDirName) Directory to PATH'
93+
Write-Host "##vso[task.prependpath]$(Agent.TempDirectory)\$(TrtFolderRuntime)\lib"
94+
displayName: 'Append TensorRT Directory to PATH'
8795
8896
- task: CmdLine@2
8997
inputs:

tools/ci_build/github/azure-pipelines/templates/py-packaging-linux-test-cuda.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ parameters:
2121
default: '12.8'
2222
values:
2323
- 12.8
24+
- 13.0
2425

2526
# TODO: Ideally it should fetch information from the build that triggers it
2627
- name: cmake_build_type

0 commit comments

Comments
 (0)