我正在使用 Microsoft 的 Azure Notebooks 创建一个 ML 管道。我在使用 CUDA 和 Tensorflow 时遇到了很多麻烦,我似乎无法将它连接到 GPU。问题在于:
tf.test.gpu_device_name()
返回 ''
即使所有其他指标似乎都表明存在 GPU 并且一切都已成功安装:
tf.test.is_built_with_cuda()
返回 true
!nvcc --version
返回
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Sun_Jul_28_19:07:16_PDT_2019
Cuda compilation tools, release 10.1, V10.1.243
!nvidia-smi
返回
Wed Jun 16 08:47:01 2021
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 465.19.01 Driver Version: 465.19.01 CUDA Version: 11.3 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 NVIDIA Tesla K80 On | 00000001:00:00.0 Off | 0 |
| N/A 34C P8 34W / 149W | 0MiB / 11441MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+```
我使用的是 CUDA v 11.2 和 Tensorflow v 1.15.2。 我能够在 Colab 和 Paperspace 等其他云 GPU 服务提供商中轻松完成这项工作。
任何信息将不胜感激。
答案 0 :(得分:0)
根据Tensorflow 1.15.0
的{{3}},兼容的CUDA
版本是10
。
由于它们之间不兼容,当您尝试使用 ''
时,您会得到 tf.test.gpu_device_name()
。
上述问题可以通过升级 Tensorflow 或根据测试的构建配置降级 CUDA 驱动程序来解决