-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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: nms is not compiled with GPU support #4075
Comments
Do not install the pytorch and torchvision in local pkgs way by conda! |
I also run into this error. I installed pytorch, torchvision and mmcv-full using the recommended way: pip install torch==1.7.0+cu110 torchvision==0.8.1+cu110 torchaudio===0.7.0 -f https://download.pytorch.org/whl/torch_stable.html
pip install -f https://download.openmmlab.com/mmcv/dist/index.html mmcv-full==1.2.0+torch1.7.0+cu110 Environment
|
hello, I sovle this problem by installing pytorch1.6.0 and corresponding mmcv-full version. Maybe the mmcv not support pytorch1.7.0 yet. |
They should support pytorch 1.7.0 since the 1.2.0 release, but it looks like you are right. I got my setup running after installing pytorch 1.6.0 with CUDA 10.1: pip install torch==1.6.0+cu101 torchvision==0.7.0+cu101 -f https://download.pytorch.org/whl/torch_stable.html
pip install -f https://download.openmmlab.com/mmcv/dist/index.html mmcv-full==1.2.0+torch1.6.0+cu101 |
Thanks for your error report and we appreciate it a lot.
Checklist
Describe the bug
RuntimeError: nms is not compiled with GPU support
Reproduction
import torch
import torchvision
import os
print(torch.version,torch.cuda.is_available())
os.environ['CUDA_VISIBLE_DEVICES']="4,5"
import mmdet
print(mmdet.version)
from mmcv.ops import get_compiling_cuda_version, get_compiler_version
print(get_compiler_version())
print(get_compiling_cuda_version())
from mmdet.apis import init_detector, inference_detector
root_path='/home/tianxianhao/Project/mmdetection/'
config_file = root_path+'configs/faster_rcnn/faster_rcnn_r50_fpn_1x_coco.py'
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
init a detector
model = init_detector(config_file, device=device)
inference the demo image
inference_detector(model, root_path+'demo/demo.jpg')
A placeholder for the command.
Python 3.7.9 (default, Aug 31 2020, 12:42:55)
Type "copyright", "credits" or "license" for more information.
IPython 7.19.0 -- An enhanced Interactive Python.
runfile('/home/tianxianhao/.config/spyder-py3/temp.py', wdir='/home/tianxianhao/.config/spyder-py3')
1.7.0 True
2.6.0
GCC 6.1
not available
Traceback (most recent call last):
File "/home/tianxianhao/.config/spyder-py3/temp.py", line 26, in
inference_detector(model, root_path+'demo/demo.jpg')
File "/home/tianxianhao/Project/mmdetection/mmdet/apis/inference.py", line 119, in inference_detector
result = model(return_loss=False, rescale=True, **data)[0]
File "/home/tianxianhao/anaconda3/envs/mmdt/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/tianxianhao/anaconda3/envs/mmdt/lib/python3.7/site-packages/mmcv/runner/fp16_utils.py", line 84, in new_func
return old_func(*args, **kwargs)
File "/home/tianxianhao/Project/mmdetection/mmdet/models/detectors/base.py", line 170, in forward
return self.forward_test(img, img_metas, **kwargs)
File "/home/tianxianhao/Project/mmdetection/mmdet/models/detectors/base.py", line 147, in forward_test
return self.simple_test(imgs[0], img_metas[0], **kwargs)
File "/home/tianxianhao/Project/mmdetection/mmdet/models/detectors/two_stage.py", line 194, in simple_test
proposal_list = self.rpn_head.simple_test_rpn(x, img_metas)
File "/home/tianxianhao/Project/mmdetection/mmdet/models/dense_heads/rpn_test_mixin.py", line 36, in simple_test_rpn
proposal_list = self.get_bboxes(*rpn_outs, img_metas)
File "/home/tianxianhao/anaconda3/envs/mmdt/lib/python3.7/site-packages/mmcv/runner/fp16_utils.py", line 164, in new_func
return old_func(*args, **kwargs)
File "/home/tianxianhao/Project/mmdetection/mmdet/models/dense_heads/anchor_head.py", line 570, in get_bboxes
scale_factor, cfg, rescale)
File "/home/tianxianhao/Project/mmdetection/mmdet/models/dense_heads/rpn_head.py", line 167, in _get_bboxes_single
dets, keep = batched_nms(proposals, scores, ids, nms_cfg)
File "/home/tianxianhao/anaconda3/envs/mmdt/lib/python3.7/site-packages/mmcv/ops/nms.py", line 259, in batched_nms
dets, keep = nms_op(boxes_for_nms, scores, **nms_cfg_)
File "/home/tianxianhao/anaconda3/envs/mmdt/lib/python3.7/site-packages/mmcv/utils/misc.py", line 310, in new_func
output = old_func(*args, **kwargs)
File "/home/tianxianhao/anaconda3/envs/mmdt/lib/python3.7/site-packages/mmcv/ops/nms.py", line 113, in nms
inds = NMSop.apply(boxes, scores, iou_threshold, offset)
File "/home/tianxianhao/anaconda3/envs/mmdt/lib/python3.7/site-packages/mmcv/ops/nms.py", line 18, in forward
bboxes, scores, iou_threshold=float(iou_threshold), offset=offset)
RuntimeError: nms is not compiled with GPU support
A placeholder for trackback.
The text was updated successfully, but these errors were encountered: