-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TensorRT EP] New CIs to test TRT+minimal CUDA build (#23028)
### Description <!-- Describe your changes. --> New CI: [Linux_TRT_Minimal_CUDA_Test_CI](https://dev.azure.com/onnxruntime/onnxruntime/_build?definitionId=230&_a=summary) and [Win_TRT_Minimal_CUDA_Test_CI ](https://dev.azure.com/onnxruntime/onnxruntime/_build?definitionId=231) Setting config for new CI to monitor if there's no issue to build ORT-TRTEP with minimal CUDA * yaml content is following Linux TRT CI yaml, with different build arg/cache name * build arg is following [[TensorRT EP] Enable a minimal CUDA EP compilation without kernels](#19052 (comment)) ### Motivation and Context <!-- - Why is this change required? What problem does it solve? - If it fixes an open issue, please link to the issue here. --> Monitor if user is able to build ORT-TRTEP-minimalCUDA without any blocker (which takes ~30min to build)
- Loading branch information
Showing
4 changed files
with
209 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
108 changes: 108 additions & 0 deletions
108
tools/ci_build/github/azure-pipelines/linux-gpu-tensorrt-cuda-minimal-ci-pipeline.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
##### start trigger Don't edit it manually, Please do edit set-trigger-rules.py #### | ||
### please do rerun set-trigger-rules.py ### | ||
trigger: | ||
branches: | ||
include: | ||
- main | ||
- rel-* | ||
paths: | ||
exclude: | ||
- docs/** | ||
- README.md | ||
- CONTRIBUTING.md | ||
- BUILD.md | ||
- 'js/web' | ||
- 'onnxruntime/core/providers/js' | ||
pr: | ||
branches: | ||
include: | ||
- main | ||
- rel-* | ||
paths: | ||
exclude: | ||
- docs/** | ||
- README.md | ||
- CONTRIBUTING.md | ||
- BUILD.md | ||
- 'js/web' | ||
- 'onnxruntime/core/providers/js' | ||
#### end trigger #### | ||
parameters: | ||
- name: CudaVersion | ||
displayName: CUDA version | ||
type: string | ||
default: '12.2' | ||
values: | ||
- 11.8 | ||
- 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:20241120.3 | ||
${{ if eq(parameters.CudaVersion, '12.2') }}: | ||
value: onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda12_x64_ubi8_gcc12:20241120.3 | ||
- name: linux_trt_version | ||
${{ if eq(parameters.CudaVersion, '11.8') }}: | ||
value: ${{ variables.linux_trt_version_cuda11 }} | ||
${{ if eq(parameters.CudaVersion, '12.2') }}: | ||
value: ${{ variables.linux_trt_version_cuda12 }} | ||
|
||
jobs: | ||
- job: Linux_Build | ||
timeoutInMinutes: 180 | ||
variables: | ||
skipComponentGovernanceDetection: true | ||
ALLOW_RELEASED_ONNX_OPSET_ONLY: '1' | ||
ORT_CACHE_DIR: '$(Agent.TempDirectory)/ort/ccache' | ||
TODAY: $[format('{0:dd}{0:MM}{0:yyyy}', pipeline.startTime)] | ||
workspace: | ||
clean: all | ||
pool: onnxruntime-tensorrt-linuxbuild-T4 | ||
steps: | ||
- task: mspremier.PostBuildCleanup.PostBuildCleanup-task.PostBuildCleanup@3 | ||
displayName: 'Clean Agent Directories' | ||
condition: always() | ||
|
||
- checkout: self | ||
clean: true | ||
submodules: none | ||
|
||
- template: templates/get-docker-image-steps.yml | ||
parameters: | ||
Dockerfile: tools/ci_build/github/linux/docker/Dockerfile.manylinux2_28_cuda | ||
Context: tools/ci_build/github/linux/docker | ||
DockerBuildArgs: " | ||
--network=host | ||
--build-arg BASEIMAGE=${{ variables.docker_base_image }} | ||
--build-arg TRT_VERSION=${{ variables.linux_trt_version }} | ||
--build-arg BUILD_UID=$( id -u ) | ||
" | ||
Repository: onnxruntimetensorrtcudaminimalbuild | ||
|
||
- template: templates/linux-build-step-with-cache.yml | ||
parameters: | ||
WithCache: true | ||
Today: $(TODAY) | ||
AdditionalKey: gpu_tensorrt_cuda_minimal | ||
CacheDir: '$(ORT_CACHE_DIR)' | ||
BuildStep: | ||
- task: CmdLine@2 | ||
inputs: | ||
script: | | ||
docker run --gpus all --rm \ | ||
--volume /data/onnx:/data/onnx:ro \ | ||
--volume $(Build.SourcesDirectory):/onnxruntime_src \ | ||
--volume $(Build.BinariesDirectory):/build \ | ||
--volume /data/models:/build/models:ro \ | ||
--volume $HOME/.onnx:/home/onnxruntimedev/.onnx \ | ||
--volume $(ORT_CACHE_DIR):/cache \ | ||
-e ALLOW_RELEASED_ONNX_OPSET_ONLY=0 \ | ||
-e NIGHTLY_BUILD \ | ||
-e BUILD_BUILDNUMBER \ | ||
-e CCACHE_DIR=/cache -w /onnxruntime_src \ | ||
onnxruntimetensorrtcudaminimalbuild tools/ci_build/github/linux/build_tensorrt_ci.sh --cuda_minimal=ON | ||
workingDirectory: $(Build.SourcesDirectory) | ||
|
||
- template: templates/explicitly-defined-final-tasks.yml |
86 changes: 86 additions & 0 deletions
86
tools/ci_build/github/azure-pipelines/win-gpu-tensorrt-cuda-minimal-ci-pipeline.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
##### start trigger Don't edit it manually, Please do edit set-trigger-rules.py #### | ||
### please do rerun set-trigger-rules.py ### | ||
trigger: | ||
branches: | ||
include: | ||
- main | ||
- rel-* | ||
paths: | ||
exclude: | ||
- docs/** | ||
- README.md | ||
- CONTRIBUTING.md | ||
- BUILD.md | ||
- 'js/web' | ||
- 'onnxruntime/core/providers/js' | ||
pr: | ||
branches: | ||
include: | ||
- main | ||
- rel-* | ||
paths: | ||
exclude: | ||
- docs/** | ||
- README.md | ||
- CONTRIBUTING.md | ||
- BUILD.md | ||
- 'js/web' | ||
- 'onnxruntime/core/providers/js' | ||
#### end trigger #### | ||
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 }} | ||
|
||
jobs: | ||
- job: 'build' | ||
pool: 'onnxruntime-Win2022-GPU-A10' | ||
variables: | ||
MsbuildArguments: '-detailedsummary -maxcpucount -consoleloggerparameters:PerformanceSummary' | ||
EnvSetupScript: setup_env_trt.bat | ||
skipComponentGovernanceDetection: true | ||
TODAY: $[format('{0:dd}{0:MM}{0:yyyy}', pipeline.startTime)] | ||
timeoutInMinutes: 150 | ||
workspace: | ||
clean: all | ||
steps: | ||
- template: templates/jobs/win-ci-prebuild-steps.yml | ||
parameters: | ||
EnvSetupScript: $(EnvSetupScript) | ||
DownloadCUDA: true | ||
DownloadTRT: true | ||
BuildArch: 'x64' | ||
BuildConfig: RelWithDebInfo | ||
MachinePool: 'onnxruntime-Win2022-GPU-A10' | ||
WithCache: true | ||
Today: $(Today) | ||
|
||
- template: templates/jobs/win-ci-build-steps.yml | ||
parameters: | ||
WithCache: True | ||
Today: $(TODAY) | ||
AdditionalKey: "gpu_tensorrt_cuda_minimal | 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)\${{ variables.win_trt_folder }}" --cuda_home="$(Agent.TempDirectory)\v${{ parameters.CudaVersion }}" --cmake_extra_defines CMAKE_CUDA_ARCHITECTURES=86 --enable_cuda_minimal_build' | ||
MsbuildArguments: $(MsbuildArguments) | ||
BuildArch: 'x64' | ||
Platform: 'x64' | ||
BuildConfig: RelWithDebInfo | ||
|
||
- task: PythonScript@0 | ||
displayName: 'Build wheel' | ||
inputs: | ||
scriptPath: '$(Build.SourcesDirectory)\setup.py' | ||
arguments: 'bdist_wheel' | ||
workingDirectory: '$(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters