Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TensorRT EP] Refactor TRT version update logic & apply TRT 10.5 #22483

Merged
merged 53 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
0d33602
test
yf711 Oct 11, 2024
12bb26e
change
yf711 Oct 11, 2024
6732c00
update linux trt ci
yf711 Oct 14, 2024
8f9f8fd
update win trt ci
yf711 Oct 14, 2024
f80d9f7
simplify py-linux-gpu
yf711 Oct 14, 2024
f24af9c
fix
yf711 Oct 14, 2024
211a98a
fix
yf711 Oct 14, 2024
d161f82
test
yf711 Oct 14, 2024
d36e436
fix
yf711 Oct 14, 2024
0230216
test
yf711 Oct 14, 2024
32f41fd
test set-winenv
yf711 Oct 14, 2024
3fc325e
test set-winenv
yf711 Oct 14, 2024
efb057f
update c-api-pkg & cuda-pkg
yf711 Oct 14, 2024
382cdae
cuda12 as common version
yf711 Oct 14, 2024
57d3604
post merge: set cuda12 as default
yf711 Oct 14, 2024
658d893
test trt10.5
yf711 Oct 15, 2024
1765761
test trt10.5 on ep_perf
yf711 Oct 15, 2024
ec627ea
revert ep_perf cuda
yf711 Oct 15, 2024
8193f81
test nuget-linux-cuda-packaging-stage for nuget cuda11/12 pkg ci
yf711 Oct 15, 2024
20079c8
update nuget/templates/test_linux.yml for nuget cuda11/12 pkg ci
yf711 Oct 15, 2024
8e1903f
fix
yf711 Oct 15, 2024
20d44f9
Py-cuda11-test CI: introducing variables to py-package-test-pipeline.yml
yf711 Oct 15, 2024
02a53d5
revert trt version
yf711 Oct 15, 2024
2b32be7
Py-Cuda11/12 Test CIs: remove trt_version usage from parameters
yf711 Oct 15, 2024
f152222
py-linux-cuda-package-test-job
yf711 Oct 16, 2024
18003c6
test updating py-win-gpu template
yf711 Oct 16, 2024
e47cf6a
simplify py-cuda-packaging-stage
yf711 Oct 16, 2024
d8737d4
adjust py-cuda-packaging-stage
yf711 Oct 16, 2024
f493f8c
Free trt_build_flag out of EP_BUILD_FLAG;
yf711 Oct 16, 2024
1c7dca3
fix
yf711 Oct 16, 2024
00275e9
explicitly assign CudaVersion for py-cuda11 pkg stages
yf711 Oct 16, 2024
1d0c40a
clean unused param of download_win_gpu_library,
yf711 Oct 17, 2024
20c40a9
pass win_trt_folder path via parameters
yf711 Oct 17, 2024
e9a393e
Revert "pass win_trt_folder path via parameters"
yf711 Oct 17, 2024
fb38fdc
Revert "clean unused param of download_win_gpu_library,"
yf711 Oct 17, 2024
6ae457a
update py-packaging-selectable-stage (not being used)
yf711 Oct 17, 2024
71e060f
apply trt10.5
yf711 Oct 17, 2024
2db4db3
fix ep_perf with 10.5
yf711 Oct 17, 2024
3622188
Merge branch 'main' into yifanl/trt_ver_update_1
yf711 Oct 17, 2024
498853f
fix merge conflicts
yf711 Oct 17, 2024
bb0d023
Fix debian version format
yf711 Oct 18, 2024
67786cc
fix cuda version usage
yf711 Oct 18, 2024
18997cb
Merge branch 'main' into yifanl/trt_ver_update_1
yf711 Oct 18, 2024
8391b24
remove redundant var
yf711 Oct 18, 2024
ee89a6b
Merge branch 'main' into yifanl/trt_ver_update_1
yf711 Oct 19, 2024
ada4992
unlease nested control flow op pytest
yf711 Oct 17, 2024
5b60207
Merge branch 'main' into yifanl/trt_ver_update_1
yf711 Oct 22, 2024
f796a62
Merge branch 'main' into yifanl/trt_ver_update_1
yf711 Oct 24, 2024
903a2a8
Merge branch 'main' into yifanl/trt_ver_update_1
yf711 Oct 24, 2024
fba452c
Merge branch 'main' into yifanl/trt_ver_update_1
yf711 Oct 25, 2024
755b9cd
fix merge
yf711 Oct 25, 2024
138245a
Merge branch 'main' into yifanl/trt_ver_update_1
yf711 Oct 26, 2024
02cccc8
Merge branch 'main' into yifanl/trt_ver_update_1
yf711 Oct 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions onnxruntime/python/tools/tensorrt/perf/build/build_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
TRT_DOCKER_FILES = {
"8.6.cuda_11_8_cudnn_8": "tools/ci_build/github/linux/docker/Dockerfile.ubuntu_cuda11_8_tensorrt8_6",
"8.6.cuda_12_3_cudnn_9": "tools/ci_build/github/linux/docker/Dockerfile.ubuntu_cuda12_3_tensorrt8_6",
"10.4.cuda_11_8_cudnn_8": "tools/ci_build/github/linux/docker/Dockerfile.ubuntu_cuda11_tensorrt10",
"10.4.cuda_12_5_cudnn_9": "tools/ci_build/github/linux/docker/Dockerfile.ubuntu_cuda12_tensorrt10",
"10.5.cuda_11_8_cudnn_8": "tools/ci_build/github/linux/docker/Dockerfile.ubuntu_cuda11_tensorrt10",
"10.5.cuda_12_5_cudnn_9": "tools/ci_build/github/linux/docker/Dockerfile.ubuntu_cuda12_tensorrt10",
"BIN": "tools/ci_build/github/linux/docker/Dockerfile.ubuntu_tensorrt_bin",
}

