How to check my TensorRT version

Is there a command like command --version ?

1 Like

I answer my self question :

dpkg -l | grep nvinfer

$ dpkg -l | grep TensorRT

Its now build in Jetpack as described here https://devtalk.nvidia.com/default/topic/1027301/jetson-tx2/jetpack-3-2-mdash-l4t-r28-2-developer-preview-for-jetson-tx2/

We created a new “Deep Learning Training and Inference” section in Devtalk to improve the experience for deep learning and accelerated computing, and HPC users:
https://devtalk.nvidia.com/default/board/301/deep-learning-training-and-inference-/

We are moving active deep learning threads to the new section.

URLs for topics will not change with the re-categorization. So your bookmarks and links will continue to work as earlier.

-Siddharth

In addition to checking the package name, as suggested by zouxidong in comment #2, you can also check the library itself in case you unpacked the tar file somewhere and didn’t keep the original directory name.

In the TensorRT Developer Guide (https://docs.nvidia.com/deeplearning/sdk/tensorrt-developer-guide/index.html#troubleshooting) under “Q: How do I get the version of TensorRT from the library file?” you will find the answer. Copying the answer here for easier access.

A: There is a symbol in the symbol table named tensorrt_version_###_# which contains the TensorRT version number. One possible way to read this symbol on Linux is to use the nm command like in the example below:

$ nm -D libnvinfer.so.4.1.0 | grep tensorrt_version
000000000c18f78c B tensorrt_version_4_0_0_7

You can also search the header NvInfer.h for defines starting with NV_TENSORRT.

1 Like

Hi,

dpkg -l | grep nvinfer

is full of ambiguity I think.

It will show the version of nvinfer API, but not the version of your tensorRT.
Last time I tried this command, and it showed the nvinfer API version was 4.0.4-1, which misled me to believe that my tensorRT’s version was 4. But it was wrong! At that moment my tensorRT’s version was 3.

This version from this commend was not the tensorRT version!!!

Be careful!!!

@qianneng1994,

This was true before 5.0, but starting with 5.0 the API version is aligned with the product version. You can use the command shown in post #5 or if you are using dpkg you can use “dpkg -l | grep tensorrt”. The tensorrt package has the product version, but libnvinfer has the API version.

I am having the same problem on the Jetson TX2 at the moment.
According to the documentation, version 4.0 should be available on the TX2 with JetPack 3.3.
Any idea how I could upgrade TensorRT without flashing the Jetson again?

There is no easy way to do this because there could also be CUDA driver changes between JetPack 3.3 and JetPack 4.2. The TensoRT version in JetPack 4.2 should be 5.0 (specifically 5.0.6.3).

Yes, I actually upgraded the tensorRT from version 3 to version 4 without flashing the jetson. I just used the 3.3 Jetpack, and did not select the item for reflashing the board.
Plus, I just checked the jetpack website, seems now jetpack 4.2 also supports jetson TX2.