how do I update cuDNN to a newer version?

孤街浪徒 提交于 2019-12-04 14:29:08

问题


the cuDNN installation manual says

ALL PLATFORMS

Extract the cuDNN archive to a directory of your choice, referred to below as . Then follow the platform-specific instructions as follows.

LINUX

cd export LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH

Add to your build and link process by adding -I to your compile line and -L -lcudnn to your link line.

It seems that it simply adds pwd to LD_LIBRARY_PATH, so I guess just replacing the files in pwd will do the update.

But it seems not that simple as after I've done this I got a complaint from Theano saying

cuDNN Version is too old. Update to v5, was 3007.


回答1:


  1. replace cudnn.h in dir/cuda/include/
  2. remove the old library files in dir/cuda/lib64/
  3. add new library files to dir/cuda/lib64/



回答2:


I wrote a script which can be used to clean install a version of cuDNN or change the existing cuDNN to an older/a newer version. You can download the script from:

https://github.com/dnzzcn/cuDNNv

This is what the script does:

#!/bin/bash

rm -f /usr/include/cudnn.h
rm -f /usr/lib/x86_64-linux-gnu/*libcudnn*
rm -f /usr/local/cuda-*/lib64/*libcudnn*


cp -P packages/cudnn/include/cudnn.h /usr/include
cp -P packages/cudnn/lib64/libcudnn* /usr/lib/x86_64-linux-gnu/
chmod a+r /usr/lib/x86_64-linux-gnu/libcudnn*

rm -rf packages/cudnn

It performs the installation operations automatically for the version you need.



来源:https://stackoverflow.com/questions/38137828/how-do-i-update-cudnn-to-a-newer-version

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!