DerryHub / BEVFormer_tensorrt

BEVFormer inference on TensorRT, including INT8 Quantization and Custom TensorRT Plugins (float/half/half2/int8).
Apache License 2.0
432 stars 71 forks source link

deserialize_cuda_engine(): incompatible function arguments #46

Closed shaoqb closed 1 year ago

shaoqb commented 1 year ago

[04/18/2023-10:51:12] [TRT] [I] MatMul_2931: broadcasting input1 to make tensors conform, dims(input0)=[900,1,256][NONE] dims(input1)=[1,256,256][NONE]. [04/18/2023-10:51:12] [TRT] [I] MatMul_2935: broadcasting input1 to make tensors conform, dims(input0)=[900,1,256][NONE] dims(input1)=[1,256,10][NONE]. [04/18/2023-10:51:13] [TRT] [E] 2: [sliceNode.cpp::symbolicExecute::168] Error Code 2: Internal Error (Assertion input.rank() == 1 failed. ) [04/18/2023-10:51:13] [TRT] [E] 2: [builder.cpp::buildSerializedNetwork::636] Error Code 2: Internal Error (Assertion engine != nullptr failed. ) Traceback (most recent call last): File "tools/bevformer/onnx2trt.py", line 255, in main() File "tools/bevformer/onnx2trt.py", line 243, in main build_engine( File "/data/project/BEVFormer_tensorrt-main/./det2trt/convert/onnx2tensorrt.py", line 63, 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.tensorrt.Runtime, serialized_engine: buffer) -> tensorrt.tensorrt.ICudaEngine

Invoked with: <tensorrt.tensorrt.Runtime object at 0x7ff34e8d5230>, Non

shaoqb commented 1 year ago

Tensorrt 8.4.3.1 cudnn 8.6.0 CUDA-11.6 onnx 1.12.0 torch 1.12.1

DerryHub commented 1 year ago

Please provide the full log and explain which command you ran.

shaoqb commented 1 year ago

i run "sh samples/bevformer/plugin/tiny/onnx2trt.sh" and the log is here log.txt

by the way,and i can succeed run " sh samples/bevformer/tiny/onnx2trt.sh"

DerryHub commented 1 year ago

You can try to install TensorRT-8.5.1.7 and rebuild the tensorrt ops.

gaoyelu1996 commented 1 year ago

same problem, did you solve it?