From 404124949a72652370d9ffaf596c2b0e31c1bc56 Mon Sep 17 00:00:00 2001 From: CokeDong <408244909@qq.com> Date: Wed, 28 Dec 2022 17:22:04 +0800 Subject: [PATCH] [Fix] Fix compilation error in Parrots environment (#2515) * Fix parrots compile error(only support aten1.3) * Fix setup.py for parrots --- mmcv/ops/csrc/parrots/cudabind.cpp | 51 ------------------------------ setup.py | 1 + 2 files changed, 1 insertion(+), 51 deletions(-) diff --git a/mmcv/ops/csrc/parrots/cudabind.cpp b/mmcv/ops/csrc/parrots/cudabind.cpp index 9627e26f4f..4521ddf4a9 100644 --- a/mmcv/ops/csrc/parrots/cudabind.cpp +++ b/mmcv/ops/csrc/parrots/cudabind.cpp @@ -564,57 +564,6 @@ REGISTER_DEVICE_IMPL(group_points_forward_impl, CUDA, REGISTER_DEVICE_IMPL(group_points_backward_impl, CUDA, group_points_backward_cuda); -void IoU3DBoxesOverlapBevForwardCUDAKernelLauncher(const int num_a, - const Tensor boxes_a, - const int num_b, - const Tensor boxes_b, - Tensor ans_overlap); - -void IoU3DNMS3DForwardCUDAKernelLauncher(const Tensor boxes, Tensor& keep, - Tensor& keep_num, - float nms_overlap_thresh); - -void IoU3DNMS3DNormalForwardCUDAKernelLauncher(const Tensor boxes, Tensor& keep, - Tensor& keep_num, - float nms_overlap_thresh); - -void iou3d_boxes_overlap_bev_forward_cuda(const int num_a, const Tensor boxes_a, - const int num_b, const Tensor boxes_b, - Tensor ans_overlap) { - IoU3DBoxesOverlapBevForwardCUDAKernelLauncher(num_a, boxes_a, num_b, boxes_b, - ans_overlap); -}; - -void iou3d_nms3d_forward_cuda(const Tensor boxes, Tensor& keep, - Tensor& keep_num, float nms_overlap_thresh) { - IoU3DNMS3DForwardCUDAKernelLauncher(boxes, keep, keep_num, - nms_overlap_thresh); -}; - -void iou3d_nms3d_normal_forward_cuda(const Tensor boxes, Tensor& keep, - Tensor& keep_num, - float nms_overlap_thresh) { - IoU3DNMS3DNormalForwardCUDAKernelLauncher(boxes, keep, keep_num, - nms_overlap_thresh); -}; - -void iou3d_boxes_overlap_bev_forward_impl(const int num_a, const Tensor boxes_a, - const int num_b, const Tensor boxes_b, - Tensor ans_overlap); - -void iou3d_nms3d_forward_impl(const Tensor boxes, Tensor& keep, - Tensor& keep_num, float nms_overlap_thresh); - -void iou3d_nms3d_normal_forward_impl(const Tensor boxes, Tensor& keep, - Tensor& keep_num, - float nms_overlap_thresh); - -REGISTER_DEVICE_IMPL(iou3d_boxes_overlap_bev_forward_impl, CUDA, - iou3d_boxes_overlap_bev_forward_cuda); -REGISTER_DEVICE_IMPL(iou3d_nms3d_forward_impl, CUDA, iou3d_nms3d_forward_cuda); -REGISTER_DEVICE_IMPL(iou3d_nms3d_normal_forward_impl, CUDA, - iou3d_nms3d_normal_forward_cuda); - void KNNForwardCUDAKernelLauncher(int b, int n, int m, int nsample, const Tensor xyz, const Tensor new_xyz, Tensor idx, Tensor dist2); diff --git a/setup.py b/setup.py index f20561aca8..5b357aa3dc 100644 --- a/setup.py +++ b/setup.py @@ -211,6 +211,7 @@ def get_extensions(): op_files = glob.glob('./mmcv/ops/csrc/pytorch/cuda/*.cu') +\ glob.glob('./mmcv/ops/csrc/pytorch/cpu/*.cpp') +\ glob.glob('./mmcv/ops/csrc/parrots/*.cpp') + op_files.remove('./mmcv/ops/csrc/pytorch/cuda/iou3d_cuda.cu') include_dirs.append(os.path.abspath('./mmcv/ops/csrc/common')) include_dirs.append(os.path.abspath('./mmcv/ops/csrc/common/cuda')) cuda_args = os.getenv('MMCV_CUDA_ARGS')