Expand Down
8 changes: 4 additions & 4 deletions tools/ci_build/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -2120,10 +2120,10 @@ def run_onnxruntime_tests(args, source_dir, ctest_path, build_dir, configs):
if not args.disable_ml_ops and not args.use_tensorrt:
run_subprocess([sys.executable, "onnxruntime_test_python_mlops.py"], cwd=cwd, dll_path=dll_path)

# if args.use_tensorrt:
# run_subprocess(
# [sys.executable, "onnxruntime_test_python_nested_control_flow_op.py"], cwd=cwd, dll_path=dll_path
# )
if args.use_tensorrt:
run_subprocess(
[sys.executable, "onnxruntime_test_python_nested_control_flow_op.py"], cwd=cwd, dll_path=dll_path
)

try:
import onnx # noqa: F401
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ parameters:
default: 0

variables:
- template: templates/common-variables.yml
- name: docker_base_image
value: onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda11_x64_almalinux8_gcc11:20241020.1
- name: linux_trt_version
Expand Down Expand Up @@ -123,7 +122,7 @@ stages:
--build_shared_lib \
--parallel \
--build_wheel \
--enable_onnx_tests --use_cuda --cuda_version=${{variables.common_cuda_version}} --cuda_home=/usr/local/cuda-${{variables.common_cuda_version}} --cudnn_home=/usr/local/cuda-${{variables.common_cuda_version}} \
--enable_onnx_tests --use_cuda --cuda_version=11.8 --cuda_home=/usr/local/cuda-11.8 --cudnn_home=/usr/local/cuda-11.8 \
--enable_cuda_profiling --enable_cuda_nhwc_ops \
--enable_pybind --build_java \
--use_cache \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,14 @@ resources:
ref: 5eda9aded5462201e6310105728d33016e637ea7

variables:
- template: templates/common-variables.yml
- name: ReleaseVersionSuffix
value: ''
- name: win_trt_version
value: 11.8

- name: win_trt_home
value: $(Agent.TempDirectory)\TensorRT-10.4.0.26.Windows10.x86_64.cuda-11.8
value: $(Agent.TempDirectory)\${{ variables.win_trt_folder_cuda11 }}
- name: win_cuda_home
value: $(Agent.TempDirectory)\v11.8

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,14 @@ parameters:
- 12.2

variables:
- template: templates/common-variables.yml
- name: ReleaseVersionSuffix
value: ''
- name: win_trt_home
${{ if eq(parameters.CudaVersion, '11.8') }}:
value: $(Agent.TempDirectory)\TensorRT-10.4.0.26.Windows10.x86_64.cuda-11.8
value: $(Agent.TempDirectory)\${{ variables.win_trt_folder_cuda11 }}
${{ if eq(parameters.CudaVersion, '12.2') }}:
value: $(Agent.TempDirectory)\TensorRT-10.4.0.26.Windows10.x86_64.cuda-12.6
value: $(Agent.TempDirectory)\${{ variables.win_trt_folder_cuda12 }}
- name: win_cuda_home
${{ if eq(parameters.CudaVersion, '11.8') }}:
value: $(Agent.TempDirectory)\v11.8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,17 @@ parameters:
- 12.2

