Susan19900316 / yolov5_tensorrt_int8

yolov5 tensorrt int8量化方法汇总
55 stars 13 forks source link

int8_build engine失败 #14

Open zmtttt opened 3 months ago

zmtttt commented 3 months ago

Completed parsing of ONNX file Building an engine from file /home/zhaomt/com/yolov5int8/yolov5/yolov5s.onnx; this may take a while... wrong [04/25/2024-17:36:20] [TRT] [E] 1: Unexpected exception _Map_base::at planing----- None Failed to build serialized network plan. Traceback (most recent call last): File "/home/zhaomt/com/yolov5int8/yolov5/onnx2trt_ptq2.py", line 200, in main(onnx_file_path, engine_file_path, cali_img_path, mode='INT8') File "/home/zhaomt/com/yolov5int8/yolov5/onnx2trt_ptq2.py", line 191, in main get_engine(onnx_file_path, engine_file_path, cali_img_path, mode) File "/home/zhaomt/com/yolov5int8/yolov5/onnx2trt_ptq2.py", line 184, in get_engine return build_engine() ^^^^^^^^^^^^^^ File "/home/zhaomt/com/yolov5int8/yolov5/onnx2trt_ptq2.py", line 169, in build_engine engine = runtime.deserialize_cuda_engine(plan) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: deserialize_cuda_engine(): incompatible function arguments. The following argument types are supported:

  1. (self: tensorrt_bindings.tensorrt.Runtime, serialized_engine: buffer) -> tensorrt_bindings.tensorrt.ICudaEngine

Invoked with: <tensorrt_bindings.tensorrt.Runtime object at 0x7f630e9e3af0>, None

是版本问题吗???我的是tensort是8.6.1

zmtttt commented 3 months ago

是onnx2trt_ptq这个