Skip to content

Commit

Permalink
test adding oss option to trt CIs
Browse files Browse the repository at this point in the history
  • Loading branch information
yf711 committed Jul 18, 2024
1 parent e44613d commit 85d6dde
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ parameters:
values:
- 11.8
- 12.2
- name: UseTensorrtOssParser
displayName: Use TensorRT-OSS Parser
type: boolean
default: false

variables:
- name: docker_base_image
Expand All @@ -46,6 +50,12 @@ variables:
value: 10.2.0.19-1.cuda11.8
${{ if eq(parameters.CudaVersion, '12.2') }}:
value: 10.2.0.19-1.cuda12.5
- name: parser
${{ if eq(parameters.UseTensorrtOssParser, true) }}:
value: "--use_tensorrt_oss_parser"
${{ if eq(parameters.UseTensorrtOssParser, false) }}:
value: ""


jobs:
- job: Linux_Build
Expand Down Expand Up @@ -100,7 +110,7 @@ jobs:
-e NIGHTLY_BUILD \
-e BUILD_BUILDNUMBER \
-e CCACHE_DIR=/cache -w /onnxruntime_src \
onnxruntimetensorrt86gpubuild tools/ci_build/github/linux/build_tensorrt_ci.sh
onnxruntimetensorrt86gpubuild tools/ci_build/github/linux/build_tensorrt_ci.sh ${{ variables.parser }}
workingDirectory: $(Build.SourcesDirectory)

- template: templates/explicitly-defined-final-tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,18 @@ pr:
- 'js/web'
- 'onnxruntime/core/providers/js'
#### end trigger ####
parameters:
- name: UseTensorrtOssParser
displayName: Use TensorRT-OSS Parser
type: boolean
default: false

variables:
- name: parser
${{ if eq(parameters.UseTensorrtOssParser, true) }}:
value: "--use_tensorrt_oss_parser"
${{ if eq(parameters.UseTensorrtOssParser, false) }}:
value: ""

jobs:
- job: 'build'
Expand Down Expand Up @@ -55,7 +67,7 @@ jobs:
WithCache: True
Today: $(TODAY)
AdditionalKey: "gpu-tensorrt | RelWithDebInfo"
BuildPyArguments: '--config RelWithDebInfo --parallel --use_binskim_compliant_compile_flags --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --build_shared_lib --update --cmake_generator "Visual Studio 17 2022" --build_wheel --enable_onnx_tests --use_tensorrt --tensorrt_home="$(Agent.TempDirectory)\TensorRT-10.2.0.19.Windows10.x86_64.cuda-11.8" --cuda_home="$(Agent.TempDirectory)\v11.8" --cmake_extra_defines CMAKE_CUDA_ARCHITECTURES=86'
BuildPyArguments: '--config RelWithDebInfo ${{ variables.parser }} --parallel --use_binskim_compliant_compile_flags --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --build_shared_lib --update --cmake_generator "Visual Studio 17 2022" --build_wheel --enable_onnx_tests --use_tensorrt --tensorrt_home="$(Agent.TempDirectory)\TensorRT-10.2.0.19.Windows10.x86_64.cuda-11.8" --cuda_home="$(Agent.TempDirectory)\v11.8" --cmake_extra_defines CMAKE_CUDA_ARCHITECTURES=86'
MsbuildArguments: $(MsbuildArguments)
BuildArch: 'x64'
Platform: 'x64'
Expand All @@ -75,7 +87,7 @@ jobs:
del wheel_filename_file
python.exe -m pip install -q --upgrade %WHEEL_FILENAME%
set PATH=$(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo;%PATH%
python $(Build.SourcesDirectory)\tools\ci_build\build.py --config RelWithDebInfo --use_binskim_compliant_compile_flags --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --build_shared_lib --test --cmake_generator "Visual Studio 17 2022" --build_wheel --enable_onnx_tests --use_tensorrt --tensorrt_home="$(Agent.TempDirectory)\TensorRT-10.2.0.19.Windows10.x86_64.cuda-11.8" --cuda_home="$(Agent.TempDirectory)\v11.8" --cmake_extra_defines CMAKE_CUDA_ARCHITECTURES=75
python $(Build.SourcesDirectory)\tools\ci_build\build.py --config RelWithDebInfo ${{ variables.parser }} --use_binskim_compliant_compile_flags --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --build_shared_lib --test --cmake_generator "Visual Studio 17 2022" --build_wheel --enable_onnx_tests --use_tensorrt --tensorrt_home="$(Agent.TempDirectory)\TensorRT-10.2.0.19.Windows10.x86_64.cuda-11.8" --cuda_home="$(Agent.TempDirectory)\v11.8" --cmake_extra_defines CMAKE_CUDA_ARCHITECTURES=86
workingDirectory: '$(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo'
displayName: 'Run tests'

0 comments on commit 85d6dde

Please sign in to comment.