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

update trt workspace size param #44469

Merged
merged 8 commits into from
Aug 5, 2022

Conversation

zhangjun
Copy link
Contributor

@zhangjun zhangjun commented Jul 20, 2022

PR types

Others

PR changes

Others

Describe

use int64_t instead of int to set GPU workspace size for TensorRT engine. Paddle's AttrType do not support unsigned long data type, so use int64_t instead.
refer to TensorRT

TRT_DEPRECATED void setMaxWorkspaceSize(std::size_t workspaceSize) noexcept
{
    mImpl->setMaxWorkspaceSize(workspaceSize);
}

This API will be deprecated in TensorRT 8.3

@paddle-bot
Copy link

paddle-bot bot commented Jul 20, 2022

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

Copy link
Contributor

@Shixiaowei02 Shixiaowei02 left a comment

Choose a reason for hiding this comment

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

Agree operator definition modification

@zhangjun
Copy link
Contributor Author

API 文档更新见 PaddlePaddle/Paddle-Inference-Demo#333

@@ -523,7 +523,7 @@ struct PD_INFER_DECL AnalysisConfig {
/// quantization).
///
///
void EnableTensorRtEngine(int workspace_size = 1 << 20,
void EnableTensorRtEngine(int64_t workspace_size = 1 << 30,

Choose a reason for hiding this comment

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

文档里面是20.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

文档已修改

@jiweibo jiweibo merged commit bdce552 into PaddlePaddle:develop Aug 5, 2022
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.

4 participants