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

CuDNN v7 for Cuda 9.0 not working #383

Closed
ProGamerGov opened this issue Oct 24, 2017 · 8 comments

Comments

Projects
None yet
7 participants
@ProGamerGov
Copy link

commented Oct 24, 2017

I installed Cuda 9.0 and CuDNN v7, but I keep getting this error when trying to use Torch7's cudnn package.

/home/ubuntu/torch/install/bin/luajit: /home/ubuntu/torch/install/share/lua/5.1/trepl/init.lua:389: /home/ubuntu/torch/install/share/lua/5.1/trepl/init.lua:389: /home/ubuntu/torch/install/share/lua/5.1/cudnn/ffi.lua:1603: 'libcudnn (R5) not found in library path.
Please install CuDNN from https://developer.nvidia.com/cuDNN
Then make sure files named as libcudnn.so.5 or libcudnn.5.dylib are placed in
your library load path (for example /usr/local/lib , or manually add a path to LD_LIBRARY_PATH)

Alternatively, set the path to libcudnn.so.5 or libcudnn.5.dylib
to the environment variable CUDNN_PATH and rerun torch.
For example: export CUDNN_PATH="/usr/local/cuda/lib64/libcudnn.so.5"

stack traceback:
        [C]: in function 'error'
        /home/ubuntu/torch/install/share/lua/5.1/trepl/init.lua:389: in function 'require'
        neural_style.lua:350: in function 'setup_gpu'
        neural_style.lua:53: in function 'main'
        neural_style.lua:601: in main chunk
        [C]: in function 'dofile'
        ...untu/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
        [C]: at 0x00405d50
ubuntu@ip-Address:~/neural-style$

@ProGamerGov ProGamerGov changed the title Cudnn v7 for Cuda 9.0 not working CuDNN v7 for Cuda 9.0 not working Oct 24, 2017

@ProGamerGov

This comment has been minimized.

Copy link
Author

commented Oct 24, 2017

Using this: export CUDNN_PATH="/usr/local/cuda-9.0/lib64/libcudnn.so.7"

Results in:

Found Environment variable CUDNN_PATH = /usr/local/cuda-9.0/lib64/libcudnn.so.7/home/ubuntu/torch/install/bin/luajit: /home/ubuntu/torch/install/share/lua/5.1/trepl/init.lua:389: /home/ubuntu/torch/install/share/lua/5.1/trepl/init.lua:389: /home/ubuntu/torch/install/share/lua/5.1/cudnn/ffi.lua:1618: These bindings are for CUDNN 5.x (5005 <= cudnn.version > 6000) , while the loaded CuDNN is version: 7003
Are you using an older or newer version of CuDNN?
stack traceback:
        [C]: in function 'error'
        /home/ubuntu/torch/install/share/lua/5.1/trepl/init.lua:389: in function 'require'
        neural_style.lua:350: in function 'setup_gpu'
        neural_style.lua:53: in function 'main'
        neural_style.lua:601: in main chunk
        [C]: in function 'dofile'
        ...untu/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
        [C]: at 0x00405d50

Edit:

Using this worked:

git clone https://github.com/soumith/cudnn.torch.git -b R7 && cd cudnn.torch && luarocks make cudnn-scm-1.rockspec

@soulslicer

This comment has been minimized.

Copy link

commented May 28, 2018

got to do so much bullshit to make torch/lua work with 10 series nvidia GPU. even after 1 year +.

@Mozhdeh-d

This comment has been minimized.

Copy link

commented Jun 16, 2018

In which path did you run the below code?!
git clone https://github.com/soumith/cudnn.torch.git -b R7 && cd cudnn.torch && luarocks make cudnn-scm-1.rockspec

@Mozhdeh-d

This comment has been minimized.

Copy link

commented Jun 16, 2018

I have the same problem and I couldnt solve it yet!
I successfully installed my nvidia driver and cuda 9.1. I also did everything that is needed to install cudnn 7.1. but when I run my code, I face the following error:

/////////////////////////////////////////////////////////////////
Found Environment variable CUDNN_PATH = /usr/local/cuda-9.1/lib64/libcudnn.so.7/home/mozhdeh/torch/install/bin/luajit: /home/mozhdeh/torch/install/share/lua/5.1/trepl/init.lua:389: /home/mozhdeh/torch/install/share/lua/5.1/trepl/init.lua:389: /home/mozhdeh/torch/install/share/lua/5.1/cudnn/ffi.lua:1743: /usr/local/cuda-9.1/lib64/libcudnn.so.7: cannot open shared object file: No such file or directory
/////////////////////////////////////////////////////////////////

My .bashrc file containes:

/////////////////////////////////////////////////////////////////
export PATH=/usr/local/cuda-9.1/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-9.1/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
export CUDA_HOME=/usr/local/cuda-9.1
export CUDNN_PATH=/usr/local/cuda-9.1/lib64/libcudnn.so.7
/////////////////////////////////////////////////////////////////

