-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Given an engine file, how to know what GPU model it is generated on? #4233
Comments
Use
There is a tips about version compatibility and hardware compatibility |
Thank you for the reply!
Yeah I tried searching documentation of ICudaEngine, EngineInspector, and engine file but I didn't find related information. But it has to be somewhere inside engine file, right? Because trtexec can emit a warning when the GPU model generating engine file differs from the GPU model doing inference. |
Yes, also there is a detailed desc https://forums.developer.nvidia.com/t/do-tensorrt-plan-files-are-portable-across-different-gpus-which-have-the-same-type/72756 |
Thanks. Now I know that the current available memory on the device at the time of creating the plan file is also encoded into engine file, and trtexec also checks this information. However, This probably also have not quite answer my question? My question is, in engine file, where can I find the encoded GPU model information that generates it? Is this information also encoded in the first few bytes of an engine file? A hack like #3073 (comment) is enough for me. I know this information must have been saved somewhere in engine file because trtexec can find it and emit warnings. I'm wondering if there is any way that I can make my program find that. |
Because the engine/plan encoder format is not release, user only get this info bit by bit from nv. |
Currently GPU model information is not encoded in the TensorRT engine, only specific GPU properties, such as compute capability and memory capacity as mentioned in https://forums.developer.nvidia.com/t/do-tensorrt-plan-files-are-portable-across-different-gpus-which-have-the-same-type/72756. We can look into embedding this information and providing an API to retrieve this in a future release. In the meantime, I recommend embedding the device name in the serialized engine file name for future reference. |
When I use
trtexec
and I mix TensorRT engine plan files across different GPU models, I can get a warning:I would also like to do this check in my own program, but I cannot find an API to get what GPU model an engine file is generated on. For a similar question, "what TensorRT version is an engine file generated on", I find that I can know the answer using #3073 (comment). I'm wondering if there is any similar trick for GPU model information. Thanks a lot!
The text was updated successfully, but these errors were encountered: