How to change cudnn version in pytorch

Hi there,

I’m really new to pytorch and when I do validation in training I got this error in using batchnorm1d:
cuDNN error: CUDNN_STATUS_NOT_SUPPORTED. This error may appear if you passed in a non-contiguous input.
By taking a took at https://github.com/ttumiel/pytorch/commit/36d310827c73bfed6aae6f4d68725d86f447d428, I though it might be fixed if I update my cudnn version. Previously I have torch.backend.cudnn.version() to be 7603. I installed a 7.6.5 version of cudnn in Conda, but I don’t know how to get pytorch to use that one.

Thanks!

You could try to install the binaries with cudatoolkit=10.2, which should ship with a newer cudnn version, use the NGC container, or build PyTorch from source with your local CUDA and cudnn installation.

1 Like

Do you mean Pytorch installed by pip never uses the local cudnn in our computer?

Yes, that is correct. The install log shows which CUDA runtime and cudnn is used (in the file name).
If you want to use your local libraries, you would have to build from source.

1 Like

Could you please write a detailed tutorial document to show the steps for setting up this container? Thanks a lot!