Skip to content
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

Cannot build 7.2.2 with CUDA 11.2 #1064

Closed
Maik93 opened this issue Feb 16, 2021 · 15 comments
Closed

Cannot build 7.2.2 with CUDA 11.2 #1064

Maik93 opened this issue Feb 16, 2021 · 15 comments
Labels
OSS Build triaged Issue has been triaged by maintainers

Comments

@Maik93
Copy link

Maik93 commented Feb 16, 2021

Description

Even if the download link explicitly states that v7.2.2 can be compiled with CUDA 11.2, doing so throws a linker error that seems related to closed source libraries built explicitly with CUDA 11.1:

/usr/bin/ld: TensorRT-7.2.2.3/lib/libnvinfer.so: undefined reference to `nvrtcDestroyProgram@libnvrtc.so.11.1'
/usr/bin/ld: TensorRT-7.2.2.3/lib/libnvinfer_plugin.so: undefined reference to `nvrtcAddNameExpression@libnvrtc.so.11.1'
[...]

Is there any way to compile tensorrt with 11.2 or the download link is just misleading?

Environment

TensorRT Version: 7.2.2
NVIDIA GPU: GTX 1060
NVIDIA Driver Version: 460.32.03
CUDA Version: 11.2
CUDNN Version: 8.1.0.77-1
Operating System: Archlinux

@ttyio
Copy link
Collaborator

ttyio commented Feb 22, 2021

Hello @Maik93 , thanks for reporting.
This is limitation of nvrtc library. Could you try install nvrtc for cuda 11.1?

see https://docs.nvidia.com/deeplearning/tensorrt/release-notes/tensorrt-7.html

Note: If you are developing an application that is being compiled with CUDA 11.2 or you are using CUDA 11.2 libraries to run your application, then you must install CUDA 11.1 using either the Debian/RPM packages or using a CUDA 11.1 tar/zip/exe package. NVRTC from CUDA 11.1 is a runtime requirement of TensorRT and must be present to run TensorRT applications. If you are using the network repo installation method, this additional step is not needed.

@ttyio ttyio added OSS Build triaged Issue has been triaged by maintainers CUDA: 11.1 labels Feb 22, 2021
@Maik93
Copy link
Author

Maik93 commented Feb 22, 2021

Hello @ttyio, thanks for your assistance.
AFAIK nvrtc is contained in the CUDA toolkit (installation guide) and can be only installed together with the CUDA package itself. Are you suggesting to reinstall CUDA?
In that case, should I install CUDA 11.1 in place of 11.2 or alongside it?

@ttyio
Copy link
Collaborator

ttyio commented Feb 22, 2021

Hello @Maik93 ,
Yes nvrtc is deliver inside the CUDA toolkit, you can also install it separate, I find the links in:
https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-nvrtc-11-1_11.1.105-1_amd64.deb
https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-nvrtc-dev-11-1_11.1.105-1_amd64.deb
Could you take a try?

@Maik93
Copy link
Author

Maik93 commented Feb 24, 2021

Sorry, I'm on Arch and it took me some time to repack those two deb files due to conflicts.
I've achieved it now and I can confirm that everything works: I was able to compile TensorRT with CUDA 11.2 with just nvrtc 11.1 as additional dependency! Thank you!!


If someone is interested and if you are ok with it, I can submit to the AUR those two deb file converted for Archlinux. In this case, I probably need to know under what licence they are supposed to be shared.

@ttyio
Copy link
Collaborator

ttyio commented Feb 25, 2021

Thanks @Maik93 for the update.
BTW, nvrtc team is working on the improvement on the compatibility between minor versions, and we will no longer hit such problem when this feature is done in nvrtc library.

@Maik93 Maik93 closed this as completed Feb 25, 2021
@DavorJordacevic
Copy link

Hello @Maik93 ,
Yes nvrtc is deliver inside the CUDA toolkit, you can also install it separate, I find the links in:
https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-nvrtc-11-1_11.1.105-1_amd64.deb
https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-nvrtc-dev-11-1_11.1.105-1_amd64.deb
Could you take a try?

