Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/codeigniter/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Pytorch 运行时错误:cuda运行时错误(100)。gpu已启用,但仍出现错误_Pytorch_Gpu_Google Colaboratory - Fatal编程技术网

Pytorch 运行时错误:cuda运行时错误(100)。gpu已启用,但仍出现错误

Pytorch 运行时错误:cuda运行时错误(100)。gpu已启用,但仍出现错误,pytorch,gpu,google-colaboratory,Pytorch,Gpu,Google Colaboratory,我对谷歌Colab和pyTorch还不熟悉。我正在运行一个pytorch模型,但它在googlecolab中给了我Cuda运行时错误。我的gpu已在google colab上启用,但仍然出现错误,下面的图片中提供了gpu的说明。谁能帮帮我吗 THCudaCheck失败文件=/pytorch/aten/src/THC/THCGeneral.cpp line=47错误=100:未检测到支持CUDA的设备 回溯(最近一次呼叫最后一次): 文件“run.py”,第338行,在 main() 文件“ru

我对谷歌Colab和pyTorch还不熟悉。我正在运行一个pytorch模型,但它在googlecolab中给了我Cuda运行时错误。我的gpu已在google colab上启用,但仍然出现错误,下面的图片中提供了gpu的说明。谁能帮帮我吗

THCudaCheck失败文件=/pytorch/aten/src/THC/THCGeneral.cpp line=47错误=100:未检测到支持CUDA的设备
回溯(最近一次呼叫最后一次):
文件“run.py”,第338行,在
main()
文件“run.py”,第303行,在main中
model=model.cuda()
cuda中的文件“/usr/local/lib/python3.6/dist packages/torch/nn/modules/module.py”,第458行
返回自我应用(lambda t:t.cuda(设备))
文件“/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py”,第354行,适用于
模块应用(fn)
文件“/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py”,第354行,适用于
模块应用(fn)
文件“/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py”,第354行,适用于
模块应用(fn)
文件“/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py”,第376行,适用于
应用参数=fn(参数)
文件“/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py”,第458行,在
返回自我应用(lambda t:t.cuda(设备))
文件“/usr/local/lib/python3.6/dist-packages/torch/cuda/_-init__-init.py”,第190行,在_-lazy_-init中
火炬._C._cuda_init()
运行时错误:cuda运行时错误(100):在/pytorch/aten/src/THC/THCGeneral.cpp:47处未检测到支持cuda的设备
从日志读取预测/logs\u sparc\u editsql/valid\u use\u predicted\u querys\u predictions.json

Nvm,我把
CUDA\u可视设备
放到5
它应该是您拥有的CUDA设备的数量。

系统中安装了什么GPU?安装了什么CUDA版本?由于环境变量
CUDA\u VISIBLE\u DEVICES
,是否忽略了系统中的任何GPU?@njuffa我正在使用google colab。这是gpu的规格。另外,当我培训其他pytorch型号时,它也在同一个GPU上工作。@njuffa版本
nvcc:NVIDIA(R)Cuda编译器驱动程序版权(c)2005-2019 NVIDIA Corporation建立在Sun_Jul_28_19:07:16pdt_2019 Cuda编译工具,10.1版,V10.1.243
上,如何知道GPU是否被忽略?
THCudaCheck FAIL file=/pytorch/aten/src/THC/THCGeneral.cpp line=47 error=100 : no CUDA-capable device is detected
Traceback (most recent call last):
  File "run.py", line 338, in <module>
    main()
  File "run.py", line 303, in main
    model = model.cuda()
  File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 458, in cuda
    return self._apply(lambda t: t.cuda(device))
  File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 354, in _apply
    module._apply(fn)
  File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 354, in _apply
    module._apply(fn)
  File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 354, in _apply
    module._apply(fn)
  File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 376, in _apply
    param_applied = fn(param)
  File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 458, in <lambda>
    return self._apply(lambda t: t.cuda(device))
  File "/usr/local/lib/python3.6/dist-packages/torch/cuda/__init__.py", line 190, in _lazy_init
    torch._C._cuda_init()
RuntimeError: cuda runtime error (100) : no CUDA-capable device is detected at /pytorch/aten/src/THC/THCGeneral.cpp:47
Read prediction from logs/logs_sparc_editsql/valid_use_predicted_queries_predictions.json