Search code examples
tensorflowcudaupgradecudnn

Best practice for upgrading CUDA and cuDNN for tensorflow


I'm currently in charge of getting tensorflow-gpu 1.8 to work on my machine. I've been using tf-gpu 1.2 until now, but due to some required features, I have to upgrade my installation.

Before doing so, I wanted to check if there is a best practice to do this. My current setup looks like this:

  • Ubuntu 16.04
  • NVIDIA GeForce GTX 1080 Ti
  • NVIDIA Driver Version: 384.111
  • Anaconda 4.4.0 for Python 3
  • CUDA v8.0
  • cuDNN v5.1
  • tensorflow-gpu v1.2

As written on the tf-homepage, I would have to use CUDA v9.0 as well as cuDNN v7.1. As all these instructions refer to a clean install and not an update, I'm not sure if it would be best to uninstall the old versions first.

Please share your experiences if you have already had the same issue. Thank you!


Solution

  • See this documentation. They say to always remove the old version from cuda first.

    and since cuda 9.1 requires a driver >= 390 version (check compatibility chart). It would be good to remove your current driver. But no worries, because the 390 driver comes with cuda 9.1 at install.

    Now, as a personal advice, i would say to remove almost everything ( excluding python) related to nvidia / cuda. For some reasons is pretty easy to mess it up when installing and setting up CUDA in Ubuntu.

    If you have any problems after the install, see ubuntu-16-04-lts-login-loop-after-updating-driver-nvidia, it's a post wich I answered a time ago.