Different between model.trt and model.engine

Description

Hi, I have converted my model from onnx to TensorRT using Onnx2trt successfully. However I found out that there are two kinds of surfixs can be used, which are .trt and .engine. I wonder is there any difference between them or they are just the same thing?
One more thing that I met is that when I transferred the model from one device to another(The environment and Graphic Card are exactly the same). Only the models with .engine surfix can be deserialized and the model with “.trt” surfix will return the Error like below:


I have no idea why this thing happened. Could you please give me some help?

Environment

TensorRT Version: 7.0.0.11
GPU Type: GTX1050Ti
Nvidia Driver Version: 450.51.06
CUDA Version: 10.0
CUDNN Version: 7.6.5
Operating System + Version: Ubuntu-18.04
Python Version (if applicable): Python-3.6
TensorFlow Version (if applicable): Not used
PyTorch Version (if applicable): 1.0
Baremetal or Container (if container which image + tag):

Hi,
Request you to share the ONNX model and the script if not shared already so that we can assist you better.
Alongside you can try few things:
https://docs.nvidia.com/deeplearning/tensorrt/quick-start-guide/index.html#onnx-export

  1. validating your model with the below snippet

check_model.py

import sys
import onnx
filename = yourONNXmodel
model = onnx.load(filename)
onnx.checker.check_model(model).
2) Try running your model with trtexec command.
https://github.com/NVIDIA/TensorRT/tree/master/samples/opensource/trtexec
In case you are still facing issue, request you to share the trtexec “”–verbose"" log for further debugging
Thanks!

Hi, thank you for your reply.
However, the model files(either onnx models or TensorRT models) are the secrets of the company and has been encrypted.
So the only question is:
How does the surfix(.trt and .engine) influence the structure or the behavior of the model?

Hi,

TRT does not recognize the extension of file.
As long as it is TRT engine plan file, any extension can be used. Issue you’re facing could be different one.

Looks like you’re using older version, we recommend you to please try on latest TensorRT version 8.2 EA.

Thank you.