deep-high-resolution-net.pytorch icon indicating copy to clipboard operation
deep-high-resolution-net.pytorch copied to clipboard

cuda runtime error (8) : invalid device function

Open zjhhnu123 opened this issue 4 years ago • 4 comments

Hi,I'm pre-training the MPII DataSet, and I input this command in my terminal:

python3 tools/test.py --cfg experiments/mpii/hrnet/w32_256x256_adam_lr1e-3.yaml TEST.MODEL_FILEmodels/pytorch/pose_mpii/pose_hrnet_w32_256x256.pth

however when I input this command,I met this error:

File "tools/test.py", line 130, in main() File "tools/test.py", line 126, in main final_output_dir, tb_log_dir) File "/home/zjh/deep-high-resolution-net.pytorch/tools/../lib/core/function.py", line 120, in validate outputs = model(input) File "/home/zjh/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in call result = self.forward(*input, **kwargs) File "/home/zjh/.local/lib/python3.6/site-packages/torch/nn/parallel/data_parallel.py", line 141, in forward return self.module(*inputs[0], **kwargs[0]) File "/home/zjh/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in call result = self.forward(*input, **kwargs) File "/home/zjh/deep-high-resolution-net.pytorch/tools/../lib/models/pose_hrnet.py", line 426, in forward x = self.conv1(x) File "/home/zjh/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in call result = self.forward(*input, **kwargs) File "/home/zjh/.local/lib/python3.6/site-packages/torch/nn/modules/conv.py", line 320, in forward self.padding, self.dilation, self.groups) RuntimeError: cuda runtime error (8) : invalid device function at /pytorch/aten/src/THC/THCGeneral.cpp:405

I'm looking foraward to find method to solve this problem,it seems that my GPU is RTX3070 with cuda toolkit 11.1 that it's compability is not suitable,but I don't konw how to modify the parameters,does anyone who has met this problem?

zjhhnu123 avatar Nov 24 '20 06:11 zjhhnu123

pls if you were able to solve it. how?

Aliiiu avatar Jan 25 '21 21:01 Aliiiu

hi, have you solved this problem? I me the same problem.

shui-tian-ju-shi avatar May 05 '22 02:05 shui-tian-ju-shi

same problem how to solve i am 4070 cuda 11.2.67

yijiudd avatar Nov 03 '23 04:11 yijiudd

I think this problem is the Cuda version u use, I think it should work well in older Cuda versions 9.0 or 10.0

yijiudd avatar Nov 04 '23 06:11 yijiudd