Open validatedev opened 8 months ago
Same issue in python 3.10.6
same in python 3.8.18
The issue is with mac book pro m1 chip as the issue is not there in windows laptop with cpu . The issue which i got when training the cutom dataset.
@validatedev Are you able to provide the location for casting the nms
to cpu
?
Never mind found it at: https://github.com/open-mmlab/mmcv/blob/d9e10e11846d911e8354cd024967d3a17a88083c/mmcv/ops/nms.py#L127
inds = NMSop.apply(boxes.to('cpu'), scores.to('cpu'), iou_threshold, offset, score_threshold,
max_num)
Thanks for your error report and we appreciate it a lot.
Checklist
Describe the bug When I try to run demo with M2 MacBook Pro, it gives the error
RuntimeError: nms_impl: implementation for device mps:0 not found.
Reproduction
I checked the device via
torch
and devicemps
is present.And the output is
When I try to run
it gives the output
mim download mmdet --config rtmdet_tiny_8xb32-300e_coco
Environment
python mmdet/utils/collect_env.py
to collect necessary environment information and paste it here.$PATH
,$LD_LIBRARY_PATH
,$PYTHONPATH
, etc.)I can't provide the output of
python mmdet/utils/collect_env.py
as I have installedmmdetection
asmim install mmdet
but the environment includes:pyenv
mmdet
installation which steps are:And output of
is
Error traceback The full output is here: https://gist.github.com/validatedev/d505e139b119edfcabcd9a864cb8552a#file-gistfile1-txt
Bug fix Actually, I was about to encounter such an issue in ultralytics/ultralytics and ultralytics/yolov5, and they solved the issue by running
non_max_suppression
viacpu
if themps
device is present and active. I can provide a similar fix in your repository as well :)