问题描述
系统:Ubuntu20.04
显卡:RTX A5000
物理机CUDA Verion:11.4
所安装的Tensorflow版本:tensorflow-gpu==1.13.1
采用Conda创建了虚拟环境以及拉取Tensorflow官方docker镜像两种方式,
其中Conda虚拟环境配置(Python3.7.2),使用conda命令安装,如下所示:
cudatoolkit 10.0.130 h8c5a6a4_10 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
cudnn 7.6.5.32 ha8d7eb6_1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
事实证明tensorflow-gpu==1.13.1是可以在该虚拟环境下运行成功:
>>> tf.test.is_gpu_available()
2022-10-27 10:52:22.010425: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 AVX512F FMA
2022-10-27 10:52:22.059681: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 3400000000 Hz
2022-10-27 10:52:22.063477: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x55c559aae5b0 executing computations on platform Host. Devices:
2022-10-27 10:52:22.063507: I tensorflow/compiler/xla/service/service.cc:175] StreamExecutor device (0): <undefined>, <undefined>
2022-10-27 10:52:22.066212: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcuda.so.1
2022-10-27 10:52:22.399495: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x55c55ba1eed0 executing computations on platform CUDA. Device