Tensorflow是如何知道cuda版本的



我有一个旧桌面,在中断后我正试图在上面使用Tensorflow。我卸载了以前版本的Cuda并安装了11.3。当我尝试使用Tensorflow并检查Cuda软件包版本时,我得到了11.2,这是一个旧版本。

>>> import tensorflow as tf
2021-06-25 18:02:37.515683: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory
2021-06-25 18:02:37.515712: 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.
>>> sys_details = tf.sysconfig.get_build_info()
>>> sys_details["cuda_version"]
'11.2'

Tensorflow如何查找Cuda版本?这些旧版本的残余在哪里?

编辑1:

还有一件事:nvcc --version返回正确的版本。

尝试使用此命令

export CUDA_HOME=/usr/local/cuda-11.3

最新更新