@@ -60,16 +60,16 @@ jobs:
60
60
parameters :
61
61
arch : ' linux-x64'
62
62
buildConfig : ' Release'
63
- artifactName : ' onnxruntime-java-linux-gpu- x64'
63
+ artifactName : ' onnxruntime-java-linux-x64-cuda '
64
64
version : ' $(OnnxRuntimeVersion)'
65
65
libraryName : ' libonnxruntime.so'
66
66
nativeLibraryName : ' libonnxruntime4j_jni.so'
67
67
68
68
- template : templates/c-api-artifacts-package-and-publish-steps-posix.yml
69
69
parameters :
70
70
buildConfig : ' Release'
71
- artifactName : ' onnxruntime-linux-x64-gpu -$(OnnxRuntimeVersion)'
72
- artifactNameNoVersionString : ' onnxruntime-linux-x64-gpu '
71
+ artifactName : ' onnxruntime-linux-x64-cuda -$(OnnxRuntimeVersion)'
72
+ artifactNameNoVersionString : ' onnxruntime-linux-x64-cuda '
73
73
libraryName : ' libonnxruntime.so.$(OnnxRuntimeVersion)'
74
74
commitId : $(OnnxRuntimeGitCommitHash)
75
75
79
79
- template : templates/clean-agent-build-directory-step.yml
80
80
81
81
- template : linux-gpu-tensorrt-packaging-pipeline.yml
82
+ parameters :
83
+ artifactName : ' onnxruntime-linux-x64-tensorrt-$(OnnxRuntimeVersion)'
84
+ artifactNameNoVersionString : ' onnxruntime-linux-x64-tensorrt'
85
+ buildJava : true
86
+ buildJavaOption : ' --build_java'
82
87
83
88
- template : templates/win-ci.yml
84
89
parameters :
89
94
EnvSetupScript : setup_env_gpu.bat
90
95
buildArch : x64
91
96
msbuildPlatform : x64
92
- packageName : gpu- x64
97
+ packageName : x64-cuda
93
98
buildparameter : --use_cuda --cuda_version=11.1 --cuda_home="C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.1" --cudnn_home="C:\local\cudnn-11.4-windows-x64-v8.2.2.26\cuda" --enable_onnx_tests --enable_wcos --build_java --cmake_extra_defines "CMAKE_CUDA_ARCHITECTURES=37;52;60;61;70;75;80"
94
99
runTests : ${{ parameters.RunOnnxRuntimeTests }}
95
100
buildJava : true
@@ -104,7 +109,7 @@ jobs:
104
109
EnvSetupScript : setup_env_gpu.bat
105
110
buildArch : x64
106
111
msbuildPlatform : x64
107
- packageName : tensorrt- x64
112
+ packageName : x64-tensorrt
108
113
buildparameter : --use_tensorrt --tensorrt_home="C:\local\TensorRT-8.0.1.6.Windows10.x86_64.cuda-11.3.cudnn8.2" --cuda_version=11.1 --cuda_home="C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.1" --cudnn_home="C:\local\cudnn-11.4-windows-x64-v8.2.2.26\cuda" --enable_onnx_tests --enable_wcos --cmake_extra_defines "CMAKE_CUDA_ARCHITECTURES=37;52;60;61;70;75;80"
109
114
runTests : ${{ parameters.RunOnnxRuntimeTests }}
110
115
buildJava : false
@@ -130,16 +135,23 @@ jobs:
130
135
displayName : ' Download Pipeline Artifact - Win x64'
131
136
inputs :
132
137
buildType : ' current'
133
- artifactName : ' drop-onnxruntime-java-win-gpu- x64'
138
+ artifactName : ' drop-onnxruntime-java-win-x64-cuda '
134
139
targetPath : ' $(Build.BinariesDirectory)\java-artifact\onnxruntime-java-win-x64'
135
140
136
141
- task : DownloadPipelineArtifact@2
137
142
displayName : ' Download Pipeline Artifact - Linux x64'
138
143
inputs :
139
144
buildType : ' current'
140
- artifactName : ' drop-onnxruntime-java-linux-gpu- x64'
145
+ artifactName : ' drop-onnxruntime-java-linux-x64-cuda '
141
146
targetPath : ' $(Build.BinariesDirectory)\java-artifact\onnxruntime-java-linux-x64'
142
147
148
+ - task : DownloadPipelineArtifact@2
149
+ displayName : ' Download Pipeline Artifact - Linux x64'
150
+ inputs :
151
+ buildType : ' current'
152
+ artifactName : ' drop-onnxruntime-java-linux-x64-tensorrt'
153
+ targetPath : ' $(Build.BinariesDirectory)\java-artifact\onnxruntime-java-linux-x64-tensorrt'
154
+
143
155
- task : PowerShell@2
144
156
displayName : ' PowerShell Script'
145
157
inputs :
@@ -149,8 +161,6 @@ jobs:
149
161
showWarnings : true
150
162
workingDirectory : ' $(Build.BinariesDirectory)\java-artifact'
151
163
152
-
153
-
154
164
- task : CopyFiles@2
155
165
displayName : ' Copy Java Files to Artifact Staging Directory'
156
166
inputs :
@@ -252,7 +262,103 @@ jobs:
252
262
displayName : ' Clean Agent Directories'
253
263
condition : always()
254
264
265
+ - job : Linux_Packaging_combined_GPU
266
+ workspace :
267
+ clean : all
268
+ pool : ' Onnxruntime-Linux-GPU'
269
+ dependsOn :
270
+ - Linux_C_API_Packaging_GPU_x64
271
+ - Linux_C_API_Packaging_GPU_TensorRT_x64
272
+ condition : succeeded()
273
+ steps :
274
+ - checkout : self
275
+ submodules : false
276
+ - template : templates/set-version-number-variables-step.yml
277
+ - task : DownloadPipelineArtifact@2
278
+ displayName : ' Download Pipeline Artifact - Combined GPU'
279
+ inputs :
280
+ artifactName : ' onnxruntime-linux-x64-cuda'
281
+ targetPath : ' $(Build.BinariesDirectory)/tgz-artifacts'
282
+
283
+ - task : DownloadPipelineArtifact@2
284
+ displayName : ' Download Pipeline Artifact - Combined GPU'
285
+ inputs :
286
+ artifactName : ' onnxruntime-linux-x64-tensorrt'
287
+ targetPath : ' $(Build.BinariesDirectory)/tgz-artifacts'
288
+
289
+ - task : ShellScript@2
290
+ displayName : ' Shell Script'
291
+ inputs :
292
+ scriptPath : ' tools/ci_build/github/linux/extract_and_bundle_gpu_package.sh'
293
+ args : ' -a $(Build.BinariesDirectory)/tgz-artifacts'
294
+ workingDirectory : ' $(Build.BinariesDirectory)/tgz-artifacts'
295
+
296
+ - task : ArchiveFiles@2
297
+ inputs :
298
+ rootFolderOrFile : ' $(Build.BinariesDirectory)/tgz-artifacts/onnxruntime-linux-x64-gpu'
299
+ includeRootFolder : true
300
+ archiveType : ' tar' # Options: zip, 7z, tar, wim
301
+ tarCompression : ' gz'
302
+ archiveFile : ' $(Build.ArtifactStagingDirectory)/onnxruntime-linux-x64-gpu-$(OnnxRuntimeVersion).tgz'
303
+ replaceExistingArchive : true
304
+
305
+ - task : PublishPipelineArtifact@1
306
+ inputs :
307
+ targetPath : ' $(Build.ArtifactStagingDirectory)/onnxruntime-linux-x64-gpu-$(OnnxRuntimeVersion).tgz'
308
+ artifactName : ' onnxruntime-linux-x64-gpu'
309
+
310
+ - job : Windows_Packaging_combined_GPU
311
+ workspace :
312
+ clean : all
313
+ pool : ' Win-CPU-2021'
314
+ dependsOn :
315
+ - Windows_Packaging_gpu
316
+ - Windows_Packaging_tensorrt
317
+ condition : succeeded()
318
+ steps :
319
+ - checkout : self
320
+ submodules : false
321
+ - task : DownloadPipelineArtifact@2
322
+ displayName : ' Download Pipeline Artifact - Combined GPU'
323
+ inputs :
324
+ artifactName : ' onnxruntime-win-x64-cuda'
325
+ targetPath : ' $(Build.BinariesDirectory)/zip-artifacts'
326
+
327
+ - task : DownloadPipelineArtifact@2
328
+ displayName : ' Download Pipeline Artifact - Combined GPU'
329
+ inputs :
330
+ artifactName : ' onnxruntime-win-x64-tensorrt'
331
+ targetPath : ' $(Build.BinariesDirectory)/zip-artifacts'
255
332
333
+ - task : PowerShell@2
334
+ displayName : ' PowerShell Script'
335
+ inputs :
336
+ targetType : filePath
337
+ filePath : $(Build.SourcesDirectory)\tools\ci_build\github\windows\extract_zip_files_gpu.ps1
338
+
339
+ - script : |
340
+ dir
341
+ workingDirectory: '$(Build.BinariesDirectory)/zip-artifacts'
342
+ displayName: 'List artifacts'
343
+
344
+ - task : BatchScript@1
345
+ displayName : ' Bundle CUDA/TRT EP binaries'
346
+ inputs :
347
+ filename : $(Build.SourcesDirectory)\tools\ci_build\github\windows\bundle_dlls_gpu.bat
348
+ workingFolder : $(Build.BinariesDirectory)\zip-artifacts
349
+
350
+ - task : CopyFiles@2
351
+ displayName : ' Copy zip file to: $(Build.ArtifactStagingDirectory)'
352
+ inputs :
353
+ SourceFolder : ' $(Build.BinariesDirectory)\zip-artifacts'
354
+ Contents : ' onnxruntime-win-x64-gpu-*.zip'
355
+ TargetFolder : ' $(Build.ArtifactStagingDirectory)'
356
+
357
+ - task : PublishPipelineArtifact@0
358
+ displayName : ' Publish Pipeline Combined GPU Package Artifact'
359
+ inputs :
360
+ artifactName : ' onnxruntime-win-x64-gpu'
361
+ targetPath : ' $(Build.ArtifactStagingDirectory)'
256
362
257
363
- job : NuGet_Packaging_GPU
258
364
workspace :
@@ -272,25 +378,25 @@ jobs:
272
378
- task : DownloadPipelineArtifact@2
273
379
displayName : ' Download Pipeline Artifact - NuGet'
274
380
inputs :
275
- artifactName : ' onnxruntime-win-gpu- x64'
381
+ artifactName : ' onnxruntime-win-x64-cuda '
276
382
targetPath : ' $(Build.BinariesDirectory)/nuget-artifact'
277
383
278
384
- task : DownloadPipelineArtifact@2
279
385
displayName : ' Download Pipeline Artifact - NuGet'
280
386
inputs :
281
- artifactName : ' onnxruntime-win-tensorrt- x64'
387
+ artifactName : ' onnxruntime-win-x64-tensorrt '
282
388
targetPath : ' $(Build.BinariesDirectory)/nuget-artifact'
283
389
284
390
- task : DownloadPipelineArtifact@2
285
391
displayName : ' Download Pipeline Artifact - NuGet'
286
392
inputs :
287
- artifactName : ' onnxruntime-linux-x64-gpu '
393
+ artifactName : ' onnxruntime-linux-x64-cuda '
288
394
targetPath : ' $(Build.BinariesDirectory)/nuget-artifact'
289
395
290
396
- task : DownloadPipelineArtifact@2
291
397
displayName : ' Download Pipeline Artifact - NuGet'
292
398
inputs :
293
- artifactName : ' onnxruntime-linux-x64-gpu- tensorrt'
399
+ artifactName : ' onnxruntime-linux-x64-tensorrt'
294
400
targetPath : ' $(Build.BinariesDirectory)/nuget-artifact'
295
401
296
402
- task : DownloadPipelineArtifact@2
@@ -357,7 +463,7 @@ jobs:
357
463
- task : BatchScript@1
358
464
displayName : ' Bundle Native NuGet and other binaries'
359
465
inputs :
360
- filename : $(Build.SourcesDirectory)\tools\ci_build\github\windows\bundle_dlls_gpu .bat
466
+ filename : $(Build.SourcesDirectory)\tools\ci_build\github\windows\bundle_dlls_gpu_nuget .bat
361
467
workingFolder : $(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo\nuget-artifacts
362
468
363
469
- task : CopyFiles@2
0 commit comments