0

When trying to work on a machine learning project, I want to use my GPU. When I have installed all possible dependencies like cuDNN, Cuda Toolkit, Tensorflow python package, etc. These have all DLLs working so it isn't an issue with opening the library. When I begin training, I get this message...

2021-03-10 10:09:04.693706: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow 
binary is optimized with oneAPI Deep Neural Network Library (oneDNN)to use the following CPU 
instructions in performance-critical operations:  AVX AVX2
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.**strong 
text**

This implies that it hasn't found my GPU even though all the necessary tools are installed. To confirm this, I have this printing the devices TensorFlow can detect...

from tensorflow.python.client import device_lib
print(device_lib.list_local_devices())

And I get this output...

[name: "/device:CPU:0"
device_type: "CPU"
memory_limit: 268435456
locality {
}
incarnation: 12770508836057077386
]

It did not list the GPU. I am on Windows 10 Pro and I have an RTX 2070. Can anyone explain why this may be happening?

Redgar Pro
  • 51
  • 7
  • 1
    did you add the CUDA, CUPTI, and cuDNN installation directories to the %PATH% environmental variable? – Anurag Wagh Mar 10 '21 at 15:20
  • 1
    possible duplicate with https://stackoverflow.com/a/44990513/4986663 , can you confirm the issue is not the same ? – Leyff da Mar 10 '21 at 15:21
  • @AnuragWagh I did – Redgar Pro Mar 10 '21 at 15:26
  • @Leyffda I can confirm it is not. I have seen the question before posting. I have already done as the answers told me. This is shown in my question. – Redgar Pro Mar 10 '21 at 15:27
  • You should include the whole tensorflow output in your question. – Dr. Snoopy Mar 10 '21 at 16:23
  • @Dr.Snoopy This is the entire output. – Redgar Pro Mar 10 '21 at 16:26
  • No, I don't think so, there is no information about loading CUDA libraries for example. Assuming you are using a GPU-enabled tensorflow version, that should at least be there. – Dr. Snoopy Mar 10 '21 at 16:29
  • @Dr.Snoopy It should have said that it successfully opened the Dynamic Library but it didn't show the message and just led on to the CPU message. Originally, Tensorflow was finding the GPU but it wasn't able to find DLLs like cudart64. I fixed it by installing a variety of TensorFlow packages like cuDNN and Cuda Toolkit through the anaconda environment. Now it doesn't show any indication of seeing my GPU. – Redgar Pro Mar 10 '21 at 16:40
  • Then you probably installed a CPU only version of TensorFlow. Can tell you much more without more information – Dr. Snoopy Mar 10 '21 at 17:04
  • @Dr.Snoopy I thought this was true as well. That's why I made sure I got the latest Tensorflow version. The newer versions have both CPU and GPU capabilities. Older versions required Tensorflow GPU or CPU – Redgar Pro Mar 10 '21 at 17:07
  • I solved it. I just uninstalled the Tensorflow package because I had Tensorflow-gpu installed as well. My guess is that they were conflicting packages. I just reinstalled Tensorflow-GPU and it worked. It found the device. I'll update the question with an answer soon. – Redgar Tech Mar 10 '21 at 19:20

0 Answers0