Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

My test :

import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()`

Error :

c:lworkensorflow-1.1.0ensorflowstream_executorcudacuda_driver.cc:405]

failed call to cuInit: CUDA_ERROR_NO_DEVICE

-> but "/cpu:0" works fine

Config :

nvidia-smi : enter image description here

  • CUDA Version 9.1
  • tensorflow-1.1.0
  • Windows 10
  • cudnn64_7.dll (installed in C:Program FilesNVIDIA GPU Computing ToolkitCUDAv9.1in)
  • Only tensorflow-gpu is installed in my Conda environment

Why can't Tensorflow detect my GPU ?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
894 views
Welcome To Ask or Share your Answers For Others

1 Answer

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...