Skip to content

Remove explicit batch network flag for TRT 10+ - #24298

Merged
Yifan Li (yf711) merged 1 commit into
microsoft:mainfrom
kevinch-nv:remove-explicit-batch
Apr 8, 2025
Merged

Yifan Li (yf711) merged 1 commit into
microsoft:mainfrom
kevinch-nv:remove-explicit-batch

Conversation

@kevinch-nv

Copy link
Copy Markdown
Contributor

Description

nvinfer1::NetworkDefinitionCreationFlag::kEXPLICIT_BATCH has been deprecated since 10.0 and is always implicitly set for versions 10.0+. Change the EP code to only set this flag for TRT versions 8 and below.

Motivation and Context

Removes deprecated API usages in the TRT EP code.

Signed-off-by: Kevin Chen <kevinch@nvidia.com>
@yf711

Copy link
Copy Markdown
Contributor

/azp run Linux QNN CI Pipeline, Win_TRT_Minimal_CUDA_Test_CI, Windows ARM64 QNN CI Pipeline, Windows GPU Doc Gen CI Pipeline, Windows x64 QNN CI Pipeline

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 5 pipeline(s).

@yf711 Yifan Li (yf711) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@yf711
Yifan Li (yf711) merged commit 4edada6 into microsoft:main Apr 8, 2025
zhaoxul-qti pushed a commit to CodeLinaro/onnxruntime that referenced this pull request Apr 17, 2025
### Description
`nvinfer1::NetworkDefinitionCreationFlag::kEXPLICIT_BATCH` [has been
deprecated since
10.0](https://docs.nvidia.com/deeplearning/tensorrt/latest/_static/c-api/namespacenvinfer1.html#aa8f406be96c14b7dbea548cf19f09a08)
and is always implicitly set for versions 10.0+. Change the EP code to
only set this flag for TRT versions 8 and below.

### Motivation and Context

Removes deprecated API usages in the TRT EP code.

Signed-off-by: Kevin Chen <kevinch@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants