Skip to content

cuDNN detection failure at build time #573

@thiell

Description

@thiell

We had a request from our users to install pytorch on our GPU cluster so I gave it a try and just compiled pytorch with CUDA 8.0.44 and cuDNN 5.1 within anaconda and during ./run_test.sh I can see the following:

~/anaconda2/lib/python2.7/site-packages/torch/backends/cudnn/__init__.py:60: UserWarning: cuDNN library has been detected, but your pytorch installation was compiled without support for it. You might want to rebuild pytorch, making sure the library is visible to the build system.
  warnings.warn("cuDNN library has been detected, but your pytorch "

I didn't change the environment between the build process and the tests, meaning the build scripts missed cuDNN detection. It is available in $LD_LIBRARY_PATH though and properly detected by other software installation on our cluster (we use lmod to manage the software environment).

So it looks like pytorch's cuDNN detection script tools/setup_helpers/cudnn.py doesn't care about the standard environment variables like $LD_LIBRARY_PATH or $CPATH, but simply uses the variables $CUDNN_LIB_DIR and $CUDNN_INCLUDE_DIR (or $CUDA_HOME but we don't install cuDNN in CUDA_HOME):

tools/setup_helpers/cudnn.py:

    lib_paths = list(filter(bool, [
        os.getenv('CUDNN_LIB_DIR'),
        os.path.join(CUDA_HOME, 'lib'),
        os.path.join(CUDA_HOME, 'lib64'),
        '/usr/lib/x86_64-linux-gnu/',
    ]))

...

As a workaround, I will define these non-standard $CUDNN_* before building pytorch, but I wanted to let you know of the build issue.

Metadata

Metadata

Assignees

Labels

todoNot as important as medium or high priority tasks, but we will work on these.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions