[英]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.