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

Dynamic Shape infer #1

Open
panshaohua opened this issue Jun 24, 2022 · 2 comments
Open

Dynamic Shape infer #1

panshaohua opened this issue Jun 24, 2022 · 2 comments

Comments

@panshaohua
Copy link

你好,大神。请教一下,TensorRT 的 动态shape 推理相对静态shape,显存是不是一定会增加?如果是,有没有方法优化这个显存占用增加的现象。谢谢

@DataXujing
Copy link
Member

如果你是静态的shape,我不建议用Dynamic shape的TRT plan去推断,我自己觉得这种情况下Dynamic shape的模型推断速度不够快,他要做shape的推断,同时优化过程选择的kernel,Dynamic和Static可能也是不一样的,这导致Dynamic时速度可能会低于Static的model.

我自己的原则是能不用Dynamic shape就不用,除非万不得已.

至于显存是不是一定会增加?这个问题,我之前没有遇到过这种情况,抱歉。

@panshaohua
Copy link
Author

好的,非常感谢你的回复。

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

No branches or pull requests

2 participants