ERROR: ../tSafe/coreReadArchive.cpp (38) - Serialization Error in verifyHeader: 0 (Version tag does

created at 08-20-2021 views: 18

description

Error when Tenserrt trt uses engine infer

Problem
Build YOLOV5s model, and try to use trt reasoning service, an error occurs

[TensorRT] ERROR: ../rtSafe/coreReadArchive.cpp (38) - Serialization Error in verifyHeader: 0 (Version tag does not match)
[TensorRT] ERROR: INVALID_STATE: std::exception
[TensorRT] ERROR: INVALID_CONFIG: Deserialize the cuda engine failed.

reason

The version of tensorrt used when compiling the engine is inconsistent with the version of tensorrt used when using trt inference, and it needs to be consistent.

solution

  • Confirm the tensorrt version of each link to ensure consistency;
  • Look at the dynamic link library of the yolo compiled file
    • ldd yolo

After the modification, it runs normally, and the speed becomes very fast.

created at:08-20-2021
edited at: 08-20-2021: