TesorRT10模型转换时的错误记录并解决

由于为个人安装的是TensorRT10,有些参数可能就不用了,在模型转换的时候会出现错误(本文章长期更新)

特别注意onnxruntime_gpu的安装,他是与CUDA和CUDANN版本进行绑定的
安装时候参考网址

错误1

YOLOv8模型转换的时候,出现了
attributeerror: 'tensorrt.tensorrt.builder' object has no attribute 'max_workspace_size'

这个是由于TensoRT8.4版本之后,取消了这个max_workspace_size,这个可以这样修改

复制代码
1注销掉
        #config.max_workspace_size = self.args.workspace * 1 << 30
2、紧接其后,添加这个
        config.set_memory_pool_limit(trt.MemoryPoolType.WORKSPACE, 1<<30)  # fix TRT 8.4 deprecation notice
3、write file的修改为这个
         with builder.build_serialized_network(network, config) as engine, open(f, 'wb') as t:
 4、写文件修改为:
             #t.write(engine.serialize())
            t.write(engine)
相关推荐
小米的修行之路18 天前
NVIDI核心板cuda, cudnn,tensorrt安装方法
nvidia·tensorrt·cuda·cudnn
xifangge202518 天前
[报错] SpringBoot 启动报错:Port 8080 was already in use 完美解决(Windows/Mac/Linux)
java·windows·spring boot·macos·错误解决
self-motivation20 天前
在jetson thor上高效部署π0.5和yolo模型
pytorch·yolo·tensorrt·π0.5·jetson thor
给算法爸爸上香1 个月前
yolo目标检测线程池高性能视频tensorrt推理(每秒1000+帧)
yolo·目标检测·音视频·线程池·tensorrt
椒颜皮皮虾2 个月前
TensorRtSharp:在 C# 世界中释放 GPU 推理的极致性能
c#·tensorrt
给算法爸爸上香2 个月前
yolo tensorrt视频流检测软解码和硬解码
yolo·ffmpeg·视频编解码·tensorrt·nvcodec
Tipriest_2 个月前
TensorRT介绍与示例代码学习
tensorrt
Arnold-FY-Chen2 个月前
模型部分量化后用tensorrt转换engine时遇到的问题
tensorrt·mismatched type·constant tensor·setprecision
破烂pan2 个月前
TensorRT-LLM部署Qwen3-14B
llm·tensorrt·qwen3-14b
雪天鱼3 个月前
TensorRT 10.14.1 初体验:介绍、安装与Demo尝试
tensorrt·ai模型推理·深度学习环境搭建