4

I am trying to install tensorflow-gpu on gtx 1050 with cuda 9 and cudnn v7 on windows 10. I have added all the environment variables. But I am getting the following error: ImportError: Could not find 'cudart64_80.dll'. TensorFlow requires that this DLL be installed in a directory that is named in your %PATH% environment variable

talonmies
  • 70,661
  • 34
  • 192
  • 269
Dhvani Shah
  • 351
  • 1
  • 7
  • 17

2 Answers2

4

I just replied something very related in this other SO post. Assuming you got the CUDA and CUDNN part, and for your specific question, it is indeed possible and easy to get TensorFlow 1.4 working with CUDA9+CUDNN7 on Python:

  1. Visit mind's repo and download the wheel file that suits your needs. Wheel files are precompiled Python packages and can be installed very easily with pip, which hopefully also works on windows without much trouble (I didn't test it, let me know if this works). If your desired package doesn't happen to be there, you can give a look to this repo that the user Yaroslav Bulatov organized to see if you find what you look for. Thank you all for this effort, by the way!

  2. Install the wheel with pip. Quick test:

    import tensorflow as tf
    x = tf.nn.conv2d(tf.ones([1,1,10,1]), tf.ones([1,5,1,1]), strides=[1, 1, 1, 1], padding='SAME')
    with tf.Session() as sess:
        sess.run(x) # this should output a tensor of shape (1,1,10,1) with [3,4,5,5,5,5,5,5,4,3]
    

Note that some of mind's wheels require Intel's MKL library to be installed, as noted here. Again, in the other SO post I referred to before I detail the instructions for installing it and making TF finding it on Linux (Linux users may want to check the post that I linked for more details on installing CUDA and CUDNN without root privileges). The official instructions to build it can be found here (they seem to be only for Ubuntu, though).

Cheers,
Andres

fr_andres
  • 5,927
  • 2
  • 31
  • 44
  • very useful answer. i also think that [repo](https://github.com/gw0/docker-keras) is good. can you pls tell if launching TF1.4 is possible on CUDA 10 GPUs? i mean, do nvidia cards have backwards compatibility with older cuda libs? – ivan866 Aug 11 '20 at 12:17
  • Hi, glad it helped! I can confirm that CUDA 10 works with TF 1.14. In general you should be able to figure out your setup by triangulating the GPU model, driver and CUDA version – fr_andres Aug 11 '20 at 19:46
  • man, when someone talks about older lib versions, pls dont underestimate how old he means the lib is – ivan866 Aug 11 '20 at 20:12
  • Sorry, IDK why I thought that 1.14 was older than 1.4, I was kind of tired. I will let you know if I test it or figure it out – fr_andres Aug 12 '20 at 12:07
  • dear @ivan866, it seems that this answer has it perfectly covered: https://stackoverflow.com/a/50622526/4511978 – fr_andres Aug 16 '20 at 19:52
1

Current version of tensorflow i.e 1.4 supports cuda 8, thus 'cudart64_80.dll' of cuda 8 is missing. download cuda 8 and suitable cudnn, it will fix the problem