Tensorrt笔记
1、使用 tensorrt测试
1、把模型导出成 ONNX 格式。
2、安装 TensorRT 和 CUDA。注意二者和 driver 的版本号对应,我用的是 ZIP 安装:Installation Guide :: NVIDIA Deep Learning TensorRT Documentation,跟着这个把流程走一遍。
3、设置优化参数,使用 TensorRT 把 ONNX 优化成 Engine,得到当前硬件上优化后的模型。
4、使用 TensorRT Runtime API 进行 inference。
官方文档:Developer Guide :: NVIDIA Deep Learning TensorRT Documentation,写的很详细了。