My test :
import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()`
Error :
c:\l\work\tensorflow-1.1.0\tensorflow\stream_executor\cuda\cuda_driver.cc:405]
failed call to cuInit: CUDA_ERROR_NO_DEVICE
-> but "/cpu:0" works fine
Config :
nvidia-smi :
Why can't Tensorflow detect my GPU ?
The issue was solved on GitHub. This error message will be shown if you set an invalid value for the CUDA_VISIBLE_DEVICES
environment variable, e.g. when you only have a single GPU (which has ID 0
) and set CUDA_VISIBLE_DEVICES=1
or CUDA_VISIBLE_DEVICES=2
.
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