【问题标题】:NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running. Why?NVIDIA-SMI 失败,因为它无法与 NVIDIA 驱动程序通信。确保已安装并运行最新的 NVIDIA 驱动程序。为什么?
【发布时间】:2020-10-23 02:39:56
【问题描述】:

我正在尝试在 Google Colab 上运行 stylegan2,但所有文件都在我的 Drive 上,并避免使用来自 github of stylegan2 的 !git clone。 这是我在特定单元格上的代码:

    %tensorflow_version 1.x
    %cd /content/drive/My Drive/stylegan2-master/
    !nvcc test_nvcc.cu -o test_nvcc -run
    print('Tensorflow version: {}'.format(tf.__version__) )
    !nvidia-smi -L
    print('GPU Identified at: {}'.format(tf.test.gpu_device_name()))

结果:

/content/drive/我的云端硬盘/stylegan2-master CPU打招呼。 cudaErrorNoDevice:未检测到支持 CUDA 的设备 张量流版本:1.15.2 NVIDIA-SMI 失败,因为它无法与 NVIDIA 驱动程序通信。确保已安装并运行最新的 NVIDIA 驱动程序。

GPU 识别于:

为什么我无法获得 GPU ? 我是该领域的新手,所以我可能遗漏了一些非常简单的东西,但仍然无法在互联网上找到答案。

【问题讨论】:

    标签: tensorflow gpu google-colaboratory nvidia


    【解决方案1】:

    您必须先在笔记本设置中启用 GPU。

    您可以通过点击Edit > Notebook settings 并选择 GPU 作为硬件加速器来轻松完成。

    应该是这样的。

    【讨论】:

    • 对不起,我完全误解了你的回答
    • 在我的例子中,我已经在多个笔记本中完成了这项工作,但即使在重新启动运行时之后仍然没有获得 GPU 或 TPU。
    猜你喜欢
    • 2021-07-08
    • 2017-08-16
    • 2018-08-17
    • 2022-07-04
    • 1970-01-01
    • 2018-11-25
    • 2022-06-25
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多