tensorflow (not tensorflow-gpu): failed call to cuInit: UNKNOWN ERROR (303)

前端 未结 2 527
清歌不尽
清歌不尽 2021-02-13 15:00

My Test

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

My Error

相关标签:
2条回答
  • 2021-02-13 15:30

    You can attempt to work around this problem on cpu-only machines by using the tensorflow-cpu package instead of tensorflow.

    pip uninstall tensorflow
    pip install tensorflow-cpu
    
    0 讨论(0)
  • 2021-02-13 15:37

    Installing nvidia-modprobe can solve this issue.

    sudo apt install nvidia-modprobe
    

    Other solutions you can try are :

    • Uninstall and install CUDA and cuDNN.
    • Install tensorflow-gpu.
    • Uninstall and install different Nvidia driver versions.

    The problem also could be that only some /dev/nvidia* files are present before running Python with sudo, check using $ ls /dev/nvidia*, after running the Device Node verification script the /dev/nvidia-uvm file gets added.

    0 讨论(0)
提交回复
热议问题