Tensorflow 1.15 cannot detect gpu with Cuda10.1

Issue

I have installed both tensorflow 2.2.0 and tensorflow 1.15.0(by pip install tensorflow-gpu==1.15.0). The tensorflow 2 is installed in the base environment of Anaconda 3, while the tensorflow 1 is installed in a separate environment.

The tensorflow 2.2.0 can recognize gpu based on a simple test:

if tf.test.gpu_device_name():
    print('Default GPU Device: {}'.format(tf.test.gpu_device_name()))

//output: Default GPU Device: /device:GPU:0

But the tensorflow 1.15.0 can not detect gpu.

For your information, my system environment is python + cuda 10.1 + vs 2015.

Solution

It might have to do with the version compatibility of TF, Cuda and CuDNN. This post has it discussed thoroughly.

Answered By – TheEngineer

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published