-
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
18 additions
and
42 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,18 @@ | ||
#include "pytorch_npu_helper.hpp" | ||
|
||
using namespace NPU_NAME_SPACE; | ||
using namespace std; | ||
|
||
void points_in_boxes_part_forward_impl_npu(int batch_size, int boxes_num, | ||
int pts_num, const Tensor boxes, | ||
const Tensor pts, | ||
Tensor box_idx_of_points) { | ||
c10::SmallVector<int64_t, 8> output_size = {pts.size(0), pts.size(1)}; | ||
auto boxes_trans = boxes.transpose(1, 2).contiguous(); | ||
EXEC_NPU_CMD(aclnnPointsInBox, boxes_trans, pts, box_idx_of_points); | ||
} | ||
void points_in_boxes_part_forward_impl(int batch_size, int boxes_num, | ||
int pts_num, const Tensor boxes, | ||
const Tensor pts, | ||
Tensor box_idx_of_points); | ||
REGISTER_NPU_IMPL(points_in_boxes_part_forward_impl, points_in_boxes_part_forward_impl_npu); |