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

THCudaCheck FAIL file=/opt/conda/conda-bld/pytorch_1556653099582/work/aten/src/THCUNN/generic/LeakyReLU.cu line=29 error=48 : no kernel image is available for execution on the device #1016

Closed
Youthfeng123 opened this issue Apr 6, 2022 · 2 comments

Comments

@Youthfeng123
Copy link

I follow the instructions on INSTALL.md, and install the packgage with no error report. howerver, when I try to run the following code:
python scripts/demo_inference.py --cfg configs/coco/resnet/256x192_res50_lr1e-3_1x.yaml --checkpoint pretrained_models/fast_res50_256x192.pth --indir examples/demo/ --sp

It stucked here for a long time:
Loading YOLO model..
Loading pose model from pretrained_models/fast_res50_256x192.pth...

after tens of minuts, it report this error:
THCudaCheck FAIL file=/opt/conda/conda-bld/pytorch_1556653099582/work/aten/src/THCUNN/generic/LeakyReLU.cu line=29 error=48 : no kernel image is available for execution on the device
Exception in thread Thread-2:
Traceback (most recent call last):
File "/home/xdlab3/anaconda3/envs/alphapose/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/home/xdlab3/anaconda3/envs/alphapose/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/home/xdlab3/DeepTech/AlphaPose-master/alphapose/utils/detector.py", line 223, in image_detection
dets = self.detector.images_detection(imgs, im_dim_list)
File "/home/xdlab3/DeepTech/AlphaPose-master/detector/yolo_api.py", line 94, in images_detection
prediction = self.model(imgs, args=args)
File "/home/xdlab3/anaconda3/envs/alphapose/lib/python3.6/site-packages/torch/nn/modules/module.py", line 493, in call
result = self.forward(*input, **kwargs)
File "/home/xdlab3/DeepTech/AlphaPose-master/detector/yolo/darknet.py", line 332, in forward
x = self.module_listi
File "/home/xdlab3/anaconda3/envs/alphapose/lib/python3.6/site-packages/torch/nn/modules/module.py", line 493, in call
result = self.forward(*input, **kwargs)
File "/home/xdlab3/anaconda3/envs/alphapose/lib/python3.6/site-packages/torch/nn/modules/container.py", line 92, in forward
input = module(input)
File "/home/xdlab3/anaconda3/envs/alphapose/lib/python3.6/site-packages/torch/nn/modules/module.py", line 493, in call
result = self.forward(*input, **kwargs)
File "/home/xdlab3/anaconda3/envs/alphapose/lib/python3.6/site-packages/torch/nn/modules/activation.py", line 561, in forward
return F.leaky_relu(input, self.negative_slope, self.inplace)
File "/home/xdlab3/anaconda3/envs/alphapose/lib/python3.6/site-packages/torch/nn/functional.py", line 1097, in leaky_relu
result = torch._C.nn.leaky_relu(input, negative_slope)
RuntimeError: cuda runtime error (48) : no kernel image is available for execution on the device at /opt/conda/conda-bld/pytorch_1556653099582/work/aten/src/THCUNN/generic/LeakyReLU.cu:29

0%| | 0/3 [00:00<?, ?it/s] 0%| | 0/3 [83:17:25<?, ?it/s]
===========================> Finish Model Running.
Results have been written to json.

I use 3090, with pytorch==1.1.0.
and cuda is 11.1.
though the version may be incompatible, I ran torch.cuda.is_available(), it returned True.
and I can put tensors on GPU at will.
So how would I fix this? thanks a lot!

@peteruhrig
Copy link
Contributor

Can you try this pull request?
#1032
It works with A40 and A100; RTX 3090 is the same generation, so I think it should work.

@Fang-Haoshu
Copy link
Member

Fang-Haoshu commented Jun 22, 2022

Thanks @peteruhrig , we have merged it to the master branch

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

3 participants