I was able to compile TensorRT with CUDA 11.2 and nvrtc 11.1! Thank you!

@lucasjinreal
Copy link

lucasjinreal commented May 28, 2021

@Maik93 I installed this two deb, it still got this:

/home//TensorRT/lib/libnvinfer.so: undefined reference to `nvrtcCompileProgram@libnvrtc.so.11.1'
/home//TensorRT/lib/libnvinfer.so: undefined reference to `nvrtcVersion@libnvrtc.so.11.1'
/home//TensorRT/lib/libnvinfer.so: undefined reference to `nvrtcGetPTX@libnvrtc.so.11.1'
/home//TensorRT/lib/libnvinfer.so: undefined reference to `nvrtcDestroyProgram@libnvrtc.so.11.1'
/home//TensorRT/lib/libnvinfer.so: undefined reference to `nvrtcGetPTXSize@libnvrtc.so.11.1'
/home//TensorRT/lib/libnvinfer_plugin.so: undefined reference to `nvrtcAddNameExpression@libnvrtc.so.11.1'
/home//TensorRT/lib/libnvinfer.so: undefined reference to `nvrtcCreateProgram@libnvrtc.so.11.1'

Also tried sudo ln -s 11.2 11.1 not work

@Maik93
Copy link
Author

Maik93 commented May 28, 2021

@jinfagang try a sudo find / -name libnvrtc.so.11.1 and check if it is in a correct path.
For me (on Archlinux), it is in /opt/cuda/targets/x86_64-linux/lib/, but I don't know if it should be there even on Ubuntu.
If it is on a different directory, try to add it to the environmental variable LD_LIBRARY_PATH.

@lucasjinreal
Copy link

@Maik93 It is correct since I am in standared ubuntu 18.04 and standared way installed cuda11.2. Now I try reinstall CUDA......

@lonngxiang
Copy link

install nvrtc 11.1 still not work@Maik93
image
image

@zengjie617789
Copy link

my error is solved when i check the system version which should match the version of tensorrt download.
and everthing is fine.
I used the way of tar file installation on Ubuntun16.04 , Tensort7.0.0, cuda10.1, cudnn7.6.5

@Darwin84
Copy link

Darwin84 commented Jul 2, 2022

get same problem

@kulkarnivishal
Copy link

Sorry, I'm on Arch and it took me some time to repack those two deb files due to conflicts. I've achieved it now and I can confirm that everything works: I was able to compile TensorRT with CUDA 11.2 with just nvrtc 11.1 as additional dependency! Thank you!!

If someone is interested and if you are ok with it, I can submit to the AUR those two deb file converted for Archlinux. In this case, I probably need to know under what licence they are supposed to be shared.

Hi @Maik93 could you list the steps if possible, please?
is it possible to just install nvrtc 11.1 in a 11.2 container?

I tried adding path to libnvrtc.so.11.1 to LD_LIBRARY_PATH but I still get unmet dependencies when installing trt 7.2.2

The following packages have unmet dependencies:
 libnvinfer-dev : Depends: libcublas.so.11-dev but it is not installable or
                           libcublas-dev-11-1 but it is not installable
 libnvinfer7 : Depends: libcublas.so.11 but it is not installable or
                        libcublas-11-1 but it is not installable

@Shuolongbj
Copy link

#2884 FYI.

https://github.com/tensorflow/tensorflow/blob/master/.bazelrc
TensorRT 7 for CUDA 11.1 is compatible with CUDA 11.2, but requires
libnvrtc.so.11.1. See #1064.
TODO(b/187962120): Remove when upgrading to TensorRT 8.
test:rbe_linux_cuda_base --test_env=LD_LIBRARY_PATH="/usr/local/cuda/lib64:/usr/local/cuda/extras/CUPTI/lib64:/usr/local/cuda-11.1/lib64"

TensorRT Version: 7.2.3.4 CUDA Version: 11.2 CUDNN Version: 8.1.1.33-1 Operating System: Ubuntu-20.04

CUDA Version 11.2 must be 11.2 update 1,not 11.2 update 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OSS Build triaged Issue has been triaged by maintainers
Projects
None yet
Development

No branches or pull requests

9 participants