Tensorflow在Ubuntu 18.04上找不到GPU,为什么?

时间:2020-11-03 08:33:29

标签: tensorflow gpu

nvidia-smi

显示已安装cuda 10.1,并且正在显示Tesla GPU。还有,

nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2018 NVIDIA Corporation
Built on Sat_Aug_25_21:08:01_CDT_2018
Cuda compilation tools, release 10.0, V10.0.130

但是,此测试无法检测到GPU:

import tensorflow as tf

device_name = tf.test.gpu_device_name()
if device_name != '/device:GPU:0':
  raise SystemError('GPU device not found')
print('Found GPU at: {}'.format(device_name))

SystemError: GPU device not found

此外,tensorflow 2.3已安装:

python3 -c 'import tensorflow as tf; print(tf.__version__)' 
2020-11-03 16:31:59.560352: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'libcudart.so.10.1'; dlerror: libcudart.so.10.1: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda/lib64:/usr/local/cuda/lib64:
2020-11-03 16:31:59.560406: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
2.3.1

0 个答案:

没有答案