Tensort RT - Can we get API version from .engine/.plan file?

Hi,

Is it possible to get the TensorRT API version with which an engine file (.engine, .plan) was generated? For example something like this:

ICudaEngine* engine = …
std::cout << engine->getAPIVersion()

Could print:
4.0.0.3

The main use case is to have sanity checks on stored PLAN files, to see if they are up to date with the current inference code or not. This to prevent the application from simply crashing if the API versions don’t match.