From 6c4840200f72c09f190a40d78b49e5e6e82ec547 Mon Sep 17 00:00:00 2001 From: Zac <33156501+ZrBac@users.noreply.github.com> Date: Tue, 5 Nov 2024 10:29:05 +0800 Subject: [PATCH] Update points_in_boxes.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 去除判断 --- mmcv/ops/points_in_boxes.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/mmcv/ops/points_in_boxes.py b/mmcv/ops/points_in_boxes.py index 50a085cf46..3069867886 100644 --- a/mmcv/ops/points_in_boxes.py +++ b/mmcv/ops/points_in_boxes.py @@ -133,8 +133,6 @@ def points_in_boxes_all(points: Tensor, boxes: Tensor) -> Tensor: if points.device.type != 'npu': if torch.cuda.current_device() != points_device: torch.cuda.set_device(points_device) - elif points.device.type == 'npu': - boxes[:, :, 2] += boxes[:, :, 5] / 2.0 ext_module.points_in_boxes_all_forward(boxes.contiguous(), points.contiguous(), box_idxs_of_pts)