fast-neural-style icon indicating copy to clipboard operation
fast-neural-style copied to clipboard

Cudnn update -- possible incompatibility

Open tkoham opened this issue 7 years ago • 4 comments

The new cudnn throws this error after update:

./vod.sh /home/tyson/Git/torch/install/bin/luajit: /home/tyson/Git/torch/install/share/lua/5.1/trepl/init.lua:389: /home/tyson/Git/torch/install/share/lua/5.1/trepl/init.lua:389: /home/tyson/Git/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/tyson/Git/torch/install/share/lua/5.1/trepl/init.lua:389: in function 'require' ./fast_neural_style/utils.lua:52: in function 'setup_gpu' fast_neural_style.lua:45: in function 'main' fast_neural_style.lua:124: in main chunk [C]: in function 'dofile' .../Git/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk [C]: at 0x00405b50

I've set my path correctly and th -lcutorch -e "cutorch.test()" passes.

tkoham avatar Apr 14 '17 12:04 tkoham

The newest cuDNN is 6 - make sure you're using 5 or 5.1

zachmccormick avatar May 01 '17 13:05 zachmccormick

It actually works with cuDNN 6. I updated my cudnn module to r6 with the following command:

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

and properly set the CUDNN_PATH to point at libcudnn.so.6:

export CUDNN_PATH = "/usr/lib/aarch64-linux-gnu//libcudnn.so.6".

After that I launched the example script and it worked without problems.

vitcozzolino avatar Aug 14 '17 13:08 vitcozzolino

ah! thank you.

tkoham avatar Oct 15 '17 21:10 tkoham

thank you, similarly for cuDNN 7 run:

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

jkremser avatar Dec 22 '17 22:12 jkremser