Pytorch only support cuDNN 6.x or above, but another program on my computer needs cuDNN 5.1. So there are 2 versions on my computer and paths are:
However, even I add
/usr/local/cuda-8.0/lib64/cuDNNv6 in LD_LIBRARY_PATH and CUDNN_LIB_DIR, cudnn is not found when I install pytorch.
Any one can give some help? How to specify CUDNN path for installing pytorch.
Can you try setting CUDNN_INCLUDE_DIR to the include folder and CUDNN_LIB_DIR to the lib folder?
I’m not sure what’s under your cuDNNv6 folder but in general the CUDNN_LIB_DIR should have
libcudnn.so (of some form) and CUDNN_INCLUDE_DIR should have cudnn.h
Hi , richard, thanks for your reply.
/usr/local/cuda-8.0/lib64/cuDNNv6/ there are:
/usr/local/cuda-8.0/include/cudnnv6/ there is
Setting these two environment path dose not work. And setting LD_LIBRARY_PATH and C_INCLUDE_PATH & CPLUS_INCLUDE_PATH also dose not work.
It seems that pytorch can only find cudnn in
Which exception did you get?
Which GPU architecture are you using?
FYI, here is my
build script for PyTorch v0.1.11.r317.gde984558 (May 23, CuDNN 5.1)
I didn’t update to CuDNN v6 yet, but it should be pretty easy to adapt. ENV variables to watch for:
CC and CXX must be GCC-5 for CUDA-8 and can be GCC-6 for CUDA-9 (I don’t think GCC-7 will work for any of those).
Don’t forget the WITH_CUDA and WITH_CUDNN
@QuantScientist @mratsim Thanks for your reply~
I am using GeForce GTX 1080, and pytorch can be installed successfully without CUDNN.
tools/setup_helpers/cudnn.py to print environment path of cudnn, and got None.
print 'CUDNN_INCLUDE_DIR is', os.getenv('CUDNN_INCLUDE_DIR')
print 'CUDNN_LIB_DIR is', os.getenv('CUDNN_LIB_DIR')
CUDNN_INCLUDE_DIR is None
CUDNN_LIB_DIR is None
However, these two path can be got in raw python cmd correctly. So strange. I do not know why they are invalid in pytorch install script.
I am not familiar with the python package installation, could you please give some help? Many thanks~~
Can you run this:
An then this:
This file has been truncated.
# PyTorch GPU and CPU
# If you dont have CUDA installed, run this first:
# Build PyTorch from source
git clone https://github.com/pytorch/pytorch.git
git submodule update --init
#git checkout 4eb448a051a1421de1dda9bd2ddfb34396eb7287
export TORCH_CUDA_ARCH_LIST="3.5 5.2 6.0 6.1+PTX"
Thanks, I’ve tried it. Pytorch can be installed successfully with your scripts. BUT cudnn is not supported.
I solved this problem by add PATH in
BUT I still do not find the reason why it dose not work to export these path in terminal.
@EthanZhangYi glad you solved it!
You should also consider looking into Docker. It is the best thing ever for keeping different libraries and programs running in their own separate containers, with just a 0.1% performance penalty.
@FuriouslyCurious, I will learn to use docker~
Good news !
Regarding Docker, on my side I had mitigated experience while using it for DL competition environment on AWS, it was really slow and a pain to setup. Personally I use a LXC container dedicated to DL (Docker used to use LXC tech in the past) with no perf penalty. Your mileage may vary but any kind of container is good to make sure your DL environment doesn’t pollute/is not polluted by your main system, especially Python version updates. And backup-ing a container is relatively straightforward.