Skip to content

Commit 1d85eea

Browse files
committed
Cuda 13 nuget pipeline
1 parent 744e7fe commit 1d85eea

File tree

1 file changed

+203
-0
lines changed

1 file changed

+203
-0
lines changed
Lines changed: 203 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,203 @@
1+
parameters:
2+
- name: RunOnnxRuntimeTests
3+
displayName: Run Tests?
4+
type: boolean
5+
default: true
6+
7+
- name: UseIncreasedTimeoutForTests
8+
displayName: Increase timeout for tests? Set it to false if you are doing an Onnx Runtime release.
9+
type: boolean
10+
default: false
11+
12+
- name: IsReleaseBuild
13+
displayName: Is a release build? Set it to true if you are doing an ONNX Runtime release.
14+
type: boolean
15+
default: false
16+
17+
- name: PreReleaseVersionSuffixString
18+
displayName: Suffix added to pre-release package version. Only used if IsReleaseBuild is true. Denotes the type of pre-release package.
19+
type: string
20+
values:
21+
- alpha
22+
- beta
23+
- rc
24+
- none
25+
default: none
26+
27+
- name: PreReleaseVersionSuffixNumber
28+
displayName: Number added to pre-release package version. Only used if IsReleaseBuild is true. Denotes the sequence of a pre-release package.
29+
type: number
30+
default: 0
31+
32+
# these 2 parameters are used for debugging.
33+
- name: SpecificArtifact
34+
displayName: Use Specific Artifact (Debugging only)
35+
type: boolean
36+
default: false
37+
38+
- name: BuildId
39+
displayName: Pipeline BuildId, you could find it in the URL
40+
type: string
41+
default: '0'
42+
43+
- name: NugetPackageSuffix
44+
displayName: Suffix to append to nuget package
45+
type: string
46+
default: 'NONE'
47+
48+
- name: AdditionalBuildFlag
49+
displayName: Build flags to append to build command
50+
type: string
51+
default: '--use_azure'
52+
53+
# Do not update this to a version that does not exist for the qnn-runtime Maven package:
54+
# https://mvnrepository.com/artifact/com.qualcomm.qti/qnn-runtime
55+
- name: QnnSdk
56+
displayName: QNN SDK Version
57+
type: string
58+
default: 2.42.0.251225
59+
60+
- name: CudaVersion
61+
displayName: CUDA version
62+
type: string
63+
default: '13.0'
64+
values:
65+
- 12.8
66+
- 13.0
67+
68+
resources:
69+
repositories:
70+
- repository: onnxruntime-inference-examples # The name used to reference this repository in the checkout step
71+
type: github
72+
endpoint: ort-examples
73+
name: microsoft/onnxruntime-inference-examples
74+
- repository: 1esPipelines
75+
type: git
76+
name: 1ESPipelineTemplates/1ESPipelineTemplates
77+
ref: refs/tags/release
78+
79+
variables:
80+
- template: templates/common-variables.yml
81+
- name: win_trt_home
82+
${{ if eq(parameters.CudaVersion, '12.8') }}:
83+
value: $(Agent.TempDirectory)\${{ variables.win_trt_folder_cuda12 }}
84+
${{ if eq(parameters.CudaVersion, '13.0') }}:
85+
value: $(Agent.TempDirectory)\${{ variables.win_trt_folder_cuda13 }}
86+
- name: win_cuda_home
87+
${{ if eq(parameters.CudaVersion, '12.8') }}:
88+
value: $(Agent.TempDirectory)\v12.8
89+
${{ if eq(parameters.CudaVersion, '13.0') }}:
90+
value: $(Agent.TempDirectory)\v13.0
91+
- name: win_cudnn_home
92+
${{ if eq(parameters.CudaVersion, '12.8') }}:
93+
value: ''
94+
${{ if eq(parameters.CudaVersion, '13.0') }}:
95+
value: $(Agent.TempDirectory)\9.14.0.64_cuda13
96+
- name: CudaArchs
97+
${{ if eq(parameters.CudaVersion, '12.8') }}:
98+
value: '75-real;86-real;89-real;90-virtual'
99+
${{ if eq(parameters.CudaVersion, '13.0') }}:
100+
value: '75-real;80-real;86-real;89-real;90-real;100-real;120-real;120-virtual'
101+
102+
extends:
103+
# The pipeline extends the 1ES PT which will inject different SDL and compliance tasks.
104+
# For non-production pipelines, use "Unofficial" as defined below.
105+
# For productions pipelines, use "Official".
106+
template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines
107+
parameters:
108+
featureFlags:
109+
binskimScanAllExtensions: true
110+
sdl:
111+
binskim:
112+
enabled: true
113+
scanOutputDirectoryOnly: true
114+
sourceAnalysisPool:
115+
name: onnxruntime-Win-CPU-VS2022-Latest
116+
os: windows
117+
componentgovernance:
118+
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)'
119+
sourceRepositoriesToScan:
120+
exclude:
121+
- repository: onnxruntime-inference-examples
122+
spotBugs:
123+
enabled: false
124+
justificationForDisabling: "Getting ##[error]1. SpotBugs Error gdn.unknownFormatResult - File: spotbugs.xml, which indicates that SpotBugs found one or more errors, which are not handled by the Guardian right now."
125+
codeql:
126+
compiled:
127+
enabled: false
128+
justificationForDisabling: 'CodeQL is taking nearly 6 hours resulting in timeouts in our production pipelines'
129+
tsa:
130+
enabled: true
131+
codeSignValidation:
132+
enabled: true
133+
break: true
134+
policheck:
135+
enabled: true
136+
exclusionsFile: '$(Build.SourcesDirectory)\tools\ci_build\policheck_exclusions.xml'
137+
138+
stages:
139+
- template: stages/set_packaging_variables_stage.yml
140+
parameters:
141+
IsReleaseBuild: ${{ parameters.IsReleaseBuild }}
142+
PreReleaseVersionSuffixString: ${{ parameters.PreReleaseVersionSuffixString }}
143+
PreReleaseVersionSuffixNumber: ${{ parameters.PreReleaseVersionSuffixNumber }}
144+
145+
# - template: templates/c-api-cpu.yml
146+
# parameters:
147+
# RunOnnxRuntimeTests: ${{ parameters.RunOnnxRuntimeTests }}
148+
# IsReleaseBuild: ${{ parameters.IsReleaseBuild }}
149+
# PreReleaseVersionSuffixString: ${{ parameters.PreReleaseVersionSuffixString }}
150+
# PreReleaseVersionSuffixNumber: ${{ parameters.PreReleaseVersionSuffixNumber }}
151+
# ${{ if eq(parameters.NugetPackageSuffix, 'NONE') }}:
152+
# OrtNugetPackageId: 'Microsoft.ML.OnnxRuntime'
153+
# ${{ else }}:
154+
# OrtNugetPackageId: 'Microsoft.ML.OnnxRuntime${{ parameters.NugetPackageSuffix }}'
155+
# AdditionalBuildFlags: ''
156+
# AdditionalWinBuildFlags: '--enable_onnx_tests ${{parameters.AdditionalBuildFlag}}'
157+
# BuildVariant: 'default'
158+
# QnnSDKVersion: ${{ parameters.QnnSdk }}
159+
# is1ES: true
160+
161+
# - template: stages/java-cuda-packaging-stage.yml
162+
163+
- template: stages/nuget-combine-cuda-stage.yml
164+
parameters:
165+
CudaVersion: ${{ parameters.CudaVersion }}
166+
RunOnnxRuntimeTests: ${{ parameters.RunOnnxRuntimeTests }}
167+
UseIncreasedTimeoutForTests: ${{ parameters.UseIncreasedTimeoutForTests }}
168+
win_trt_home: ${{ variables.win_trt_home }}
169+
win_cuda_home: ${{ variables.win_cuda_home }}
170+
DoEsrp: true
171+
IsReleaseBuild: ${{ parameters.IsReleaseBuild }}
172+
buildJava: true
173+
buildNodejs: true
174+
SpecificArtifact: ${{ parameters.SpecificArtifact }}
175+
BuildId: ${{ parameters.BuildId }}
176+
PreReleaseVersionSuffixString: ${{ parameters.PreReleaseVersionSuffixString }}
177+
PreReleaseVersionSuffixNumber: ${{ parameters.PreReleaseVersionSuffixNumber }}
178+
CudaArchs: ${{ variables.CudaArchs }}
179+
win_cudnn_home: ${{ variables.win_cudnn_home }}
180+
181+
# - template: stages/nodejs-win-packaging-stage.yml
182+
# parameters:
183+
# IsReleaseBuild: ${{ parameters.IsReleaseBuild }}
184+
# ArtifactName: 'drop-onnxruntime-nodejs-win-x64'
185+
# StageName: 'Windows_Nodejs_Packaging_x64'
186+
# BuildCommand: --skip_submodule_sync --build_shared_lib --enable_onnx_tests --enable_wcos --use_telemetry --use_dml --use_webgpu --build_nodejs --cmake_generator "Visual Studio 17 2022" --enable_generic_interface
187+
# BuildArch: 'x64'
188+
# EnvSetupScript: 'setup_env.bat'
189+
# sln_platform: 'x64'
190+
# DoEsrp: true
191+
# PublishWebGpuBuildTools: true
192+
193+
# - template: stages/nodejs-win-packaging-stage.yml
194+
# parameters:
195+
# IsReleaseBuild: ${{ parameters.IsReleaseBuild }}
196+
# ArtifactName: 'drop-onnxruntime-nodejs-win-arm64'
197+
# StageName: 'Windows_Nodejs_Packaging_arm64'
198+
# BuildCommand: --arm64 --skip_submodule_sync --build_shared_lib --enable_onnx_tests --enable_wcos --use_telemetry --use_dml --use_webgpu --build_nodejs --cmake_generator "Visual Studio 17 2022" --enable_generic_interface
199+
# BuildArch: 'x64'
200+
# EnvSetupScript: 'setup_env.bat'
201+
# sln_platform: 'arm64'
202+
# DoEsrp: true
203+
# DependsOnStageName: Windows_Nodejs_Packaging_x64

0 commit comments

Comments
 (0)