Skip to content

Commit bfdd1f9

Browse files
authored
[Fix] Fix boxes.scalar_type in nms_npu (#2731)
1 parent bc727f7 commit bfdd1f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mmcv/ops/csrc/pytorch/npu/nms_npu.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ using namespace NPU_NAME_SPACE;
44
using namespace std;
55

66
Tensor nms_npu(Tensor boxes, Tensor scores, float iou_threshold, int offset) {
7-
TORCH_CHECK((boxes.scalar_type == at::ScalarType::Float),
7+
TORCH_CHECK((boxes.scalar_type() == at::ScalarType::Float),
88
"The type of boxes tensor passed in nms_npu should be float");
99
int64_t offset_64 = offset;
1010
at::Tensor iou_threshold_y = at_npu::native::OpPreparation::ApplyTensor(

0 commit comments

Comments
 (0)