Whenever I import tensorflow in my code, I get the following warning
2021-07-03 20:43:38.432690: E tensorflow/stream_executor/cuda/cuda_driver.cc:313] failed call to cuInit: CUDA_ERROR_NO_DEVICE: no CUDA-capable device is detected
To check gpu availability I ran
tf.config.list_physical_devices('GPU')
For which it returned []
I also ran
tf.test.is_gpu_available()
Which returned some noticeable things
2021-07-03 20:49:02.552671: I tensorflow/core/platform/cpu_feature_guard.cc:143] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2021-07-03 20:49:02.584748: I tensorflow/core/platform/profile_utils/cpu_utils.cc:102] CPU Frequency: 2394575000 Hz
2021-07-03 20:49:02.585433: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x7f32e8000b60 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2021-07-03 20:49:02.585504: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version
2021-07-03 20:49:02.590168: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1
2021-07-03 20:49:02.737950: E tensorflow/stream_executor/cuda/cuda_driver.cc:313] failed call to cuInit: CUDA_ERROR_NO_DEVICE: no CUDA-capable device is detected
2021-07-03 20:49:02.737996: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver does not appear to be running on this host (user_name-HP-Pavilion-15-Notebook-PC): /proc/driver/nvidia/version does not exist
False
Following are my setup specifications
Python 3.8.5
TensorFlow 2.2.0
nvcc 10.1
os Ubuntu 20.04 LTS
GPU GM108M [GeForce 830M]
What should I do to resolve this? I want tensorflow lib. to utilise the local GPU while running the code.
EDIT: libcudart,libcuda are installed.
As @Dr. Snoopy mentioned, Nvidia graphics drivers were missing. I installed them using link, https://www.nvidia.com/Download/index.aspx?lang=en-us
I also installed, CuDNN from https://developer.nvidia.com/rdp/cudnn-archive
Now, when I type
tf.config.list_physical_devices('GPU')
I get
[PhysicalDevice(name='/physical_device:GPU:0',device_type='GPU')]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With