【问题标题】:CUDA initialization: Unexpected error from cudaGetDeviceCount()CUDA 初始化:来自 cudaGetDeviceCount() 的意外错误
【发布时间】:2021-05-27 23:12:51
【问题描述】:

我在我的 Linux 服务器上运行一个深度学习程序,我突然收到了这个错误。

UserWarning: CUDA initialization: Unexpected error from cudaGetDeviceCount(). Did you run some cuda functions before calling NumCudaDevices() that might have already set an error? Error 804: forward compatibility was attempted on non supported HW (Triggered internally at /opt/conda/conda-bld/pytorch_1603729096996/work/c10/cuda/CUDAFunctions.cpp:100.)

早些时候,当我刚刚创建这个 conda 环境时,torch.cuda.is_available() 返回了true,我可以使用 CUDA 和 GPU。但突然之间我无法使用 CUDA 和 torch.cuda.is_available()returned false。我该怎么办?

ps。我使用 GeForce RTX 3080 和 cuda 11.0 + pytorch 1.7.0。以前可以,现在不行了。

【问题讨论】:

    标签: python linux pytorch


    【解决方案1】:

    我刚刚尝试重新启动。问题解决了。原来是NVIDIA NVML Driver/library版本不匹配造成的。

    【讨论】:

    • 我有同样的问题,当我重新启动时它会一直消失。但是,我不想重新启动。你找到解决这个问题的方法了吗?
    • 也许你可以在这里尝试一些解决方案stackoverflow.com/questions/43022843/…
    • 不幸的是,对我来说这不是版本不匹配的问题。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-08-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-11-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多