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

Add missing contiguous calls for nms_rotated #2547

Merged
merged 1 commit into from
Feb 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions mmcv/ops/csrc/pytorch/nms_rotated.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ Tensor nms_rotated(const Tensor dets, const Tensor scores, const Tensor order,
assert(dets.device().is_cuda() == scores.device().is_cuda());
if (dets.device().is_cuda()) {
#ifdef MMCV_WITH_CUDA
return nms_rotated_cuda(dets, scores, order, dets_sorted, iou_threshold,
multi_label);
return nms_rotated_cuda(dets, scores, order, dets_sorted.contiguous(),
iou_threshold, multi_label);
#else
AT_ERROR("Not compiled with GPU support");
#endif
}

return nms_rotated_cpu(dets, scores, iou_threshold);
return nms_rotated_cpu(dets.contiguous(), scores.contiguous(), iou_threshold);
}