What's the difference between engine file and trt file?

Can any one tell me the difference ?


I am not sure what you meant by TRT file.

But Engine is an TRT model object interface that allows the application to execute inference, but if you want to save it for future usage to a file, you need to serialize it into a buffer and then you can store the buffer to a plan file.


I can use onnx2trt to convert xxx.onnx to xxx.trt file, is the xxx.trt can be used for inference right?


I can also serialize the engine to be saved to disk as xxx.engine right ?

supposed both “xxx.engine” and “xxx.trt” can be used for inference?

So what’s the difference?


I don’t think it will be any different. Both files will be having the same content, only difference will be the filename.

Please refer to below code of onnx-trt, here also engine file is serialized to be stored in provided file (in this case xxx.trt):