variables:
- template: templates/common-variables.yml
- name: docker_base_image
${{ if eq(parameters.CudaVersion, '11.8') }}:
value: onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda11_x64_almalinux8_gcc11:20241020.1
${{ if eq(parameters.CudaVersion, '12.2') }}:
value: onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda12_x64_ubi8_gcc12:20241020.1
- name: linux_trt_version
${{ if eq(parameters.CudaVersion, '11.8') }}:
value: 10.4.0.26-1.cuda11.8
value: ${{ variables.linux_trt_version_cuda11 }}
${{ if eq(parameters.CudaVersion, '12.2') }}:
value: 10.4.0.26-1.cuda12.6
value: ${{ variables.linux_trt_version_cuda12 }}

jobs:
- job: Linux_Build
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ parameters:
- name: TrtVersion
displayName: TensorRT Version
type: string
default: 10.4.cuda_12_5_cudnn_9
default: 10.5.cuda_12_5_cudnn_9
values:
- 8.6.cuda_11_8_cudnn_8
- 8.6.cuda_12_3_cudnn_9
- 10.4.cuda_11_8_cudnn_8
- 10.4.cuda_12_5_cudnn_9
- 10.5.cuda_11_8_cudnn_8
- 10.5.cuda_12_5_cudnn_9
- BIN

- name: UseTensorrtOssParser
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ stages:
pool: ${{ parameters.AgentPool }}

variables:
- template: ../../templates/common-variables.yml
- name: OnnxRuntimeBuildDirectory
value: '$(Build.BinariesDirectory)'

Expand Down Expand Up @@ -52,7 +53,7 @@ stages:
inputs:
script: |
ln -sf /data/models $(Build.BinariesDirectory)

# As for Debian installation, replace '-1.' by '-1+' when assigning trt version below
- ${{if contains(parameters.StageSuffix , 'GPU') }}:
- template: ../../templates/get-docker-image-steps.yml
parameters:
Expand All @@ -61,7 +62,7 @@ stages:
${{ if eq(parameters.CudaVersion, '12.2') }}:
DockerBuildArgs: "
--build-arg BASEIMAGE=nvidia/cuda:12.2.2-devel-ubuntu20.04
--build-arg TRT_VERSION=10.4.0.26-1+cuda12.6
--build-arg TRT_VERSION=${{ replace(variables.linux_trt_version_cuda12, '-1.', '-1+') }}
--build-arg BUILD_UID=$( id -u )
"
${{ else }}:
Expand Down
21 changes: 19 additions & 2 deletions tools/ci_build/github/azure-pipelines/post-merge-jobs.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
parameters:
- name: CudaVersion
displayName: CUDA version
type: string
default: '12.2'
values:
- 11.8
- 12.2

variables:
- template: templates/common-variables.yml
- name: win_trt_folder
${{ if eq(parameters.CudaVersion, '11.8') }}:
value: ${{ variables.win_trt_folder_cuda11 }}
${{ if eq(parameters.CudaVersion, '12.2') }}:
value: ${{ variables.win_trt_folder_cuda12 }}

