How Do I Optimize My Python Performance?
-
pycuda 支持 Python Buffer Protocol,即允许高效地访问内存数据。
protobuf全称为ProtoBuffer,是由Goodle开发的一种可以实现内存与硬盘文件交换的协议接口,说白了就是一种可以我们自己定规则协议的一套工具,我们通过自己编写统一的参数描述文件proto,然后利用protoc编译就能生成可以读取信息的代码,非常方便,其中ONNX的协议就是使用Protobuf开发的。
-
Tool:trtexec
If you have a model saved as an onNX file, or if you have a network description in a Caffe prototxt format, you can use the trtexec tool to test the performance of running inference on your network using TensorRT.
-
CPU Timing
-
CUDA Events
-
Built-In TensorRT Profiling
-
CUDA Profiling
-
Memory
- Caffe的转换器 Caffe-Parse,Tensorflow 的转换器,都有些落后了,不推荐使用。
- 推荐 ONNX2TensorRT,TensorRT对ONNX的支持最好。
- 在深度学习框架中,TensorRT对Pytorch的支持更为友好。
- 理论上 95%的模型 都可以转换为TensorRT,条条大路通罗马嘛。只不过有些模型可能转换的难度比较大。如果遇到一个无法转换的模型,先不要绝望,再想想,再想想,看看能不能通过其他方式绕过去。
实现TensorRT自定义插件(plugin)自由!
5. 用tensorRT提高模型精度How Do I Improve My Model Accuracy?



