Runtime error 999 when trying to use cuda with pytorch(尝试在 pytorch 中使用 cuda 时出现运行时错误 999)
问题描述
我为 Geforce 2080 ti 安装了 Cuda 10.1 和最新的 Nvidia 驱动程序.我尝试运行一个基本脚本来测试 pytorch 是否正常工作,但出现以下错误:
I installed Cuda 10.1 and the latest Nvidia Driver for my Geforce 2080 ti. I try to run a basic script to test if pytorch is working and I get the following error:
RuntimeError: cuda runtime error (999) : ..atensrcTHCTHCGeneral.cpp:50 处的未知错误
下面是我试图运行的代码:
Below is the code im trying to run:
import torch
torch.cuda.current_device()
torch.cuda.is_available()
torch.cuda.get_device_name(0)
推荐答案
重新启动计算机为我解决了这个问题.
Restarting my computer fixed this for me.
但是对于侵入性较小的修复,您也可以尝试此解决方案(来自 张量流问题线程):
But for a less invasive fix, you can also try this solution (from a tensorflow issue thread):
sudo rmmod nvidia_uvm
sudo rmmod nvidia
sudo modprobe nvidia
sudo modprobe nvidia_uvm
这篇关于尝试在 pytorch 中使用 cuda 时出现运行时错误 999的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:尝试在 pytorch 中使用 cuda 时出现运行时错误 999
- 如何使用PYSPARK从Spark获得批次行 2022-01-01
- YouTube API v3 返回截断的观看记录 2022-01-01
- 我如何透明地重定向一个Python导入? 2022-01-01
- 使用 Cython 将 Python 链接到共享库 2022-01-01
- 我如何卸载 PyTorch? 2022-01-01
- 计算测试数量的Python单元测试 2022-01-01
- ";find_element_by_name(';name';)";和&QOOT;FIND_ELEMENT(BY NAME,';NAME';)";之间有什么区别? 2022-01-01
- CTR 中的 AES 如何用于 Python 和 PyCrypto? 2022-01-01
- 检查具有纬度和经度的地理点是否在 shapefile 中 2022-01-01
- 使用公司代理使Python3.x Slack(松弛客户端) 2022-01-01
