From d381f1cf1127b31dc23cac9d8ed4d5a5f2cab6ee Mon Sep 17 00:00:00 2001 From: yf711 Date: Wed, 4 Dec 2024 15:01:47 -0800 Subject: [PATCH 1/5] TRT 10.7 --- cgmanifests/generated/cgmanifest.json | 2 +- cmake/deps.txt | 4 ++-- .../azure-pipelines/py-cuda-alt-package-test-pipeline.yml | 2 +- .../github/azure-pipelines/templates/common-variables.yml | 2 +- .../github/azure-pipelines/templates/download-deps.yml | 4 ++-- .../templates/jobs/download_win_gpu_library.yml | 6 +++--- .../github/azure-pipelines/templates/jobs/set-winenv.yml | 4 ++-- .../linux/docker/Dockerfile.package_ubi8_cuda_tensorrt10_0 | 2 +- .../docker/Dockerfile.package_ubi8_cuda_tensorrt10_0_torch | 2 +- .../github/linux/docker/Dockerfile.package_ubuntu_2004_gpu | 2 +- .../linux/docker/Dockerfile.package_ubuntu_2204_gpu_ffmpeg | 2 +- .../linux/docker/Dockerfile.package_ubuntu_2204_gpu_opencv | 2 +- .../github/linux/docker/Dockerfile.ubuntu_cuda11_tensorrt10 | 2 +- .../github/linux/docker/Dockerfile.ubuntu_cuda12_tensorrt10 | 2 +- .../linux/docker/inference/x86_64/python/cuda/Dockerfile | 2 +- tools/ci_build/github/windows/setup_env_gpu.bat | 4 ++-- tools/ci_build/github/windows/setup_env_trt.bat | 2 +- 17 files changed, 23 insertions(+), 23 deletions(-) diff --git a/cgmanifests/generated/cgmanifest.json b/cgmanifests/generated/cgmanifest.json index 07dff50f9a3bd..ad4195f31aa7c 100644 --- a/cgmanifests/generated/cgmanifest.json +++ b/cgmanifests/generated/cgmanifest.json @@ -196,7 +196,7 @@ "component": { "type": "git", "git": { - "commitHash": "bc0d2e35909b8456abe32f3b30a49bb0c125e8b7", + "commitHash": "9c69a24bc2e20c8a511a4e6b06fd49639ec5300a", "repositoryUrl": "https://github.com/onnx/onnx-tensorrt.git" }, "comments": "onnx_tensorrt" diff --git a/cmake/deps.txt b/cmake/deps.txt index 21f9ee1701c46..04a306e0ee657 100644 --- a/cmake/deps.txt +++ b/cmake/deps.txt @@ -36,8 +36,8 @@ microsoft_wil;https://github.com/microsoft/wil/archive/refs/tags/v1.0.230629.1.z mimalloc;https://github.com/microsoft/mimalloc/archive/refs/tags/v2.1.1.zip;d5ee7d34223d0567892db5179849939c8769dc41 mp11;https://github.com/boostorg/mp11/archive/refs/tags/boost-1.82.0.zip;9bc9e01dffb64d9e0773b2e44d2f22c51aace063 onnx;https://github.com/onnx/onnx/archive/refs/tags/v1.16.1.zip;2eb9198bb352757d5ff13977cbe0634898e0837c -# Use the latest commit of 10.6-GA-ORT-DDS -onnx_tensorrt;https://github.com/onnx/onnx-tensorrt/archive/bc0d2e35909b8456abe32f3b30a49bb0c125e8b7.zip;f233ae871ad82c023da62e5dd620639f00bc2d15 +# Use the latest commit of 10.7-GA +onnx_tensorrt;https://github.com/onnx/onnx-tensorrt/archive/9c69a24bc2e20c8a511a4e6b06fd49639ec5300a.zip;ff1fe9af78eb129b4a4cdcb7450b7390b4436dd3 protobuf;https://github.com/protocolbuffers/protobuf/archive/refs/tags/v21.12.zip;7cf2733949036c7d52fda017badcab093fe73bfa protoc_win64;https://github.com/protocolbuffers/protobuf/releases/download/v21.12/protoc-21.12-win64.zip;b4521f7ada5b260380f94c4bd7f1b7684c76969a protoc_win32;https://github.com/protocolbuffers/protobuf/releases/download/v21.12/protoc-21.12-win32.zip;3688010318192c46ce73213cdfb6b3e5656da874 diff --git a/tools/ci_build/github/azure-pipelines/py-cuda-alt-package-test-pipeline.yml b/tools/ci_build/github/azure-pipelines/py-cuda-alt-package-test-pipeline.yml index 9296928ad97e0..cf434e4eadf0d 100644 --- a/tools/ci_build/github/azure-pipelines/py-cuda-alt-package-test-pipeline.yml +++ b/tools/ci_build/github/azure-pipelines/py-cuda-alt-package-test-pipeline.yml @@ -19,6 +19,6 @@ stages: python_wheel_suffix: '_gpu' timeout: 480 docker_base_image: onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda11_x64_almalinux8_gcc11:20241120.3 - trt_version: '10.6.0.26-1.cuda11.8' + trt_version: '10.7.0.23-1.cuda11.8' cuda_version: '11.8' diff --git a/tools/ci_build/github/azure-pipelines/templates/common-variables.yml b/tools/ci_build/github/azure-pipelines/templates/common-variables.yml index d35bed69ee409..3d4e5326ae7c6 100644 --- a/tools/ci_build/github/azure-pipelines/templates/common-variables.yml +++ b/tools/ci_build/github/azure-pipelines/templates/common-variables.yml @@ -1,5 +1,5 @@ variables: - common_trt_version: '10.6.0.26' + common_trt_version: '10.7.0.23' # 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 diff --git a/tools/ci_build/github/azure-pipelines/templates/download-deps.yml b/tools/ci_build/github/azure-pipelines/templates/download-deps.yml index 949479fb8b5e4..8409edb4d0429 100644 --- a/tools/ci_build/github/azure-pipelines/templates/download-deps.yml +++ b/tools/ci_build/github/azure-pipelines/templates/download-deps.yml @@ -11,7 +11,7 @@ steps: packageType: upack feed: '/7424c8e4-5c62-490e-95c4-79446f31017c' definition: '517c4f6f-5437-4392-a70d-4f15ec5be2f0' - version: 1.0.201 + version: 1.0.202 downloadPath: $(Build.BinariesDirectory)/deps # The private ADO project @@ -22,7 +22,7 @@ steps: packageType: upack feed: '/4c7631f5-24c0-4307-8822-1aa8f180c325' definition: 'fd9dd5ad-b73e-4678-890e-edcf680dbc1a' - version: 1.0.201 + version: 1.0.202 downloadPath: $(Build.BinariesDirectory)/deps # You can add more ADO accounts at here. diff --git a/tools/ci_build/github/azure-pipelines/templates/jobs/download_win_gpu_library.yml b/tools/ci_build/github/azure-pipelines/templates/jobs/download_win_gpu_library.yml index ae54b3849a862..14b9c378bec14 100644 --- a/tools/ci_build/github/azure-pipelines/templates/jobs/download_win_gpu_library.yml +++ b/tools/ci_build/github/azure-pipelines/templates/jobs/download_win_gpu_library.yml @@ -13,10 +13,10 @@ parameters: - 12.2 - name: TrtVersion type: string - default: '10.6.0.26' + default: '10.7.0.23' values: - 8.6.1.6 - - 10.6.0.26 + - 10.7.0.23 steps: - ${{ if eq(parameters.DownloadCUDA, true) }}: @@ -42,7 +42,7 @@ steps: - powershell: | Write-Host "##vso[task.setvariable variable=trtCudaVersion;]12.0" displayName: Set trtCudaVersion - - ${{ if and(eq(parameters.CudaVersion, '12.2'), eq(parameters.TrtVersion, '10.6.0.26')) }}: + - ${{ if and(eq(parameters.CudaVersion, '12.2'), eq(parameters.TrtVersion, '10.7.0.23')) }}: - powershell: | Write-Host "##vso[task.setvariable variable=trtCudaVersion;]12.6" displayName: Set trtCudaVersion diff --git a/tools/ci_build/github/azure-pipelines/templates/jobs/set-winenv.yml b/tools/ci_build/github/azure-pipelines/templates/jobs/set-winenv.yml index dfaf237a711fe..45572416350c3 100644 --- a/tools/ci_build/github/azure-pipelines/templates/jobs/set-winenv.yml +++ b/tools/ci_build/github/azure-pipelines/templates/jobs/set-winenv.yml @@ -15,10 +15,10 @@ parameters: default: '11.8' - name: win_trt_folder_cuda11 type: string - default: 'TensorRT-10.6.0.26.Windows10.x86_64.cuda-11.8' + default: 'TensorRT-10.7.0.23.Windows10.x86_64.cuda-11.8' - name: win_trt_folder_cuda12 type: string - default: 'TensorRT-10.6.0.26.Windows10.x86_64.cuda-12.6' + default: 'TensorRT-10.7.0.23.Windows10.x86_64.cuda-12.6' steps: - ${{ if eq(parameters.DownloadCUDA, 'true') }}: diff --git a/tools/ci_build/github/linux/docker/Dockerfile.package_ubi8_cuda_tensorrt10_0 b/tools/ci_build/github/linux/docker/Dockerfile.package_ubi8_cuda_tensorrt10_0 index c2bae5fd7ee59..df5112dc38af4 100644 --- a/tools/ci_build/github/linux/docker/Dockerfile.package_ubi8_cuda_tensorrt10_0 +++ b/tools/ci_build/github/linux/docker/Dockerfile.package_ubi8_cuda_tensorrt10_0 @@ -6,7 +6,7 @@ # Build base image with required system packages ARG BASEIMAGE=nvidia/cuda:12.5.1-cudnn-devel-ubi8 -ARG TRT_VERSION=10.6.0.26-1.cuda12.6 +ARG TRT_VERSION=10.7.0.23-1.cuda12.6 FROM $BASEIMAGE AS base ARG TRT_VERSION ENV PATH=/opt/python/cp310-cp310/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/src/tensorrt/bin:${PATH} diff --git a/tools/ci_build/github/linux/docker/Dockerfile.package_ubi8_cuda_tensorrt10_0_torch b/tools/ci_build/github/linux/docker/Dockerfile.package_ubi8_cuda_tensorrt10_0_torch index 2ecc6d1918b1a..fef95b8574520 100644 --- a/tools/ci_build/github/linux/docker/Dockerfile.package_ubi8_cuda_tensorrt10_0_torch +++ b/tools/ci_build/github/linux/docker/Dockerfile.package_ubi8_cuda_tensorrt10_0_torch @@ -6,7 +6,7 @@ # Build base image with required system packages ARG BASEIMAGE=nvidia/cuda:11.8.0-cudnn8-devel-ubi8 -ARG TRT_VERSION=10.6.0.26-1.cuda11.8 +ARG TRT_VERSION=10.7.0.23-1.cuda11.8 FROM $BASEIMAGE AS base ARG TRT_VERSION ENV PATH=/opt/python/cp310-cp310/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/src/tensorrt/bin:${PATH} diff --git a/tools/ci_build/github/linux/docker/Dockerfile.package_ubuntu_2004_gpu b/tools/ci_build/github/linux/docker/Dockerfile.package_ubuntu_2004_gpu index 81aeada6a4a46..e91f14ff955b9 100644 --- a/tools/ci_build/github/linux/docker/Dockerfile.package_ubuntu_2004_gpu +++ b/tools/ci_build/github/linux/docker/Dockerfile.package_ubuntu_2004_gpu @@ -6,7 +6,7 @@ # Build base image with required system packages ARG BASEIMAGE=nvidia/cuda:11.8.0-cudnn8-devel-ubuntu20.04 -ARG TRT_VERSION=10.6.0.26-1+cuda11.8 +ARG TRT_VERSION=10.7.0.23-1+cuda11.8 ARG LD_LIBRARY_PATH_ARG=/usr/local/lib64:/usr/local/cuda/lib64 FROM $BASEIMAGE AS base ARG TRT_VERSION diff --git a/tools/ci_build/github/linux/docker/Dockerfile.package_ubuntu_2204_gpu_ffmpeg b/tools/ci_build/github/linux/docker/Dockerfile.package_ubuntu_2204_gpu_ffmpeg index 4298dd53e4c66..0b08d4b3024b8 100644 --- a/tools/ci_build/github/linux/docker/Dockerfile.package_ubuntu_2204_gpu_ffmpeg +++ b/tools/ci_build/github/linux/docker/Dockerfile.package_ubuntu_2204_gpu_ffmpeg @@ -6,7 +6,7 @@ # Build base image with required system packages ARG BASEIMAGE=nvidia/cuda:11.8.0-cudnn8-devel-ubuntu22.04 -ARG TRT_VERSION=10.6.0.26-1+cuda11.8 +ARG TRT_VERSION=10.7.0.23-1+cuda11.8 ARG LD_LIBRARY_PATH_ARG=/usr/local/lib64:/usr/local/cuda/lib64 FROM $BASEIMAGE AS base ARG TRT_VERSION diff --git a/tools/ci_build/github/linux/docker/Dockerfile.package_ubuntu_2204_gpu_opencv b/tools/ci_build/github/linux/docker/Dockerfile.package_ubuntu_2204_gpu_opencv index 1312475ceca3a..3a7e064686ae5 100644 --- a/tools/ci_build/github/linux/docker/Dockerfile.package_ubuntu_2204_gpu_opencv +++ b/tools/ci_build/github/linux/docker/Dockerfile.package_ubuntu_2204_gpu_opencv @@ -6,7 +6,7 @@ # Build base image with required system packages ARG BASEIMAGE=nvidia/cuda:11.8.0-cudnn8-devel-ubuntu22.04 -ARG TRT_VERSION=10.6.0.26-1+cuda11.8 +ARG TRT_VERSION=10.7.0.23-1+cuda11.8 ARG LD_LIBRARY_PATH_ARG=/usr/local/lib64:/usr/local/cuda/lib64 FROM $BASEIMAGE AS base ARG TRT_VERSION diff --git a/tools/ci_build/github/linux/docker/Dockerfile.ubuntu_cuda11_tensorrt10 b/tools/ci_build/github/linux/docker/Dockerfile.ubuntu_cuda11_tensorrt10 index 22d5e3b0248a8..01f08ff41e2cc 100644 --- a/tools/ci_build/github/linux/docker/Dockerfile.ubuntu_cuda11_tensorrt10 +++ b/tools/ci_build/github/linux/docker/Dockerfile.ubuntu_cuda11_tensorrt10 @@ -31,7 +31,7 @@ RUN pip install --upgrade pip RUN pip install psutil setuptools>=68.2.2 # Install TensorRT -RUN TRT_VERSION="10.6.0.26-1+cuda11.8" &&\ +RUN TRT_VERSION="10.7.0.23-1+cuda11.8" &&\ apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/7fa2af80.pub &&\ apt-get update &&\ apt-get install -y \ diff --git a/tools/ci_build/github/linux/docker/Dockerfile.ubuntu_cuda12_tensorrt10 b/tools/ci_build/github/linux/docker/Dockerfile.ubuntu_cuda12_tensorrt10 index 819d9bab7be75..781f0647a084b 100644 --- a/tools/ci_build/github/linux/docker/Dockerfile.ubuntu_cuda12_tensorrt10 +++ b/tools/ci_build/github/linux/docker/Dockerfile.ubuntu_cuda12_tensorrt10 @@ -31,7 +31,7 @@ RUN pip install --upgrade pip RUN pip install setuptools>=68.2.2 psutil # Install TensorRT -RUN TRT_VERSION="10.6.0.26-1+cuda12.6" &&\ +RUN TRT_VERSION="10.7.0.23-1+cuda12.6" &&\ apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/7fa2af80.pub &&\ apt-get update &&\ apt-get install -y \ diff --git a/tools/ci_build/github/linux/docker/inference/x86_64/python/cuda/Dockerfile b/tools/ci_build/github/linux/docker/inference/x86_64/python/cuda/Dockerfile index a69b98f86ba1b..5f10607b11626 100644 --- a/tools/ci_build/github/linux/docker/inference/x86_64/python/cuda/Dockerfile +++ b/tools/ci_build/github/linux/docker/inference/x86_64/python/cuda/Dockerfile @@ -5,7 +5,7 @@ ARG BASEIMAGE=nvidia/cuda:11.8.0-cudnn8-devel-ubi8 FROM $BASEIMAGE -ARG TRT_VERSION=10.6.0.26-1.cuda11.8 +ARG TRT_VERSION=10.7.0.23-1.cuda11.8 #Install TensorRT only if TRT_VERSION is not empty RUN if [ -n "${TRT_VERSION}" ]; then \ diff --git a/tools/ci_build/github/windows/setup_env_gpu.bat b/tools/ci_build/github/windows/setup_env_gpu.bat index 34ddd75da16fc..4e2bd8f8386e2 100644 --- a/tools/ci_build/github/windows/setup_env_gpu.bat +++ b/tools/ci_build/github/windows/setup_env_gpu.bat @@ -6,10 +6,10 @@ if exist PATH=%AGENT_TEMPDIRECTORY%\v12.2\ ( ) else ( set PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2\extras\CUPTI\lib64;%PATH% ) -set PATH=%AGENT_TEMPDIRECTORY%\TensorRT-10.6.0.26.Windows10.x86_64.cuda-12.6\lib;%PATH% +set PATH=%AGENT_TEMPDIRECTORY%\TensorRT-10.7.0.23.Windows10.x86_64.cuda-12.6\lib;%PATH% @REM The default version is still cuda v12.2, because set cuda v11.8 after it -set PATH=%PATH%;%AGENT_TEMPDIRECTORY%\TensorRT-10.6.0.26.Windows10.x86_64.cuda-11.8\lib +set PATH=%PATH%;%AGENT_TEMPDIRECTORY%\TensorRT-10.7.0.23.Windows10.x86_64.cuda-11.8\lib if exist PATH=%AGENT_TEMPDIRECTORY%\v11.8\ ( set PATH=%PATH%;%AGENT_TEMPDIRECTORY%\v11.8\bin;%AGENT_TEMPDIRECTORY%\v11.8\extras\CUPTI\lib64 ) else ( diff --git a/tools/ci_build/github/windows/setup_env_trt.bat b/tools/ci_build/github/windows/setup_env_trt.bat index 03734293be5c4..6a602e46661e7 100644 --- a/tools/ci_build/github/windows/setup_env_trt.bat +++ b/tools/ci_build/github/windows/setup_env_trt.bat @@ -6,6 +6,6 @@ if exist PATH=%AGENT_TEMPDIRECTORY%\v12.2\ ( ) else ( set PATH=%PATH%;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2\extras\CUPTI\lib64 ) -set PATH=%AGENT_TEMPDIRECTORY%\TensorRT-10.6.0.26.Windows10.x86_64.cuda-12.6\lib;%PATH% +set PATH=%AGENT_TEMPDIRECTORY%\TensorRT-10.7.0.23.Windows10.x86_64.cuda-12.6\lib;%PATH% set GRADLE_OPTS=-Dorg.gradle.daemon=false set CUDA_MODULE_LOADING=LAZY From 5866881b98469529239f202f4b4cc4ee7a3e7753 Mon Sep 17 00:00:00 2001 From: yf711 Date: Thu, 5 Dec 2024 09:57:56 -0800 Subject: [PATCH 2/5] update ep_perf --- .../python/tools/tensorrt/perf/build/build_image.py | 8 ++++---- .../linux-gpu-tensorrt-daily-perf-pipeline.yml | 10 +++++----- .../linux/docker/Dockerfile.ubuntu_cuda12_tensorrt10 | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/onnxruntime/python/tools/tensorrt/perf/build/build_image.py b/onnxruntime/python/tools/tensorrt/perf/build/build_image.py index 3ebc33c02592d..20d3d0d36c930 100644 --- a/onnxruntime/python/tools/tensorrt/perf/build/build_image.py +++ b/onnxruntime/python/tools/tensorrt/perf/build/build_image.py @@ -15,10 +15,10 @@ from typing import List, Optional 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.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", + "8.6(cuda11.8+cudnn8)": "tools/ci_build/github/linux/docker/Dockerfile.ubuntu_cuda11_8_tensorrt8_6", + "8.6(cuda12.3+cudnn9)": "tools/ci_build/github/linux/docker/Dockerfile.ubuntu_cuda12_3_tensorrt8_6", + "10.7(cuda11.8+cudnn8)": "tools/ci_build/github/linux/docker/Dockerfile.ubuntu_cuda11_tensorrt10", + "10.7(cuda12+cudnn9)": "tools/ci_build/github/linux/docker/Dockerfile.ubuntu_cuda12_tensorrt10", "BIN": "tools/ci_build/github/linux/docker/Dockerfile.ubuntu_tensorrt_bin", } diff --git a/tools/ci_build/github/azure-pipelines/linux-gpu-tensorrt-daily-perf-pipeline.yml b/tools/ci_build/github/azure-pipelines/linux-gpu-tensorrt-daily-perf-pipeline.yml index 83cf26614a285..6acc7deafc6a5 100644 --- a/tools/ci_build/github/azure-pipelines/linux-gpu-tensorrt-daily-perf-pipeline.yml +++ b/tools/ci_build/github/azure-pipelines/linux-gpu-tensorrt-daily-perf-pipeline.yml @@ -8,12 +8,12 @@ parameters: - name: TrtVersion displayName: TensorRT Version type: string - default: 10.5.cuda_12_5_cudnn_9 + default: 10.7(cuda12+cudnn9) values: - - 8.6.cuda_11_8_cudnn_8 - - 8.6.cuda_12_3_cudnn_9 - - 10.5.cuda_11_8_cudnn_8 - - 10.5.cuda_12_5_cudnn_9 + - 8.6(cuda11.8+cudnn8) + - 8.6(cuda12.3+cudnn9) + - 10.7(cuda11.8+cudnn8) + - 10.7(cuda12+cudnn9) - BIN - name: UseTensorrtOssParser diff --git a/tools/ci_build/github/linux/docker/Dockerfile.ubuntu_cuda12_tensorrt10 b/tools/ci_build/github/linux/docker/Dockerfile.ubuntu_cuda12_tensorrt10 index 781f0647a084b..3798f04a85e6a 100644 --- a/tools/ci_build/github/linux/docker/Dockerfile.ubuntu_cuda12_tensorrt10 +++ b/tools/ci_build/github/linux/docker/Dockerfile.ubuntu_cuda12_tensorrt10 @@ -5,7 +5,7 @@ # Dockerfile to run ONNXRuntime with TensorRT integration # Build base image with required system packages -FROM nvidia/cuda:12.5.1-cudnn-devel-ubuntu20.04 AS base +FROM nvidia/cuda:12.6.3-cudnn-devel-ubuntu20.04 AS base # The local directory into which to build and install CMAKE ARG ONNXRUNTIME_LOCAL_CODE_DIR=/code From bde39cf7ac9960a17c64def0f3c5b1c1745f0af6 Mon Sep 17 00:00:00 2001 From: yf711 Date: Thu, 5 Dec 2024 10:06:54 -0800 Subject: [PATCH 3/5] fix --- .../tools/tensorrt/perf/build/build_image.py | 8 +- ...linux-gpu-tensorrt-daily-perf-pipeline.yml | 118 +++++++++--------- 2 files changed, 63 insertions(+), 63 deletions(-) diff --git a/onnxruntime/python/tools/tensorrt/perf/build/build_image.py b/onnxruntime/python/tools/tensorrt/perf/build/build_image.py index 20d3d0d36c930..ac98fd0be44ea 100644 --- a/onnxruntime/python/tools/tensorrt/perf/build/build_image.py +++ b/onnxruntime/python/tools/tensorrt/perf/build/build_image.py @@ -15,10 +15,10 @@ from typing import List, Optional TRT_DOCKER_FILES = { - "8.6(cuda11.8+cudnn8)": "tools/ci_build/github/linux/docker/Dockerfile.ubuntu_cuda11_8_tensorrt8_6", - "8.6(cuda12.3+cudnn9)": "tools/ci_build/github/linux/docker/Dockerfile.ubuntu_cuda12_3_tensorrt8_6", - "10.7(cuda11.8+cudnn8)": "tools/ci_build/github/linux/docker/Dockerfile.ubuntu_cuda11_tensorrt10", - "10.7(cuda12+cudnn9)": "tools/ci_build/github/linux/docker/Dockerfile.ubuntu_cuda12_tensorrt10", + "8.6_cuda11.8_cudnn8": "tools/ci_build/github/linux/docker/Dockerfile.ubuntu_cuda11_8_tensorrt8_6", + "8.6_cuda12.3_cudnn9": "tools/ci_build/github/linux/docker/Dockerfile.ubuntu_cuda12_3_tensorrt8_6", + "10.7_cuda11.8_cudnn8": "tools/ci_build/github/linux/docker/Dockerfile.ubuntu_cuda11_tensorrt10", + "10.7_cuda12.6_cudnn9": "tools/ci_build/github/linux/docker/Dockerfile.ubuntu_cuda12_tensorrt10", "BIN": "tools/ci_build/github/linux/docker/Dockerfile.ubuntu_tensorrt_bin", } diff --git a/tools/ci_build/github/azure-pipelines/linux-gpu-tensorrt-daily-perf-pipeline.yml b/tools/ci_build/github/azure-pipelines/linux-gpu-tensorrt-daily-perf-pipeline.yml index 6acc7deafc6a5..e19cdaaa5035f 100644 --- a/tools/ci_build/github/azure-pipelines/linux-gpu-tensorrt-daily-perf-pipeline.yml +++ b/tools/ci_build/github/azure-pipelines/linux-gpu-tensorrt-daily-perf-pipeline.yml @@ -8,16 +8,16 @@ parameters: - name: TrtVersion displayName: TensorRT Version type: string - default: 10.7(cuda12+cudnn9) + default: 10.7_cuda12.6_cudnn9 values: - - 8.6(cuda11.8+cudnn8) - - 8.6(cuda12.3+cudnn9) - - 10.7(cuda11.8+cudnn8) - - 10.7(cuda12+cudnn9) + - 8.6_cuda11.8_cudnn8 + - 8.6_cuda12.3_cudnn9 + - 10.7_cuda11.8_cudnn8 + - 10.7_cuda12.6_cudnn9 - BIN - name: UseTensorrtOssParser - displayName: Use TensorRT-OSS Parser (not compatible with BIN) + displayName: Use TensorRT-OSS Parser (not compatible with BIN type: boolean default: false @@ -58,92 +58,92 @@ jobs: variables: - name: branchName - ${{ if not(eq(variables['ortBranchOverride'], '')) }}: - value: $(ortBranchOverride) + ${{ if not(eq(variables['ortBranchOverride'], '' }}: + value: $(ortBranchOverride ${{ else }}: - value: $[ replace(variables['Build.SourceBranch'], 'refs/heads/', '') ] + value: $[ replace(variables['Build.SourceBranch'], 'refs/heads/', '' ] - name: trtVersion - ${{ if eq(parameters.TrtVersion, 'BIN') }}: - value: $(tarTrtVersion) + ${{ if eq(parameters.TrtVersion, 'BIN' }}: + value: $(tarTrtVersion ${{ else }}: value: ${{ parameters.TrtVersion }} - name: trtEPOptionsArg - ${{ if not(eq(length(parameters.TrtEPOptions), 0)) }}: - value: --trt_ep_options ${{ join(',',parameters.TrtEPOptions) }} + ${{ if not(eq(length(parameters.TrtEPOptions, 0 }}: + value: --trt_ep_options ${{ join(',',parameters.TrtEPOptions }} - name: cudaEPOptionsArg - ${{ if not(eq(length(parameters.CUDAEPOptions), 0)) }}: - value: --cuda_ep_options ${{ join(',',parameters.CUDAEPOptions) }} + ${{ if not(eq(length(parameters.CUDAEPOptions, 0 }}: + value: --cuda_ep_options ${{ join(',',parameters.CUDAEPOptions }} - name: optional_arguments - value: -a "-a -z -g $(optimizeGraph) -b $(bindInputs) $(trtEPOptionsArg) $(cudaEPOptionsArg)" + value: -a "-a -z -g $(optimizeGraph -b $(bindInputs $(trtEPOptionsArg $(cudaEPOptionsArg" - name: image - value: ort-image-$(Build.BuildId) + value: ort-image-$(Build.BuildId - name: parser - ${{ if eq(parameters.UseTensorrtOssParser, true) }}: - value: --use_tensorrt_oss_parser $(parameters.UseTensorrtOssParser) }} + ${{ if eq(parameters.UseTensorrtOssParser, true }}: + value: --use_tensorrt_oss_parser $(parameters.UseTensorrtOssParser }} steps: - - ${{ if and(eq(parameters.TrtVersion, 'BIN'), eq(parameters.UseTensorrtOssParser, false)) }}: - - script: 'ls -al $(trtBinsDir)' + - ${{ if and(eq(parameters.TrtVersion, 'BIN', eq(parameters.UseTensorrtOssParser, false }}: + - script: 'ls -al $(trtBinsDir' displayName: 'Show available TensorRT .tar.gz packages' - - script: 'cp $(trtBinsDir)/TensorRT-$(trtVersion).Linux.x86_64-gnu.cuda-$(tarCudaVersion).tar.gz $(Build.SourcesDirectory)/onnxruntime/python/tools/tensorrt/perf/build/' + - script: 'cp $(trtBinsDir/TensorRT-$(trtVersion.Linux.x86_64-gnu.cuda-$(tarCudaVersion.tar.gz $(Build.SourcesDirectory/onnxruntime/python/tools/tensorrt/perf/build/' displayName: 'Copy TensorRT .tar.gz package into Docker build directory' - - script: 'python3 $(Build.SourcesDirectory)/onnxruntime/python/tools/tensorrt/perf/build/build_image.py -r $(Build.SourcesDirectory) -i $(image) -b $(branchName) -t $(trtVersion) -a 75 --install_bin --tar_cuda_version=$(tarCudaVersion) --trt_bins_dir=.' - displayName: 'Install TensorRT $(tarTrtVersion) from binaries and build latest ORT Image' - workingDirectory: '$(Build.SourcesDirectory)/onnxruntime/python/tools/tensorrt/perf/build' + - script: 'python3 $(Build.SourcesDirectory/onnxruntime/python/tools/tensorrt/perf/build/build_image.py -r $(Build.SourcesDirectory -i $(image -b $(branchName -t $(trtVersion -a 75 --install_bin --tar_cuda_version=$(tarCudaVersion --trt_bins_dir=.' + displayName: 'Install TensorRT $(tarTrtVersion from binaries and build latest ORT Image' + workingDirectory: '$(Build.SourcesDirectory/onnxruntime/python/tools/tensorrt/perf/build' # Build ORT with TensorRT built-in parser - - ${{ if and(ne(parameters.TrtVersion, 'BIN'), eq(parameters.UseTensorrtOssParser, false)) }}: - - script: 'python3 $(Build.SourcesDirectory)/onnxruntime/python/tools/tensorrt/perf/build/build_image.py -r $(Build.SourcesDirectory) -i $(image) -b $(branchName) -t $(trtVersion) -a 75' + - ${{ if and(ne(parameters.TrtVersion, 'BIN', eq(parameters.UseTensorrtOssParser, false }}: + - script: 'python3 $(Build.SourcesDirectory/onnxruntime/python/tools/tensorrt/perf/build/build_image.py -r $(Build.SourcesDirectory -i $(image -b $(branchName -t $(trtVersion -a 75' displayName: 'Build latest ORT Image with TensorRT built-in parser' - workingDirectory: '$(Build.SourcesDirectory)/onnxruntime/python/tools/tensorrt/perf/build' + workingDirectory: '$(Build.SourcesDirectory/onnxruntime/python/tools/tensorrt/perf/build' # Build ORT with certain version of TensorRT OSS parser - - ${{ if and(ne(parameters.TrtVersion, 'BIN'), eq(parameters.UseTensorrtOssParser, true), ne(variables.onnxTensorrtCommitId, '')) }}: - - script: 'python3 $(Build.SourcesDirectory)/onnxruntime/python/tools/tensorrt/perf/build/build_image.py -r $(Build.SourcesDirectory) -i $(image) -b $(branchName) -t $(trtVersion) -a 75 -o $(onnxTensorrtCommitId) --use_tensorrt_oss_parser' - displayName: 'Build latest ORT Image with TensorRT OSS parser and commit id $(onnxTensorrtCommitId)' - workingDirectory: '$(Build.SourcesDirectory)/onnxruntime/python/tools/tensorrt/perf/build' + - ${{ if and(ne(parameters.TrtVersion, 'BIN', eq(parameters.UseTensorrtOssParser, true, ne(variables.onnxTensorrtCommitId, '' }}: + - script: 'python3 $(Build.SourcesDirectory/onnxruntime/python/tools/tensorrt/perf/build/build_image.py -r $(Build.SourcesDirectory -i $(image -b $(branchName -t $(trtVersion -a 75 -o $(onnxTensorrtCommitId --use_tensorrt_oss_parser' + displayName: 'Build latest ORT Image with TensorRT OSS parser and commit id $(onnxTensorrtCommitId' + workingDirectory: '$(Build.SourcesDirectory/onnxruntime/python/tools/tensorrt/perf/build' # Build ORT with default version of TensorRT OSS parser - - ${{ if and(ne(parameters.TrtVersion, 'BIN'), eq(parameters.UseTensorrtOssParser, true), eq(variables.onnxTensorrtCommitId, '')) }}: - - script: 'python3 $(Build.SourcesDirectory)/onnxruntime/python/tools/tensorrt/perf/build/build_image.py -r $(Build.SourcesDirectory) -i $(image) -b $(branchName) -t $(trtVersion) -a 75 --use_tensorrt_oss_parser' + - ${{ if and(ne(parameters.TrtVersion, 'BIN', eq(parameters.UseTensorrtOssParser, true, eq(variables.onnxTensorrtCommitId, '' }}: + - script: 'python3 $(Build.SourcesDirectory/onnxruntime/python/tools/tensorrt/perf/build/build_image.py -r $(Build.SourcesDirectory -i $(image -b $(branchName -t $(trtVersion -a 75 --use_tensorrt_oss_parser' displayName: 'Build latest ORT Image with TensorRT OSS parser' - workingDirectory: '$(Build.SourcesDirectory)/onnxruntime/python/tools/tensorrt/perf/build' + workingDirectory: '$(Build.SourcesDirectory/onnxruntime/python/tools/tensorrt/perf/build' - - ${{ if eq(parameters.MemTest, true) }}: - - script: '$(Build.SourcesDirectory)/onnxruntime/python/tools/tensorrt/perf/mem_test/run_mem_test_docker.sh -d $(image) -p $(Build.SourcesDirectory)/onnxruntime/python/tools/tensorrt/perf/mem_test/ -w /code/ -l false -c ${{ parameters.ConcurrencyTest }}' + - ${{ if eq(parameters.MemTest, true }}: + - script: '$(Build.SourcesDirectory/onnxruntime/python/tools/tensorrt/perf/mem_test/run_mem_test_docker.sh -d $(image -p $(Build.SourcesDirectory/onnxruntime/python/tools/tensorrt/perf/mem_test/ -w /code/ -l false -c ${{ parameters.ConcurrencyTest }}' displayName: 'Run Memory Test and Concurrency Test' - workingDirectory: '$(Build.SourcesDirectory)/onnxruntime/python/tools/tensorrt/perf/mem_test/' + workingDirectory: '$(Build.SourcesDirectory/onnxruntime/python/tools/tensorrt/perf/mem_test/' - ${{ each option in parameters.ModelGroups }}: - - script: '$(Build.SourcesDirectory)/onnxruntime/python/tools/tensorrt/perf/run_perf_docker.sh -d $(image) -p $(Build.SourcesDirectory)/onnxruntime/python/tools/tensorrt/perf -v $(modelVolume) -b true -o ${{option}} -m $(${{option}}) -e "$(epList)" $(optional_arguments)' + - script: '$(Build.SourcesDirectory/onnxruntime/python/tools/tensorrt/perf/run_perf_docker.sh -d $(image -p $(Build.SourcesDirectory/onnxruntime/python/tools/tensorrt/perf -v $(modelVolume -b true -o ${{option}} -m $(${{option}} -e "$(epList" $(optional_arguments' displayName: '${{option}} perf' - workingDirectory: '$(Build.SourcesDirectory)/onnxruntime/python/tools/tensorrt/perf/' + workingDirectory: '$(Build.SourcesDirectory/onnxruntime/python/tools/tensorrt/perf/' # Prepare and Publish Artifacts - - script: 'mkdir $(Build.SourcesDirectory)/Artifact' + - script: 'mkdir $(Build.SourcesDirectory/Artifact' displayName: 'Prepare Artifacts Directory' - workingDirectory: '$(Build.SourcesDirectory)/onnxruntime/python/tools/tensorrt/perf/' - condition: always() + workingDirectory: '$(Build.SourcesDirectory/onnxruntime/python/tools/tensorrt/perf/' + condition: always( - - ${{ if not(eq(length(parameters.ModelGroups), 0)) }}: - - script: 'cp -r $(Build.SourcesDirectory)/onnxruntime/python/tools/tensorrt/perf/result/ $(Build.SourcesDirectory)/Artifact' + - ${{ if not(eq(length(parameters.ModelGroups, 0 }}: + - script: 'cp -r $(Build.SourcesDirectory/onnxruntime/python/tools/tensorrt/perf/result/ $(Build.SourcesDirectory/Artifact' displayName: 'Copy Artifacts' - workingDirectory: '$(Build.SourcesDirectory)/onnxruntime/python/tools/tensorrt/perf/' + workingDirectory: '$(Build.SourcesDirectory/onnxruntime/python/tools/tensorrt/perf/' - - ${{ if eq(parameters.MemTest, true) }}: - - script: 'cp -r $(Build.SourcesDirectory)/onnxruntime/python/tools/tensorrt/perf/mem_test/build/result $(Build.SourcesDirectory)/Artifact/result_mem_test' + - ${{ if eq(parameters.MemTest, true }}: + - script: 'cp -r $(Build.SourcesDirectory/onnxruntime/python/tools/tensorrt/perf/mem_test/build/result $(Build.SourcesDirectory/Artifact/result_mem_test' displayName: 'Copy Artifacts' - workingDirectory: '$(Build.SourcesDirectory)/onnxruntime/python/tools/tensorrt/perf/' - condition: always() + workingDirectory: '$(Build.SourcesDirectory/onnxruntime/python/tools/tensorrt/perf/' + condition: always( - script: 'python3 -m pip install pandas azure-kusto-data[pandas] azure-kusto-ingest[pandas] coloredlogs' displayName: 'Install dashboard dependencies' @@ -162,11 +162,11 @@ jobs: scriptLocation: inlineScript scriptType: bash inlineScript: | - short_hash=$(git rev-parse --short HEAD) && - commit_date=$(git log -1 --date=iso-strict --pretty=format:%cd) && - python3 $(Build.SourcesDirectory)/onnxruntime/python/tools/tensorrt/perf/parse_mem_concurrency_test.py -r $(Build.SourcesDirectory)/Artifact/result_mem_test -c $short_hash -d $commit_date -u "$(reportUrl)?buildId=$(Build.BuildId)" -t $(trtVersion) -b $(branchName) --kusto_conn $(kustoConn) --database $(database) $(parser) + short_hash=$(git rev-parse --short HEAD && + commit_date=$(git log -1 --date=iso-strict --pretty=format:%cd && + python3 $(Build.SourcesDirectory/onnxruntime/python/tools/tensorrt/perf/parse_mem_concurrency_test.py -r $(Build.SourcesDirectory/Artifact/result_mem_test -c $short_hash -d $commit_date -u "$(reportUrl?buildId=$(Build.BuildId" -t $(trtVersion -b $(branchName --kusto_conn $(kustoConn --database $(database $(parser - - ${{ if eq(parameters.PostToDashboard, true) }}: + - ${{ if eq(parameters.PostToDashboard, true }}: - script: 'python3 -m pip install pandas azure-kusto-data[pandas] azure-kusto-ingest[pandas] coloredlogs' displayName: 'Install dashboard dependencies' @@ -185,14 +185,14 @@ jobs: scriptLocation: inlineScript scriptType: bash inlineScript: | - short_hash=$(git rev-parse --short HEAD) && - commit_date=$(git log -1 --date=iso-strict --pretty=format:%cd) && - python3 $(Build.SourcesDirectory)/onnxruntime/python/tools/tensorrt/perf/post.py -r $(Build.SourcesDirectory)/Artifact/result -c $short_hash -d $commit_date -u "$(reportUrl)?buildId=$(Build.BuildId)" -t $(trtVersion) -b $(branchName) --kusto_conn $(kustoConn) --database $(database) $(parser) + short_hash=$(git rev-parse --short HEAD && + commit_date=$(git log -1 --date=iso-strict --pretty=format:%cd && + python3 $(Build.SourcesDirectory/onnxruntime/python/tools/tensorrt/perf/post.py -r $(Build.SourcesDirectory/Artifact/result -c $short_hash -d $commit_date -u "$(reportUrl?buildId=$(Build.BuildId" -t $(trtVersion -b $(branchName --kusto_conn $(kustoConn --database $(database $(parser - task: PublishBuildArtifacts@1 inputs: - pathtoPublish: '$(Build.SourcesDirectory)/Artifact' - artifactName: 'result-$(Build.BuildNumber)' + pathtoPublish: '$(Build.SourcesDirectory/Artifact' + artifactName: 'result-$(Build.BuildNumber' - template: templates/component-governance-component-detection-steps.yml parameters : From 91bf777d3bc00861eed957f745eb5754df194423 Mon Sep 17 00:00:00 2001 From: yf711 Date: Thu, 5 Dec 2024 10:09:47 -0800 Subject: [PATCH 4/5] fix --- ...linux-gpu-tensorrt-daily-perf-pipeline.yml | 110 +++++++++--------- 1 file changed, 55 insertions(+), 55 deletions(-) diff --git a/tools/ci_build/github/azure-pipelines/linux-gpu-tensorrt-daily-perf-pipeline.yml b/tools/ci_build/github/azure-pipelines/linux-gpu-tensorrt-daily-perf-pipeline.yml index e19cdaaa5035f..21d168b50e6ae 100644 --- a/tools/ci_build/github/azure-pipelines/linux-gpu-tensorrt-daily-perf-pipeline.yml +++ b/tools/ci_build/github/azure-pipelines/linux-gpu-tensorrt-daily-perf-pipeline.yml @@ -17,7 +17,7 @@ parameters: - BIN - name: UseTensorrtOssParser - displayName: Use TensorRT-OSS Parser (not compatible with BIN + displayName: Use TensorRT-OSS Parser (not compatible with BIN) type: boolean default: false @@ -58,92 +58,92 @@ jobs: variables: - name: branchName - ${{ if not(eq(variables['ortBranchOverride'], '' }}: - value: $(ortBranchOverride + ${{ if not(eq(variables['ortBranchOverride'], '')) }}: + value: $(ortBranchOverride) ${{ else }}: - value: $[ replace(variables['Build.SourceBranch'], 'refs/heads/', '' ] + value: $[ replace(variables['Build.SourceBranch'], 'refs/heads/', '') ] - name: trtVersion - ${{ if eq(parameters.TrtVersion, 'BIN' }}: - value: $(tarTrtVersion + ${{ if eq(parameters.TrtVersion, 'BIN') }}: + value: $(tarTrtVersion) ${{ else }}: value: ${{ parameters.TrtVersion }} - name: trtEPOptionsArg - ${{ if not(eq(length(parameters.TrtEPOptions, 0 }}: - value: --trt_ep_options ${{ join(',',parameters.TrtEPOptions }} + ${{ if not(eq(length(parameters.TrtEPOptions), 0)) }}: + value: --trt_ep_options ${{ join(',',parameters.TrtEPOptions) }} - name: cudaEPOptionsArg - ${{ if not(eq(length(parameters.CUDAEPOptions, 0 }}: - value: --cuda_ep_options ${{ join(',',parameters.CUDAEPOptions }} + ${{ if not(eq(length(parameters.CUDAEPOptions), 0)) }}: + value: --cuda_ep_options ${{ join(',',parameters.CUDAEPOptions) }} - name: optional_arguments - value: -a "-a -z -g $(optimizeGraph -b $(bindInputs $(trtEPOptionsArg $(cudaEPOptionsArg" + value: -a "-a -z -g $(optimizeGraph) -b $(bindInputs) $(trtEPOptionsArg) $(cudaEPOptionsArg)" - name: image - value: ort-image-$(Build.BuildId + value: ort-image-$(Build.BuildId) - name: parser - ${{ if eq(parameters.UseTensorrtOssParser, true }}: - value: --use_tensorrt_oss_parser $(parameters.UseTensorrtOssParser }} + ${{ if eq(parameters.UseTensorrtOssParser, true) }}: + value: --use_tensorrt_oss_parser $(parameters.UseTensorrtOssParser) }} steps: - - ${{ if and(eq(parameters.TrtVersion, 'BIN', eq(parameters.UseTensorrtOssParser, false }}: - - script: 'ls -al $(trtBinsDir' + - ${{ if and(eq(parameters.TrtVersion, 'BIN'), eq(parameters.UseTensorrtOssParser, false)) }}: + - script: 'ls -al $(trtBinsDir)' displayName: 'Show available TensorRT .tar.gz packages' - - script: 'cp $(trtBinsDir/TensorRT-$(trtVersion.Linux.x86_64-gnu.cuda-$(tarCudaVersion.tar.gz $(Build.SourcesDirectory/onnxruntime/python/tools/tensorrt/perf/build/' + - script: 'cp $(trtBinsDir)/TensorRT-$(trtVersion).Linux.x86_64-gnu.cuda-$(tarCudaVersion).tar.gz $(Build.SourcesDirectory)/onnxruntime/python/tools/tensorrt/perf/build/' displayName: 'Copy TensorRT .tar.gz package into Docker build directory' - - script: 'python3 $(Build.SourcesDirectory/onnxruntime/python/tools/tensorrt/perf/build/build_image.py -r $(Build.SourcesDirectory -i $(image -b $(branchName -t $(trtVersion -a 75 --install_bin --tar_cuda_version=$(tarCudaVersion --trt_bins_dir=.' - displayName: 'Install TensorRT $(tarTrtVersion from binaries and build latest ORT Image' - workingDirectory: '$(Build.SourcesDirectory/onnxruntime/python/tools/tensorrt/perf/build' + - script: 'python3 $(Build.SourcesDirectory)/onnxruntime/python/tools/tensorrt/perf/build/build_image.py -r $(Build.SourcesDirectory) -i $(image) -b $(branchName) -t $(trtVersion) -a 75 --install_bin --tar_cuda_version=$(tarCudaVersion) --trt_bins_dir=.' + displayName: 'Install TensorRT $(tarTrtVersion) from binaries and build latest ORT Image' + workingDirectory: '$(Build.SourcesDirectory)/onnxruntime/python/tools/tensorrt/perf/build' # Build ORT with TensorRT built-in parser - - ${{ if and(ne(parameters.TrtVersion, 'BIN', eq(parameters.UseTensorrtOssParser, false }}: - - script: 'python3 $(Build.SourcesDirectory/onnxruntime/python/tools/tensorrt/perf/build/build_image.py -r $(Build.SourcesDirectory -i $(image -b $(branchName -t $(trtVersion -a 75' + - ${{ if and(ne(parameters.TrtVersion, 'BIN'), eq(parameters.UseTensorrtOssParser, false)) }}: + - script: 'python3 $(Build.SourcesDirectory)/onnxruntime/python/tools/tensorrt/perf/build/build_image.py -r $(Build.SourcesDirectory) -i $(image) -b $(branchName) -t $(trtVersion) -a 75' displayName: 'Build latest ORT Image with TensorRT built-in parser' - workingDirectory: '$(Build.SourcesDirectory/onnxruntime/python/tools/tensorrt/perf/build' + workingDirectory: '$(Build.SourcesDirectory)/onnxruntime/python/tools/tensorrt/perf/build' # Build ORT with certain version of TensorRT OSS parser - - ${{ if and(ne(parameters.TrtVersion, 'BIN', eq(parameters.UseTensorrtOssParser, true, ne(variables.onnxTensorrtCommitId, '' }}: - - script: 'python3 $(Build.SourcesDirectory/onnxruntime/python/tools/tensorrt/perf/build/build_image.py -r $(Build.SourcesDirectory -i $(image -b $(branchName -t $(trtVersion -a 75 -o $(onnxTensorrtCommitId --use_tensorrt_oss_parser' - displayName: 'Build latest ORT Image with TensorRT OSS parser and commit id $(onnxTensorrtCommitId' - workingDirectory: '$(Build.SourcesDirectory/onnxruntime/python/tools/tensorrt/perf/build' + - ${{ if and(ne(parameters.TrtVersion, 'BIN'), eq(parameters.UseTensorrtOssParser, true), ne(variables.onnxTensorrtCommitId, '')) }}: + - script: 'python3 $(Build.SourcesDirectory)/onnxruntime/python/tools/tensorrt/perf/build/build_image.py -r $(Build.SourcesDirectory) -i $(image) -b $(branchName) -t $(trtVersion) -a 75 -o $(onnxTensorrtCommitId) --use_tensorrt_oss_parser' + displayName: 'Build latest ORT Image with TensorRT OSS parser and commit id $(onnxTensorrtCommitId)' + workingDirectory: '$(Build.SourcesDirectory)/onnxruntime/python/tools/tensorrt/perf/build' # Build ORT with default version of TensorRT OSS parser - - ${{ if and(ne(parameters.TrtVersion, 'BIN', eq(parameters.UseTensorrtOssParser, true, eq(variables.onnxTensorrtCommitId, '' }}: - - script: 'python3 $(Build.SourcesDirectory/onnxruntime/python/tools/tensorrt/perf/build/build_image.py -r $(Build.SourcesDirectory -i $(image -b $(branchName -t $(trtVersion -a 75 --use_tensorrt_oss_parser' + - ${{ if and(ne(parameters.TrtVersion, 'BIN'), eq(parameters.UseTensorrtOssParser, true), eq(variables.onnxTensorrtCommitId, '')) }}: + - script: 'python3 $(Build.SourcesDirectory)/onnxruntime/python/tools/tensorrt/perf/build/build_image.py -r $(Build.SourcesDirectory) -i $(image) -b $(branchName) -t $(trtVersion) -a 75 --use_tensorrt_oss_parser' displayName: 'Build latest ORT Image with TensorRT OSS parser' - workingDirectory: '$(Build.SourcesDirectory/onnxruntime/python/tools/tensorrt/perf/build' + workingDirectory: '$(Build.SourcesDirectory)/onnxruntime/python/tools/tensorrt/perf/build' - - ${{ if eq(parameters.MemTest, true }}: - - script: '$(Build.SourcesDirectory/onnxruntime/python/tools/tensorrt/perf/mem_test/run_mem_test_docker.sh -d $(image -p $(Build.SourcesDirectory/onnxruntime/python/tools/tensorrt/perf/mem_test/ -w /code/ -l false -c ${{ parameters.ConcurrencyTest }}' + - ${{ if eq(parameters.MemTest, true) }}: + - script: '$(Build.SourcesDirectory)/onnxruntime/python/tools/tensorrt/perf/mem_test/run_mem_test_docker.sh -d $(image) -p $(Build.SourcesDirectory)/onnxruntime/python/tools/tensorrt/perf/mem_test/ -w /code/ -l false -c ${{ parameters.ConcurrencyTest }}' displayName: 'Run Memory Test and Concurrency Test' - workingDirectory: '$(Build.SourcesDirectory/onnxruntime/python/tools/tensorrt/perf/mem_test/' + workingDirectory: '$(Build.SourcesDirectory)/onnxruntime/python/tools/tensorrt/perf/mem_test/' - ${{ each option in parameters.ModelGroups }}: - - script: '$(Build.SourcesDirectory/onnxruntime/python/tools/tensorrt/perf/run_perf_docker.sh -d $(image -p $(Build.SourcesDirectory/onnxruntime/python/tools/tensorrt/perf -v $(modelVolume -b true -o ${{option}} -m $(${{option}} -e "$(epList" $(optional_arguments' + - script: '$(Build.SourcesDirectory)/onnxruntime/python/tools/tensorrt/perf/run_perf_docker.sh -d $(image) -p $(Build.SourcesDirectory)/onnxruntime/python/tools/tensorrt/perf -v $(modelVolume) -b true -o ${{option}} -m $(${{option}}) -e "$(epList)" $(optional_arguments)' displayName: '${{option}} perf' - workingDirectory: '$(Build.SourcesDirectory/onnxruntime/python/tools/tensorrt/perf/' + workingDirectory: '$(Build.SourcesDirectory)/onnxruntime/python/tools/tensorrt/perf/' # Prepare and Publish Artifacts - - script: 'mkdir $(Build.SourcesDirectory/Artifact' + - script: 'mkdir $(Build.SourcesDirectory)/Artifact' displayName: 'Prepare Artifacts Directory' - workingDirectory: '$(Build.SourcesDirectory/onnxruntime/python/tools/tensorrt/perf/' - condition: always( + workingDirectory: '$(Build.SourcesDirectory)/onnxruntime/python/tools/tensorrt/perf/' + condition: always() - - ${{ if not(eq(length(parameters.ModelGroups, 0 }}: - - script: 'cp -r $(Build.SourcesDirectory/onnxruntime/python/tools/tensorrt/perf/result/ $(Build.SourcesDirectory/Artifact' + - ${{ if not(eq(length(parameters.ModelGroups), 0)) }}: + - script: 'cp -r $(Build.SourcesDirectory)/onnxruntime/python/tools/tensorrt/perf/result/ $(Build.SourcesDirectory)/Artifact' displayName: 'Copy Artifacts' - workingDirectory: '$(Build.SourcesDirectory/onnxruntime/python/tools/tensorrt/perf/' + workingDirectory: '$(Build.SourcesDirectory)/onnxruntime/python/tools/tensorrt/perf/' - - ${{ if eq(parameters.MemTest, true }}: - - script: 'cp -r $(Build.SourcesDirectory/onnxruntime/python/tools/tensorrt/perf/mem_test/build/result $(Build.SourcesDirectory/Artifact/result_mem_test' + - ${{ if eq(parameters.MemTest, true) }}: + - script: 'cp -r $(Build.SourcesDirectory)/onnxruntime/python/tools/tensorrt/perf/mem_test/build/result $(Build.SourcesDirectory)/Artifact/result_mem_test' displayName: 'Copy Artifacts' - workingDirectory: '$(Build.SourcesDirectory/onnxruntime/python/tools/tensorrt/perf/' - condition: always( + workingDirectory: '$(Build.SourcesDirectory)/onnxruntime/python/tools/tensorrt/perf/' + condition: always() - script: 'python3 -m pip install pandas azure-kusto-data[pandas] azure-kusto-ingest[pandas] coloredlogs' displayName: 'Install dashboard dependencies' @@ -162,11 +162,11 @@ jobs: scriptLocation: inlineScript scriptType: bash inlineScript: | - short_hash=$(git rev-parse --short HEAD && - commit_date=$(git log -1 --date=iso-strict --pretty=format:%cd && - python3 $(Build.SourcesDirectory/onnxruntime/python/tools/tensorrt/perf/parse_mem_concurrency_test.py -r $(Build.SourcesDirectory/Artifact/result_mem_test -c $short_hash -d $commit_date -u "$(reportUrl?buildId=$(Build.BuildId" -t $(trtVersion -b $(branchName --kusto_conn $(kustoConn --database $(database $(parser + short_hash=$(git rev-parse --short HEAD) && + commit_date=$(git log -1 --date=iso-strict --pretty=format:%cd) && + python3 $(Build.SourcesDirectory)/onnxruntime/python/tools/tensorrt/perf/parse_mem_concurrency_test.py -r $(Build.SourcesDirectory)/Artifact/result_mem_test -c $short_hash -d $commit_date -u "$(reportUrl)?buildId=$(Build.BuildId)" -t $(trtVersion) -b $(branchName) --kusto_conn $(kustoConn) --database $(database) $(parser) - - ${{ if eq(parameters.PostToDashboard, true }}: + - ${{ if eq(parameters.PostToDashboard, true) }}: - script: 'python3 -m pip install pandas azure-kusto-data[pandas] azure-kusto-ingest[pandas] coloredlogs' displayName: 'Install dashboard dependencies' @@ -185,17 +185,17 @@ jobs: scriptLocation: inlineScript scriptType: bash inlineScript: | - short_hash=$(git rev-parse --short HEAD && - commit_date=$(git log -1 --date=iso-strict --pretty=format:%cd && - python3 $(Build.SourcesDirectory/onnxruntime/python/tools/tensorrt/perf/post.py -r $(Build.SourcesDirectory/Artifact/result -c $short_hash -d $commit_date -u "$(reportUrl?buildId=$(Build.BuildId" -t $(trtVersion -b $(branchName --kusto_conn $(kustoConn --database $(database $(parser + short_hash=$(git rev-parse --short HEAD) && + commit_date=$(git log -1 --date=iso-strict --pretty=format:%cd) && + python3 $(Build.SourcesDirectory)/onnxruntime/python/tools/tensorrt/perf/post.py -r $(Build.SourcesDirectory)/Artifact/result -c $short_hash -d $commit_date -u "$(reportUrl)?buildId=$(Build.BuildId)" -t $(trtVersion) -b $(branchName) --kusto_conn $(kustoConn) --database $(database) $(parser) - task: PublishBuildArtifacts@1 inputs: - pathtoPublish: '$(Build.SourcesDirectory/Artifact' - artifactName: 'result-$(Build.BuildNumber' + pathtoPublish: '$(Build.SourcesDirectory)/Artifact' + artifactName: 'result-$(Build.BuildNumber)' - template: templates/component-governance-component-detection-steps.yml parameters : condition : 'succeeded' - - template: templates/clean-agent-build-directory-step.yml + - template: templates/clean-agent-build-directory-step.yml \ No newline at end of file From 5ef4b3f57d546f93d57a401bc40f4190467344a9 Mon Sep 17 00:00:00 2001 From: yf711 Date: Fri, 6 Dec 2024 12:35:59 -0800 Subject: [PATCH 5/5] revert to cuda 12.5 as CI GPU driver limit --- onnxruntime/python/tools/tensorrt/perf/build/build_image.py | 2 +- .../linux-gpu-tensorrt-daily-perf-pipeline.yml | 4 ++-- .../github/linux/docker/Dockerfile.ubuntu_cuda12_tensorrt10 | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/onnxruntime/python/tools/tensorrt/perf/build/build_image.py b/onnxruntime/python/tools/tensorrt/perf/build/build_image.py index ac98fd0be44ea..541dc4978dad1 100644 --- a/onnxruntime/python/tools/tensorrt/perf/build/build_image.py +++ b/onnxruntime/python/tools/tensorrt/perf/build/build_image.py @@ -18,7 +18,7 @@ "8.6_cuda11.8_cudnn8": "tools/ci_build/github/linux/docker/Dockerfile.ubuntu_cuda11_8_tensorrt8_6", "8.6_cuda12.3_cudnn9": "tools/ci_build/github/linux/docker/Dockerfile.ubuntu_cuda12_3_tensorrt8_6", "10.7_cuda11.8_cudnn8": "tools/ci_build/github/linux/docker/Dockerfile.ubuntu_cuda11_tensorrt10", - "10.7_cuda12.6_cudnn9": "tools/ci_build/github/linux/docker/Dockerfile.ubuntu_cuda12_tensorrt10", + "10.7_cuda12.5_cudnn9": "tools/ci_build/github/linux/docker/Dockerfile.ubuntu_cuda12_tensorrt10", "BIN": "tools/ci_build/github/linux/docker/Dockerfile.ubuntu_tensorrt_bin", } diff --git a/tools/ci_build/github/azure-pipelines/linux-gpu-tensorrt-daily-perf-pipeline.yml b/tools/ci_build/github/azure-pipelines/linux-gpu-tensorrt-daily-perf-pipeline.yml index 21d168b50e6ae..9286b5a54ac27 100644 --- a/tools/ci_build/github/azure-pipelines/linux-gpu-tensorrt-daily-perf-pipeline.yml +++ b/tools/ci_build/github/azure-pipelines/linux-gpu-tensorrt-daily-perf-pipeline.yml @@ -8,12 +8,12 @@ parameters: - name: TrtVersion displayName: TensorRT Version type: string - default: 10.7_cuda12.6_cudnn9 + default: 10.7_cuda12.5_cudnn9 values: - 8.6_cuda11.8_cudnn8 - 8.6_cuda12.3_cudnn9 - 10.7_cuda11.8_cudnn8 - - 10.7_cuda12.6_cudnn9 + - 10.7_cuda12.5_cudnn9 - BIN - name: UseTensorrtOssParser diff --git a/tools/ci_build/github/linux/docker/Dockerfile.ubuntu_cuda12_tensorrt10 b/tools/ci_build/github/linux/docker/Dockerfile.ubuntu_cuda12_tensorrt10 index 3798f04a85e6a..781f0647a084b 100644 --- a/tools/ci_build/github/linux/docker/Dockerfile.ubuntu_cuda12_tensorrt10 +++ b/tools/ci_build/github/linux/docker/Dockerfile.ubuntu_cuda12_tensorrt10 @@ -5,7 +5,7 @@ # Dockerfile to run ONNXRuntime with TensorRT integration # Build base image with required system packages -FROM nvidia/cuda:12.6.3-cudnn-devel-ubuntu20.04 AS base +FROM nvidia/cuda:12.5.1-cudnn-devel-ubuntu20.04 AS base # The local directory into which to build and install CMAKE ARG ONNXRUNTIME_LOCAL_CODE_DIR=/code