tensorflow: failed call to cuInit: CUDA_ERROR_UNKNOWN
when i run tensorflow gpu my gpy is gt 620m linux mint 18.1
E tensorflow/stream_executor/cuda/cuda_driver.cc:509] failed call to cuInit: CUDA_ERROR_UNKNOWN
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:158] retrieving CUDA diagnostic information for host: essam-goda
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:165] hostname: essam-goda
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:189] libcuda reported version is: 340.101.0
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:363] driver version file contents: """NVRM version: NVIDIA UNIX x86_64 Kernel Module 340.101 Thu Dec 1 15:52:31 PST 2016
GCC version: gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4)
"""
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:193] kernel reported version is: 340.101.0
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:300] kernel version seems to match DSO: 340.101.0
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 17 (5 by maintainers)
Issue resolved after Ubuntu restart. I installed updates and was pending a restart, after the restart GPU was detected.
Could you google search this error and try to follow some of the advice. For example, this error appears here https://github.com/tensorflow/tensorflow/issues/2882
Good Luck!
@aselle Hi, is there any alternative to make it work without running it as root?
Without sudo: Please note:
2017-08-14 07:28:29.379866: E tensorflow/stream_executor/cuda/cuda_driver.cc:406] failed call to cuInit: CUDA_ERROR_NO_DEVICEAs root with sudo:
Possible solution: I had this issue, nvidia-smi was working fine, and it turned out I was placing my device where none existed. I have two environments. One with many GPUs one with just one. Running the code one the single GPU machine but placing the device on position ‘1’ (or any other than ‘0’) gave rise to this error.
Sometimes a simple reboot works
Adding following lines to .bashrc worked for me!!
export LD_LIBRARY_PATH=“$LD_LIBRARY_PATH:/usr/local/cuda-8.0/lib64:/usr/local/cuda-8.0/extras/CUPTI/lib64:/usr/local/cuda-8.0/targets/x86_64-linux/lib/”
@essamgoda that sounds like cuda isn’t installed quite right. Try doing what it says, otherwise searching for methods of reinstalling nvidia drivers (sometimes you have to work pretty hard to remove remaining parts of cuda if you have used a mix of manual and automatic methods).