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.
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.
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!!!
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.