gpt4 book ai didi

python - CUDA 初始化 : Unexpected error from cudaGetDeviceCount()

转载 作者:行者123 更新时间:2023-12-03 17:17:47 36 4
gpt4 key购买 nike

我在我的 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()返回 false .我该怎么办?
附:我使用 GeForce RTX 3080 和 cuda 11.0 + pytorch 1.7.0。它以前有效,但现在没有了。

最佳答案

我刚刚尝试重新启动。问题解决了。原来是 NVIDIA NVML 驱动程序/库版本不匹配导致的。

关于python - CUDA 初始化 : Unexpected error from cudaGetDeviceCount(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66371130/

36 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com