Error Code 1: Serialization

Description

When I try to run Using PyTorch through ONNX from TensorRT github, I receive the following error:

Error Code 1: Serialization (Serialization assertion stdVersionRead == serializationVersion failed.Version tag does not match. Note: Current Version: 213, Serialized Engine Version: 237))
This happens when I execute the following line engine = runtime.deserialize_cuda_engine(f.read()

Environment

Docker of tensorrt: Tag 22.09-py3

In the error it says it, and in many places on the internet they say it, if you serialize and desserialize with different versions of tensorrt it can fail.

But I have passed a Pytorch model to onnx, then passed it to tensorrt and then tried to do inference, all in the same container, so everything should have the same version of tensorrt.

Hi,

Could you please share more with us the more details,
GPU details, CUDA/Nvidia driver version, and error logs.

Also please share with us the issue repro ONNX model/script and steps to try from our end for better debugging.

Thank you.