Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modify internal calls of npu boxes_overlap_bev & box_iou_rotated #3215

Merged
merged 1 commit into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions mmcv/ops/csrc/pytorch/npu/box_iou_rotated_npu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ void box_iou_rotated_npu(const Tensor boxes1, const Tensor boxes2, Tensor ious,
TORCH_CHECK(boxes1.size(1) == 5, "boxes1 must be 2D tensor (N, 5)");
TORCH_CHECK(boxes1.size(1) == 5, "boxes1 must be 2D tensor (N, 5)");

auto trans = false;
auto is_clockwise = false;
EXEC_NPU_CMD(aclnnBoxesOverlapBev, boxes1, boxes2, trans, is_clockwise,
aligned, mode_flag, ious);
EXEC_NPU_CMD(aclnnBoxIou, boxes1, boxes2, mode_flag, aligned, ious);
return;
}

Expand Down
12 changes: 7 additions & 5 deletions mmcv/ops/csrc/pytorch/npu/boxes_overlap_bev_npu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ void iou3d_boxes_overlap_bev_forward_npu(const int num_a, const Tensor boxes_a,
TORCH_CHECK(boxes_a.size(1) == 7, "boxes_a must be 2D tensor (N, 7)");
TORCH_CHECK(boxes_b.size(1) == 7, "boxes_b must be 2D tensor (N, 7)");

auto trans = false;
auto is_clockwise = false;
auto format_flag = 3;
auto clockwise = true;
auto mode_flag = 0;
auto aligned = false;
auto mode_flag = 2;
EXEC_NPU_CMD(aclnnBoxesOverlapBev, boxes_a, boxes_b, trans, is_clockwise,
aligned, mode_flag, ans_overlap);
auto margin = 1e-2;

EXEC_NPU_CMD(aclnnBoxesOverlapBev, boxes_a, boxes_b, format_flag, clockwise,
mode_flag, aligned, margin, ans_overlap);
return;
}

Expand Down
Loading