and I'm sure that the libcudnn.so.7 file exists in /usr/local/cuda-9.1/lib64
Any solution ?! :(

System Information:
Os: Ubuntu 18.04
Nvidia driver version: 390.48

@Montroigenc

This comment has been minimized.

Copy link

commented Sep 25, 2018

You can change the called cudnn version executing the following command in the prompt:

export CUDNN_PATH="/usr/local/cuda/lib64/libcudnn.so.X"

where the X is your current cudnn version, in my case version 7.

@ShuaiHuang

This comment has been minimized.

Copy link

commented Oct 16, 2018

Using this: export CUDNN_PATH="/usr/local/cuda-9.0/lib64/libcudnn.so.7"

Results in:

Found Environment variable CUDNN_PATH = /usr/local/cuda-9.0/lib64/libcudnn.so.7/home/ubuntu/torch/install/bin/luajit: /home/ubuntu/torch/install/share/lua/5.1/trepl/init.lua:389: /home/ubuntu/torch/install/share/lua/5.1/trepl/init.lua:389: /home/ubuntu/torch/install/share/lua/5.1/cudnn/ffi.lua:1618: These bindings are for CUDNN 5.x (5005 <= cudnn.version > 6000) , while the loaded CuDNN is version: 7003
Are you using an older or newer version of CuDNN?
stack traceback:
        [C]: in function 'error'
        /home/ubuntu/torch/install/share/lua/5.1/trepl/init.lua:389: in function 'require'
        neural_style.lua:350: in function 'setup_gpu'
        neural_style.lua:53: in function 'main'
        neural_style.lua:601: in main chunk
        [C]: in function 'dofile'
        ...untu/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
        [C]: at 0x00405d50

Edit:

Using this worked:

git clone https://github.com/soumith/cudnn.torch.git -b R7 && cd cudnn.torch && luarocks make cudnn-scm-1.rockspec

THX, it works for me!

@mememimis

This comment has been minimized.

Copy link

commented Mar 27, 2019

Using this: export CUDNN_PATH="/usr/local/cuda-9.0/lib64/libcudnn.so.7"
Results in:

Found Environment variable CUDNN_PATH = /usr/local/cuda-9.0/lib64/libcudnn.so.7/home/ubuntu/torch/install/bin/luajit: /home/ubuntu/torch/install/share/lua/5.1/trepl/init.lua:389: /home/ubuntu/torch/install/share/lua/5.1/trepl/init.lua:389: /home/ubuntu/torch/install/share/lua/5.1/cudnn/ffi.lua:1618: These bindings are for CUDNN 5.x (5005 <= cudnn.version > 6000) , while the loaded CuDNN is version: 7003
Are you using an older or newer version of CuDNN?
stack traceback:
        [C]: in function 'error'
        /home/ubuntu/torch/install/share/lua/5.1/trepl/init.lua:389: in function 'require'
        neural_style.lua:350: in function 'setup_gpu'
        neural_style.lua:53: in function 'main'
        neural_style.lua:601: in main chunk
        [C]: in function 'dofile'
        ...untu/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
        [C]: at 0x00405d50

Edit:
Using this worked:
git clone https://github.com/soumith/cudnn.torch.git -b R7 && cd cudnn.torch && luarocks make cudnn-scm-1.rockspec

THX, it works for me!

This does not work for me. Im on ubuntu 18.02 cuda 9.2 and cudnn 7

Any ideas?

@THUHoloLab

This comment has been minimized.

Copy link

commented Apr 4, 2019

Using this: export CUDNN_PATH="/usr/local/cuda-9.0/lib64/libcudnn.so.7"
Results in:

Found Environment variable CUDNN_PATH = /usr/local/cuda-9.0/lib64/libcudnn.so.7/home/ubuntu/torch/install/bin/luajit: /home/ubuntu/torch/install/share/lua/5.1/trepl/init.lua:389: /home/ubuntu/torch/install/share/lua/5.1/trepl/init.lua:389: /home/ubuntu/torch/install/share/lua/5.1/cudnn/ffi.lua:1618: These bindings are for CUDNN 5.x (5005 <= cudnn.version > 6000) , while the loaded CuDNN is version: 7003
Are you using an older or newer version of CuDNN?
stack traceback:
        [C]: in function 'error'
        /home/ubuntu/torch/install/share/lua/5.1/trepl/init.lua:389: in function 'require'
        neural_style.lua:350: in function 'setup_gpu'
        neural_style.lua:53: in function 'main'
        neural_style.lua:601: in main chunk
        [C]: in function 'dofile'
        ...untu/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
        [C]: at 0x00405d50

Edit:
Using this worked:
git clone https://github.com/soumith/cudnn.torch.git -b R7 && cd cudnn.torch && luarocks make cudnn-scm-1.rockspec

THX, it works for me!

This does not work for me. Im on ubuntu 18.02 cuda 9.2 and cudnn 7

Any ideas?

It also does not work for me. Im on ubuntu 16.04 cuda 9.0 and cudnn 7.4.2

Are you using an older or newer version of CuDNN?
stack traceback:
	[C]: in function 'error'
	/home/user/torch/install/share/lua/5.1/trepl/init.lua:389: in function 'require'
	TestRDN.lua:3: in main chunk
	[C]: in function 'dofile'
	...user/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
	[C]: at 0x00405d50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.