Try to install pytorch v0.4 from source code, but empty in subdirs of thrid_party

Why did you installed cuda 7.0? It’s a quite old version.
Also are you sure there is no other cuda installed on the machine that could conflict with the one you want to use?

our CUDA is 8.0, and CUDNN is 7.0. could I ask how can I check are there any other cuda on my computer?

You can run locate libcudart to find all the places where the cuda shared libraries are found on your system.

I checked it and we only have cuda8.0 on our server, any other ideas? thanks

Not sure :confused: I can’t reproduce on any on the machines I have available. It has to do with the cuda setup in some way.
You check that you have the corresponding cublas libraries as well locate libcublas ?

Thanks. Yes, I can also only find libcublas.so.8 on my computer. I compiled the pytorch from latest master branch of pytorch, it says the version is 0.5, is it possibly related to pytorch version? before when i has pytorch v0.1.2, it is OK, after I upgraded, it gives this error. so annoying.

I might be simpler to install inside a conda environment the current release 0.4. That way, the proper cuda will be shipped with torch.
Otherwise, you can also try to use the binary install from pip corresponding to your cuda.
Instructions for there can be found here.

Yes, i want to do that, but my computer has no internet access, so I have to install from source code.

@albanD, in general, what is possible reason why pytorch cannot initialize cudnn? because the version does not match or others?

The problem in your case seems to be that cublas (not cudnn) is not initialized.
I can’t see any reason for this not to be initialized. Or if it tries and fail, it should raise an error.

Does torch.cuda.current_blas_handle() returns anything?

@albanD, it returns a number without error.

After reinstalling pytorch, the error is changed to “CUDNN_STATUS_NOT_INITIALIZED”

I changed the cudnn version for cuda 8.0 and now everything works.

Ok so the problem was that cuda was not loading cudnn because it was the wrong version…
Glad it works now.

hi, may I ask how you fix the problem ? I also clone the code on windows and then copy it to my Mac

Hi, I download the zip file from github, then decompress it on my ubuntu server and used them to replace the build_pytorch_libs.sh in my cloned code.

I got the same error. How can I fix this?

Hello , my server has cuda8.0 and cudnn 6.0 .Now I have the problem about ,
pytorch was compiled without cudnn
how to handle it thanks @albanD

Hi,

how did you installed pytorch?
Did you installed it from source while cudnn was installed? Or a binary with cudnn?

i install pytorch with conda install
and i install cudnn by using cudnn library with linux like libcudnn.so