stages:
- ${{ if or(startsWith(variables['System.CollectionUri'], 'https://dev.azure.com/aiinfra/'),startsWith(variables['System.CollectionUri'], 'https://aiinfra.visualstudio.com/')) }}:
- template: templates/web-ci.yml
Expand Down Expand Up @@ -206,7 +223,7 @@ stages:
BuildConfig: 'RelWithDebInfo'
EnvSetupScript: setup_env_cuda.bat
buildArch: x64
additionalBuildFlags: --enable_pybind --build_java --build_nodejs --use_cuda --cuda_home="$(Agent.TempDirectory)\v11.8" --enable_cuda_profiling --cmake_extra_defines CMAKE_CUDA_ARCHITECTURES=86
additionalBuildFlags: --enable_pybind --build_java --build_nodejs --use_cuda --cuda_home="$(Agent.TempDirectory)\v${{ parameters.CudaVersion }}" --enable_cuda_profiling --cmake_extra_defines CMAKE_CUDA_ARCHITECTURES=86
msbuildPlatform: x64
isX86: false
job_name_suffix: x64_RelWithDebInfo
Expand All @@ -226,7 +243,7 @@ stages:
BuildConfig: 'RelWithDebInfo'
EnvSetupScript: setup_env_trt.bat
buildArch: x64
additionalBuildFlags: --enable_pybind --build_java --build_nodejs --use_cuda --cuda_home="$(Agent.TempDirectory)\v11.8" --enable_cuda_profiling --use_tensorrt --tensorrt_home="$(Agent.TempDirectory)\TensorRT-10.4.0.26.Windows10.x86_64.cuda-11.8" --cmake_extra_defines CMAKE_CUDA_ARCHITECTURES=86
additionalBuildFlags: --enable_pybind --build_java --build_nodejs --use_cuda --cuda_home="$(Agent.TempDirectory)\v${{ parameters.CudaVersion }}" --enable_cuda_profiling --use_tensorrt --tensorrt_home="$(Agent.TempDirectory)\${{ variables.win_trt_folder }}" --cmake_extra_defines CMAKE_CUDA_ARCHITECTURES=86
msbuildPlatform: x64
isX86: false
job_name_suffix: x64_RelWithDebInfo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,5 @@ stages:
python_wheel_suffix: '_gpu'
timeout: 480
docker_base_image: onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda12_x64_ubi8_gcc12:20241020.1
trt_version: '10.4.0.26-1.cuda12.6'
cuda_version: '12.2'

Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,17 @@ jobs:
dependsOn: [ ]
timeoutInMinutes: ${{ parameters.timeout }}
variables:
- template: ../../templates/common-variables.yml
- name: docker_base_image
${{ if eq(parameters.CudaVersion, '11.8') }}:
value: nvidia/cuda:11.8.0-cudnn8-devel-ubi8
value: onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda11_x64_almalinux8_gcc11:20241020.1
${{ if eq(parameters.CudaVersion, '12.2') }}:
value: onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda12_x64_ubi8_gcc12:20241020.1
- name: linux_trt_version
${{ if eq(parameters.CudaVersion, '11.8') }}:
value: 10.4.0.26-1.cuda11.8
value: ${{ variables.linux_trt_version_cuda11 }}
${{ if eq(parameters.CudaVersion, '12.2') }}:
value: 10.4.0.26-1.cuda12.6
value: ${{ variables.linux_trt_version_cuda12 }}
pool: ${{ parameters.machine_pool }}
steps:
- checkout: self
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,19 +68,19 @@ stages:
timeoutInMinutes: 180
pool: 'onnxruntime-Ubuntu2204-AMD-CPU'
variables:
- template: ../templates/common-variables.yml
- name: CUDA_VERSION_MAJOR
${{ if eq(parameters.CudaVersion, '11.8') }}:
value: '11'
${{ if eq(parameters.CudaVersion, '12.2') }}:
value: '12'
- name: CUDA_VERSION
value: ${{ parameters.CudaVersion }}

- name: linux_trt_version
${{ if eq(parameters.CudaVersion, '11.8') }}:
value: 10.4.0.26-1.cuda11.8
value: ${{ variables.linux_trt_version_cuda11 }}
${{ if eq(parameters.CudaVersion, '12.2') }}:
value: 10.4.0.26-1.cuda12.6
value: ${{ variables.linux_trt_version_cuda12 }}
steps:
- checkout: self
clean: true
Expand Down Expand Up @@ -140,16 +140,17 @@ stages:
clean: all
pool: 'Onnxruntime-Linux-GPU'
variables:
- template: ../templates/common-variables.yml
- name: CUDA_VERSION_MAJOR
${{ if eq(parameters.CudaVersion, '11.8') }}:
value: '11'
${{ if eq(parameters.CudaVersion, '12.2') }}:
value: '12'
- name: linux_trt_version
${{ if eq(parameters.CudaVersion, '11.8') }}:
value: 10.4.0.26-1.cuda11.8
value: ${{ variables.linux_trt_version_cuda11 }}
${{ if eq(parameters.CudaVersion, '12.2') }}:
value: 10.4.0.26-1.cuda12.6
value: ${{ variables.linux_trt_version_cuda12 }}
steps:
- checkout: self # due to checkout multiple repos, the root directory is $(Build.SourcesDirectory)/onnxruntime
submodules: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,8 @@ stages:
PYTHON_VERSION: ${{ python_version }}
EP_NAME: gpu
CudaVersion: ${{ parameters.cuda_version }}
${{ if eq(parameters.cuda_version, '11.8') }}:
EP_BUILD_FLAGS: --enable_lto --use_tensorrt --tensorrt_home=$(Agent.TempDirectory)\TensorRT-10.4.0.26.Windows10.x86_64.cuda-11.8 --cuda_home=$(Agent.TempDirectory)\v11.8 --cmake_extra_defines "CMAKE_CUDA_ARCHITECTURES=52;60;61;70;75;80"
${{ if eq(parameters.cuda_version, '12.2') }}:
EP_BUILD_FLAGS: --enable_lto --use_tensorrt --tensorrt_home=$(Agent.TempDirectory)\TensorRT-10.4.0.26.Windows10.x86_64.cuda-12.6 --cuda_home=$(Agent.TempDirectory)\v12.2 --cmake_extra_defines "CMAKE_CUDA_ARCHITECTURES=52;60;61;70;75;80"
EP_BUILD_FLAGS: --enable_lto --cuda_home=$(Agent.TempDirectory)\v${{ parameters.cuda_version }} --cmake_extra_defines "CMAKE_CUDA_ARCHITECTURES=52;60;61;70;75;80"
use_tensorrt: True

- ${{ if eq(parameters.enable_linux_cuda, true) }}:
- template: py-linux-gpu-stage.yml
Expand All @@ -71,10 +69,8 @@ stages:
cuda_version: ${{ parameters.cuda_version }}
${{ if eq(parameters.cuda_version, '11.8') }}:
docker_base_image: onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda11_x64_almalinux8_gcc11:20241020.1
trt_version: 10.4.0.26-1.cuda11.8
${{ if eq(parameters.cuda_version, '12.2') }}:
docker_base_image: onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda12_x64_ubi8_gcc12:20241020.1
trt_version: 10.4.0.26-1.cuda12.6

- ${{ if eq(parameters.enable_windows_dml, true) }}:
- ${{ each python_version in parameters.PythonVersions }}:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,6 @@ parameters:
- name: docker_base_image
type: string

- name: trt_version
type: string
default: '10.4.0.26-1.cuda11.8'
values:
- 10.4.0.26-1.cuda11.8
- 10.4.0.26-1.cuda12.6
- name: cuda_version
type: string
default: '11.8'
Expand Down Expand Up @@ -71,6 +65,12 @@ stages:
value: -x ${{ parameters.extra_build_arg }}
${{ if eq(parameters.extra_build_arg, '') }}:
value: ''
- template: ../templates/common-variables.yml
- name: trt_version
${{ if eq(parameters.cuda_version, '11.8') }}:
value: ${{ variables.linux_trt_version_cuda11 }}
${{ if eq(parameters.cuda_version, '12.2') }}:
value: ${{ variables.linux_trt_version_cuda12 }}
steps:
- checkout: self
clean: true
Expand All @@ -82,7 +82,7 @@ stages:
parameters:
Dockerfile: tools/ci_build/github/linux/docker/inference/${{ parameters.arch }}/python/cuda/Dockerfile
Context: tools/ci_build/github/linux/docker/inference/${{ parameters.arch }}/python/cuda
DockerBuildArgs: "--build-arg BASEIMAGE=${{ parameters.docker_base_image }} --build-arg TRT_VERSION=${{ parameters.trt_version }} --build-arg BUILD_UID=$( id -u )"
DockerBuildArgs: "--build-arg BASEIMAGE=${{ parameters.docker_base_image }} --build-arg TRT_VERSION=${{ variables.trt_version }} --build-arg BUILD_UID=$( id -u )"
Repository: onnxruntimecuda${{ replace(parameters.cuda_version, '.', '') }}xtrt86build${{ parameters.arch }}


Expand Down
36 changes: 26 additions & 10 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 @@ -37,6 +37,10 @@ parameters:
- Release
- RelWithDebInfo
- MinSizeRel

- name: use_tensorrt
type: boolean
default: false

stages:
- stage: Win_py_${{ parameters.EP_NAME }}_Wheels_${{ replace(parameters.PYTHON_VERSION,'.','_') }}_Build
Expand Down Expand Up @@ -65,9 +69,23 @@ stages:
targetPath: $(Build.ArtifactStagingDirectory)
artifactName: win_${{ parameters.EP_NAME }}_wheel_${{ parameters.PYTHON_VERSION }}
variables:
GRADLE_OPTS: '-Dorg.gradle.daemon=false'
VSGenerator: 'Visual Studio 17 2022'
CUDA_MODULE_LOADING: 'LAZY'
- template: ../templates/common-variables.yml
- name: GRADLE_OPTS
value: '-Dorg.gradle.daemon=false'
- name: VSGenerator
value: 'Visual Studio 17 2022'
- name: CUDA_MODULE_LOADING
value: 'LAZY'
- name: win_trt_folder
${{ if eq(parameters.CudaVersion, '11.8') }}:
value: ${{ variables.win_trt_folder_cuda11 }}
${{ if eq(parameters.CudaVersion, '12.2') }}:
value: ${{ variables.win_trt_folder_cuda12 }}
- name: trt_build_flag
${{ if eq(parameters.use_tensorrt, true) }}:
value: '--use_tensorrt --tensorrt_home="$(Agent.TempDirectory)\${{ variables.win_trt_folder }}"'
${{ if eq(parameters.use_tensorrt, false) }}:
value: ''
steps:
- task: mspremier.PostBuildCleanup.PostBuildCleanup-task.PostBuildCleanup@3
displayName: 'Clean Agent Directories'
Expand All @@ -91,19 +109,17 @@ stages:
- template: ../templates/jobs/set-winenv.yml
parameters:
EnvSetupScript: ${{ parameters.ENV_SETUP_SCRIPT }}
${{ if or(contains(parameters.EP_BUILD_FLAGS, 'use_cuda'), contains(parameters.EP_BUILD_FLAGS, 'use_tensorrt')) }}:
${{ if or(contains(parameters.EP_BUILD_FLAGS, 'use_cuda'), eq(parameters.use_tensorrt, true)) }}:
DownloadCUDA: true
${{ if contains(parameters.EP_BUILD_FLAGS, 'use_tensorrt') }}:
DownloadTRT: 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'), contains(parameters.EP_BUILD_FLAGS, 'use_tensorrt')) }}:
${{ if or(contains(parameters.EP_BUILD_FLAGS, 'use_cuda'), eq(parameters.use_tensorrt, true)) }}:
DownloadCUDA: true
${{ if contains(parameters.EP_BUILD_FLAGS, 'use_tensorrt') }}:
DownloadTRT: true
DownloadTRT: ${{ parameters.use_tensorrt }}

- task: PythonScript@0
displayName: 'Update deps.txt'
Expand All @@ -126,7 +142,7 @@ stages:
--enable_pybind
--enable_onnx_tests
--parallel --use_binskim_compliant_compile_flags --update --build
$(TelemetryOption) ${{ parameters.BUILD_PY_PARAMETERS }} ${{ parameters.EP_BUILD_FLAGS }}
$(TelemetryOption) ${{ parameters.BUILD_PY_PARAMETERS }} ${{ parameters.EP_BUILD_FLAGS }} ${{ variables.trt_build_flag }}
workingDirectory: '$(Build.BinariesDirectory)'

# Esrp signing
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
variables:
common_cuda_version: '11.8'
yf711 marked this conversation as resolved.
Show resolved Hide resolved
common_cuda_baseimg: 'nvidia/cuda:11.8.0-cudnn8-devel-ubi8'
common_trt_version: '10.5.0.18'
# As for Debian installation, replace '-1.' by '-1+' when assigning trt version below
linux_trt_version_cuda11: ${{ variables.common_trt_version }}-1.cuda11.8
linux_trt_version_cuda12: ${{ variables.common_trt_version }}-1.cuda12.6
win_trt_folder_cuda11: TensorRT-${{ variables.common_trt_version }}.Windows10.x86_64.cuda-11.8
win_trt_folder_cuda12: TensorRT-${{ variables.common_trt_version }}.Windows10.x86_64.cuda-12.6
Loading
Loading