Tensorflow does not recognize GPU (Windows 10, 1060)

On Windows 10 x64
I have installed
Anaconda
python 3.6
CUDA 9.1
cudNN (coped the dll, library, and include to the required locations)
tensorflow
tensorflow-gpu
without errors, and MNIST runs fine, but I cannot get tensorflow to recognize my 1060 GPU.
Web links say reinstall tensorflow-gpu. I tried the suggestions and is stopped tensorflow from
working altogether. I reset my Spyder environment and reinstalled tensorflow and tensorflow-gpu
and [finally] got tensorflow working again, but still only seeing CPU:0. Any suggestions?
At one point without anaconda I did get one example to use the GPU, but that environment was unstable and full of references that are no longer valid, so I switched to Anaconda.

Jon Melvin

I don’t know of any tensorflow public builds that use CUDA 9.1

It’s possible to build TF from sources to use CUDA 9.1, but that seems unlikely here.

Also, having both tensorflow and tensorflow-gpu installed can be confusing, as tensorflow will not use a GPU in any circumstance.

My first suggestion would be to install CUDA 9.0, or make sure the CUDA version you are using matches the TF version you are using (i.e. what the TF version expects). If this actually the problem, it would be evident from the TF spew.

If you followed a “typical” install method on windows, you should be using CUDA 9.0 as mentioned here:

https://www.tensorflow.org/install/install_windows#installing_with_anaconda

Thank you. Loaded cuda 9.0 (still have 9.1). Removed tessorflow (non-gpu). Could not run tensorflow at all. Removed tensorflow-gpu and reset Sypyder and then reinstalled. Get stack trace below. Read notes at specified URL and it seems to want specific versions. Anaconda loads tensorflow-gpu-1.1.0, which means I need cudNN 7 (does 7.1 work or do I need 7.0, or 7.0.1, ??? how to figure this stuff out?) and cude 8.0. Seems like going down a rabbit hole.

How do you deal with this version matching?

Thanks so much. Jon

Resolved the problem: Anaconda requires specific versions for tensorflow-gpu: CUDA 8.0 and cudNN 5.1 for cuda 8. Once I installed that CUDA and the cudNN files into the “c:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0” folders of the same names, and removed tensor flow and installed tensorflow-gpu with Anaconda, it worked. Running MNIST learning: GTX 1060 GPU = 20 times faster than 4 core (8 processor) Xeon or I7. Quadro K4100M GPU (on a Dell M6800 laptop) = 7 times faster.

Thank you again for your help.

Jon Melvin