-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
28 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#include "pytorch_npu_helper.hpp" | ||
|
||
using namespace NPU_NAME_SPACE; | ||
using namespace std; | ||
|
||
void box_iou_quadri_impl(const Tensor boxes1, const Tensor boxes2, Tensor ious, | ||
const int mode_flag, const bool aligned); | ||
|
||
void box_iou_quadri_npu(const Tensor boxes1, const Tensor boxes2, Tensor ious, | ||
const int mode_flag, const bool aligned) { | ||
|
||
TORCH_CHECK(boxes1.size(1) == 8, "boxes1 must be 2D tensor (N, 8)"); | ||
TORCH_CHECK(boxes1.size(1) == 8, "boxes1 must be 2D tensor (N, 8)"); | ||
|
||
EXEC_NPU_CMD(aclnnBoxIou, boxes1, boxes2, mode_flag, aligned, ious); | ||
return; | ||
} | ||
|
||
REGISTER_NPU_IMPL(box_iou_quadri_impl, box_iou_quadri_npu); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters