Skip to content

Commit

Permalink
fix points_in_box bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
momo609 committed Jun 11, 2024
1 parent c0c6002 commit 2333e24
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mmcv/ops/points_in_boxes.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def points_in_boxes_part(points: Tensor, boxes: Tensor) -> Tensor:
points_device = points.get_device()
assert points_device == boxes.get_device(), \
'Points and boxes should be put on the same device'
if points_device != 'npu':
if points.device.type != 'npu':
if torch.cuda.current_device() != points_device:
torch.cuda.set_device(points_device)

Expand Down

0 comments on commit 2333e24

Please sign in to comment.