Make sure the version of TensorRT deserializing an engine is the same as the version of TensorRT which serialized the engine. You may need to rebuild your engine and write it to disk again.
The engine is build on TensorRT 5.1.5 and also, installed TRT 5.1.5. It still gives me -
ERROR: The engine plan file is not compatible with this version of TensorRT, expecting library version 5.1.5 got 5.0.2, please rebuild.
I also made sure to check if there is any installation TRT 5.0.2 on my PC , So I purged whole TRT, and reinstalled 5.1.5, still getting the same error.
I am also facing the same issue, TensorRT 5.1.6 is by default installed on Jetson Nano, but 5.1.6 is not available for desktop, So I installed 5.1.5 and it is showing similar error.
[TensorRT] ERROR: The engine plan file is not compatible with this version of TensorRT, expecting library version 5.1.5 got 5.1.6, please rebuild.
I faced the same problem when trying to run the model converted from Tensorflow frozen graph to TensorRT .bin file.
The problem is that the frozen graph was converted to .bin file in Jetson Nano device, which have the TensorRT version 5.1.6…
So the .bin file cannot be loaded correctly on my laptop having TensorRT version 5.1.5.
I fixed it by re-converting model from frozen graph to .bin file on laptop again and everything is working fine now.