MagicTag assertion Failed! Deserialization of engine failed!

Description

I am trying to use TensorRT for instance segmentation application. For this I have saved the built engine and subsequently when I try to load the saved .engine file it says “Deserialization Failed. Internal error. Magic Tag assertion failed.”

Interstingly, if I do not save the engine first but rather build and run inference at once consequitively, it does not throw any error.
For the record, my environment remains the same while building and saving the engine as well while running inferences.

Environment

jetpack 4.6 on Xavier Nx with CUDA 10.2, Linux 18.04, Tf 1.15, Python 3.6 and TensorRT 8.2

Hi,
This looks like a Jetson issue. Please refer to the below samlples in case useful.

For any further assistance, we recommend you to raise it to the respective platform from the below link

Thanks!