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

使用trtexec工具将onnx转换trt问题 #22

Open
Yi-hash1 opened this issue Apr 18, 2024 · 1 comment
Open

使用trtexec工具将onnx转换trt问题 #22

Yi-hash1 opened this issue Apr 18, 2024 · 1 comment

Comments

@Yi-hash1
Copy link

有警告Some tactics do not have sufficient workspace memory to run. Increasing workspace size may increase performance, please check verbose output.,该警告会影响模型的推理速度或精度吗

@Melody-Zhou
Copy link
Owner

可能会影响模型的推理速度,但我一般是忽略的,trtexec 允许通过 --workspace=N (N 是以 MB 为单位的数值)来指定工作空间的大小,你可以尝试增加这个值,例如:

trtexec --onnx=model.onnx --saveEngine=model.trt --workspace=512

你可以根据可用的 GPU 内存来调整这个数值,一般来说增加工作空间可用使 TensorRT 有更多的内容来尝试不同的计算策略,从而可能提升性能。有个前提是确保你的硬件配置(GPU 的内存)可用支持更大的工作空间

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