Skip to content

Commit

Permalink
[Fix] Fix boxes.scalar_type in nms_npu (open-mmlab#2731)
Browse files Browse the repository at this point in the history
  • Loading branch information
momo609 authored and CokeDong committed Apr 6, 2023
1 parent 44319eb commit 43aebc5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mmcv/ops/csrc/pytorch/npu/nms_npu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ using namespace NPU_NAME_SPACE;
using namespace std;

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

0 comments on commit 43aebc5

Please sign in to comment.