Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeError: cuda runtime error (77) : an illegal memory access was encountered #4

Closed
warren-126 opened this issue Jun 29, 2021 · 1 comment

Comments

@warren-126
Copy link

当我训整个框架的时候,出现了:
THCudaCheck FAIL file=/pytorch/aten/src/THCUNN/generic/SpatialClassNLLCriterion.cu line=134 error=77 : an illegal memory access was encountered
Traceback (most recent call last):
File "exp/spatial_correction_cityscapes/python/train.py", line 292, in
train()
File "exp/spatial_correction_cityscapes/python/train.py", line 181, in train
loss_semantic, loss_cfnet = net(img_list, label=gt_label)
File "/data/anaconda3/envs/wang-davss/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in call
result = self.forward(*input, **kwargs)
File "/data/anaconda3/envs/wang-davss/lib/python3.7/site-packages/torch/nn/parallel/distributed.py", line 445, in forward
output = self.module(*inputs[0], **kwargs[0])
File "/data/anaconda3/envs/wang-davss/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in call
result = self.forward(*input, **kwargs)
File "/data/video_network/DAVSS/lib/model/scnet.py", line 75, in forward
loss_semantic += self.semantic_loss(img_3_out_propagate, label)
File "/data/anaconda3/envs/wang-davss/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in call
result = self.forward(*input, **kwargs)
File "/data/anaconda3/envs/wang-davss/lib/python3.7/site-packages/torch/nn/modules/loss.py", line 932, in forward
ignore_index=self.ignore_index, reduction=self.reduction)
File "/data/anaconda3/envs/wang-davss/lib/python3.7/site-packages/torch/nn/functional.py", line 2317, in cross_entropy
return nll_loss(log_softmax(input, 1), target, weight, None, ignore_index, None, reduction)
File "/data/anaconda3/envs/wang-davss/lib/python3.7/site-packages/torch/nn/functional.py", line 2117, in nll_loss
ret = torch._C._nn.nll_loss2d(input, target, weight, _Reduction.get_enum(reduction), ignore_index)
RuntimeError: cuda runtime error (77) : an illegal memory access was encountered at /pytorch/aten/src/THCUNN/generic/SpatialClassNLLCriterion.cu:134
terminate called after throwing an instance of 'c10::Error'
what(): CUDA error: an illegal memory access was encountered (insert_events at /pytorch/c10/cuda/CUDACachingAllocator.cpp:771)

然而不知道出了什么问题,不知道作者遇到过没有,希望予以解答。

@jfzhuang
Copy link
Owner

Thanks for the interest in our work. Actually, I haven't encountered this problem. It may be caused by incompatible pytorch version or cuda version.

@jfzhuang jfzhuang closed this as completed Jul 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants