简体   繁体   English

RuntimeError:pytorch中的cuda运行时错误(8)

[英]RuntimeError: cuda runtime error (8) in pytorch

when I try to run a pytorch faster rcnn code (from https://github.com/rowanz/neural-motifs ), I get the issuse as follow当我尝试运行 pytorch 更快的 rcnn 代码(来自https://github.com/rowanz/neural-motifs )时,我得到的问题如下

THCudaCheck FAIL file=/opt/conda/conda-bld/pytorch_1518238409320/work/torch/lib/THC/generic/THCTensorMathPairwise.cu 
line=21 error=8 : invalid device function

It arises when operate keep.append(keep_im + s) where keep is a list, s is a int number and keep_im is a torch.cuda.Longtensor它在操作 keep.append(keep_im + s) 时出现,其中 keep 是一个列表,s 是一个 int 数字,keep_im 是一个 torch.cuda.Longtensor

It's strange that, when I modify the code as奇怪的是,当我将代码修改为

try:
    keep.append(keep_im + s)
except BaseException:
    keep.append(keep_im + s)

It return error in the try and then operates again in the except, and successes....它在尝试中返回错误,然后在异常中再次操作,并成功......

Anyone know what happen here?有谁知道这里发生了什么? I use python 2.7 + pytorch 0.3 + Cuda 8 + cudnn7.1, Titan XP in Ubuntu 16. Thanks我在 Ubuntu 16 中使用 python 2.7 + pytorch 0.3 + Cuda 8 + cudnn7.1,Titan XP。谢谢

You have to upgrade torch version.您必须升级手电筒版本。 ** **

For me upgrade to torch 1.11.0 version worked.对我来说,升级到 torch 1.11.0 版本是可行的。

** **

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 PyTorch给CUDA运行时错误 - PyTorch giving cuda runtime error 如何修复 PyTorch 运行时错误:CUDA 错误:内存不足? - How to fix PyTorch RuntimeError: CUDA error: out of memory? pytorch 运行时错误:CUDA 错误:触发设备端断言 - pytorch RuntimeError: CUDA error: device-side assert triggered 为什么在pytorch中出现RuntimeError:CUDA错误:无效参数? - Why do I get RuntimeError: CUDA error: invalid argument in pytorch? 在 cuda 上运行时出现 PyTorch 运行时错误 - PyTorch Runtime error while running on cuda RuntimeError:CUDA运行时错误(35):CUDA驱动程序版本对于CUDA运行时版本不足,位于Torch / csrc / cuda / Module.cpp:51 - RuntimeError: cuda runtime error (35) : CUDA driver version is insufficient for CUDA runtime version at torch/csrc/cuda/Module.cpp:51 RuntimeError:cuda运行时错误(30):火炬/csrc/cuda/Module.cpp:32时出现未知错误 - RuntimeError: cuda runtime error (30) : unknown error at torch/csrc/cuda/Module.cpp:32 尝试将 cuda 与 pytorch 一起使用时出现运行时错误 999 - Runtime error 999 when trying to use cuda with pytorch pytorch 从 RuntimeError 中恢复:CUDA 错误:在不重启脚本的情况下触发设备端断言 - pytorch recover from RuntimeError: CUDA error: device-side assert triggered without restarting script PyTorch 中的“RuntimeError:CUDA 错误:设备端断言已触发”是什么意思? - What does "RuntimeError: CUDA error: device-side assert triggered" in PyTorch mean?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM