Skip to content

Commit

Permalink
fix pointsinbox bug
Browse files Browse the repository at this point in the history
  • Loading branch information
momo609 committed Jun 17, 2024
1 parent 128f29a commit 859a2cc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mmcv/ops/points_in_boxes.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ def points_in_boxes_part(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_part_forward(boxes.contiguous(),
points.contiguous(),
Expand Down

0 comments on commit 859a2cc

Please sign in to comment.